How to solve the "Cannot re-assign $this" problem when I run the oscommerce template?

E-mail Print PDF

Q: After I installed the osCommerce template, I go to the administration area, it occurs  "Cannot re-assign $this in ...catalog/admin/includes/classes/upload.php on line 30". How can I solve this problem?

 

The error appears because your OS Commerce is based on PHP4 rather than PHP5. To resolve the error message, you should follow the instructions below:


1. Download  ../catalog/admin/includes/classes/upload.php file and edit it with notepad or other text editor.


2. Find the line (about 30 lines down) that says:

 

// self destruct
$this = null;

 

And change it to:

 

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

 

Then save and re-load it to overwrite the old file.

Testimonials

Спасибо, очень много. Я решил все. Мой сайт онлайн с прекрасным дизайном.

--- Chubukov

I'd like to purchase the Tobacco and Cigars Store VirtueMart Theme 57723. Can you give any discount? 

--- Sergio

Sono molto contento del vostro servizio eccellente e cortese comunicazione.

--- EDOARDO

Thank you very much for your nice themes and for making your customers happy. 

--- Michael

Olen erittäin tyytyväinen erinomaista malleja ja palvelua. Viittaan asiakkaita sinulle.

--- JASKA

Ik beveel hun bedrijf en hun diensten te gebruiken in de toekomst.

--- Alexander

 
You are here: FAQs How to solve the "Cannot re-assign $this" problem when I run the oscommerce template?