Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Fatal Error in Admin


ponslerg

Recommended Posts

I've used OSC several times, and this is a new on to me. I've installed the store several times, following the instructions to the "T" and keep getting this error:

 

Fatal error: Cannot re-assign $this in /home2/wwwclsa/public_html/store/admin/includes/classes/upload.php on line 31

 

I use products like this because I have no clue about anything php, lol, but hey! Atleast I'm honet? Has anyone had the similar problem, or have any idea how to correct this problem? I opened up the file and this is a little snippet of the code from where I estimate line 31 to be:

 

--------------------------------------------

 

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 {

$file = array('name' => (isset($GLOBALS[$this->file . '_name']) ? $GLOBALS[$this->file . '_name'] : ''),

'type' => (isset($GLOBALS[$this->file . '_type']) ? $GLOBALS[$this->file . '_type'] : ''),

'size' => (isset($GLOBALS[$this->file . '_size']) ? $GLOBALS[$this->file . '_size'] : ''),

'tmp_name' => (isset($GLOBALS[$this->file]) ? $GLOBALS[$this->file] : ''));

}

 

------------------------------------------------------------------------------------

Link to comment
Share on other sites

Hi,

 

I have been using OSCommerce successfully for several months. When I went to log in, I also to Admin, I also got the error:

 

 

-----------------

 

Fatal error: Cannot re-assign $this in /home/fisherca/public_html/osCommerce/catalog/admin/includes/classes/upload.php on line 31

----------------

 

Any help would be greatly appreciated.

 

 

Thanks,

 

Gary Cohen

 

 

:(

 

 

 

 

I've used OSC several times, and this is a new on to me. I've installed the store several times, following the instructions to the "T" and keep getting this error:

 

Fatal error: Cannot re-assign $this in /home2/wwwclsa/public_html/store/admin/includes/classes/upload.php on line 31

 

I use products like this because I have no clue about anything php, lol, but hey! Atleast I'm honet? Has anyone had the similar problem, or have any idea how to correct this problem? I opened up the file and this is a little snippet of the code from where I estimate line 31 to be:

 

--------------------------------------------

 

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 {

$file = array('name' => (isset($GLOBALS[$this->file . '_name']) ? $GLOBALS[$this->file . '_name'] : ''),

'type' => (isset($GLOBALS[$this->file . '_type']) ? $GLOBALS[$this->file . '_type'] : ''),

'size' => (isset($GLOBALS[$this->file . '_size']) ? $GLOBALS[$this->file . '_size'] : ''),

'tmp_name' => (isset($GLOBALS[$this->file]) ? $GLOBALS[$this->file] : ''));

}

 

------------------------------------------------------------------------------------

Link to comment
Share on other sites

Hi,

 

I have been using OSCommerce successfully for several months. When I went to log in, I also to Admin, I also got the error:

-----------------

 

Fatal error: Cannot re-assign $this in /home/fisherca/public_html/osCommerce/catalog/admin/includes/classes/upload.php on line 31

----------------

 

Any help would be greatly appreciated.

Thanks,

 

Gary Cohen

:(

 

 

line 31 should look something like this : $this=null;

 

To fix it you can either comment it out by adding // in front of it or change it to

unset($this);

 

both options seem to work. Good luck

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...