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

Questo tema VirtueMart è molto buona. Sarà un nuovo acquisto.

--- Gina

Nem installation, professionelt design, tak for din Prestashop skabelon

--- Mads

Comment faire pour déplacer le module catégorie à un autre poste dans ce modèle de virtuemart? Smile

--- Eric

Kyllä, olen yrittänyt. Tämä Magento teema voi toimia version 2.0.x Kiitos. 

--- Teemu

Wydacie więcej oscommerce 2.3.4 szablonów??

--- Franciszka

Gracias por su respuesta rápida y ayudar con mi tema ZenCart.

--- Almunda

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