Oscommerce can not reassign

From CPanelDirect
Jump to: navigation, search

This happens due to a bug in OSCommerce after the recent server upgrade from PHP 4.x to PHP 5. The way the code was written in upload.php was using an undocumented feature that was not officially supported, and subsequently did not carry over into PHP 5.

To fix this, edit the 'upload.php' file mentioned in the error message using a text editor. Open the file and find the line (about 30 lines down) that says:

// self destruct
$this = null;

And edit it to say this:

// self destruct
// $this = null;

(basically comment out with // the $this = null; line and add the unset($this); line)

Your admin panel should work properly now.