leccy Posted April 22, 2005 Share Posted April 22, 2005 After an install on Solaris 9 and 10 (I tried both), the install went fine but the admin page appeared blank. I'm not a software guru by any means but found an error in the logs and commented the line in the file which was causing the error. Can anyone shed any light on this. Will this will have any effect or what may be affected? The page loads without errors after I added the comments. Any help much appreciated From apache logs... [client 10.0.0.8] PHP Fatal error: Cannot re-assign $this in /opt/xampp/htdocs/ store_main/admin/includes/classes/upload.php on line 31 upload.php... <?php /* $Id: upload.php,v 1.1.1.1 2004/03/04 23:39:49 ccwjr Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ class upload { var $file, $filename, $destination, $permissions, $extensions, $tmp_filename , $message_location; function upload($file = '', $destination = '', $permissions = '777', $extens ions = '') { $this->set_file($file); $this->set_destination($destination); $this->set_permissions($permissions); $this->set_extensions($extensions); $this->set_output_messages('direct'); if (tep_not_null($this->file) && tep_not_null($this->destination)) { $this->set_output_messages('session'); if ( ($this->parse() == true) && ($this->save() == true) ) { return true; } else { // self destruct // $this = null; *********** This line commented out ********** return false; } } } function parse() { global $messageStack; if (isset($_FILES[$this->file])) { $file = array('name' => $_FILES[$this->file]['name'], 'type' => $_FILES[$this->file]['type'], 'size' => $_FILES[$this->file]['size'], 'tmp_name' => $_FILES[$this->file]['tmp_name']); } elseif (isset($GLOBALS['HTTP_POST_FILES'][$this->file])) { global $HTTP_POST_FILES; $file = array('name' => $HTTP_POST_FILES[$this->file]['name'], 'type' => $HTTP_POST_FILES[$this->file]['type'], 'size' => $HTTP_POST_FILES[$this->file]['size'], 'tmp_name' => $HTTP_POST_FILES[$this->file]['tmp_name']); } else { @ Link to comment Share on other sites More sharing options...
Guest Posted April 22, 2005 Share Posted April 22, 2005 php5 is not compatible with osCommerce MS2.2, you need to comment out line 31. the upload.php you do not have to change. try this part and see what you get. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.