We were just working on doing an upgrade to the newest Matrix version. We have a custom package called puc that I wrote to hold a few of our custom assets. One of the assets has some lib files, which I thought would be moved over automatically. The strange thing is, if we run step_03.php by itself, it complete fine and there is no error, but if we run the upgrade script, and IT runs step_03.php then we get this error:
------------------------------------ Installing Package_Manager_PUC: ------------------------------------ 0 => content_type_fck_editor +--------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------+ | PHP Warning | |--------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------| | File : [SYSTEM_ROOT]/fudge/general/file_system.inc | | Line : 469 | |--------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------| | copy([SYSTEM_ROOT]/packages/puc/content_type_fck_editor/[SYSTEM_ROOT]/packages/puc/content_type_fc k_editor/lib/fckeditor/fckstyles.xml): failed to open stream: No such file or directory | +--------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------+ *ERROR* '/usr/bin/php' '/opt/matrix/install/step_03.php' '/opt/matrix' returned error code 1 [ Error ]
Here is what I have in my package manager file:
require_once SQ_INCLUDE_PATH.'/package_manager.inc';/** * Package_Manager_PUC * * Purpose * Manages the install and upgrade of the PUC package and PUC assets, * uses info gleened from the package.xml and asset.xml files * * @version $Revision: 1.1.1.1 $ * @package MySource_Matrix_Packages * @subpackage puc */ class Package_Manager_PUC extends Package_Manager { /** * Constructor * */ function Package_Manager_PUC() { $this->_full_path = SQ_PACKAGES_PATH.'/puc'; $this->Package_Manager(); // Copy over the extra files that we need $path = SQ_LIB_PATH.'/puc_files'; if (!is_dir($path)) { mkdir($path); }//end // Check on clearbox $create_path = $path.'/clearbox'; $full_path = SQ_PACKAGES_PATH.'/puc/'; if (!is_dir($create_path) && is_dir($path)) { mkdir($create_path); $this->recurse_copy($full_path.'lib/clearbox', $create_path); }//end }//end constructor /** * Recursivly copy a directory and contents * */ function recurse_copy($src,$dst) { $dir = opendir($src); @mkdir($dst); while(false !== ( $file = readdir($dir)) ) { if (( $file != '.' ) && ( $file != '..' )) { if ( is_dir($src . '/' . $file) ) { $this->recurse_copy($src . '/' . $file,$dst . '/' . $file); } else { copy($src . '/' . $file,$dst . '/' . $file); } } } closedir($dir); }//end }//end class</pre><br />
Ideas why it would have errors only when using the upgrade scripts?