osCommerce error ‘Cannot reassign this’

Error message:

******Fatal error: Cannot re-assign $this in … upload.php*******

The error appears because your OS Commerce is based on PHP4 rather than PHP5.

1. Go to your cPanel.

2. Click on the File Manager icon.

3. Click on the folder icon next to public_html folder name.

4. Click on the folder icon next to the folder in which your osCommerce is installed

5. Find ../catalog/admin/includes/classes/upload.php file and click on it

6. In the upper right corner you will see several management options for upload.php file. Click on Edit File

7. Open the file and find the line (about 30 lines down) that says:

// self destruct
$this = null;

And change it to:

// self destruct
// $this = null;
unset($this);

This should solve your problem.

1 2 3 4