Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

upload.php error on clean setup


Guest

Recommended Posts

I'm a complete beginner to osCommerce, and have gone through all of setup w/o a hitch and - BUT getting the following error

 

Fatal error: Cannot re-assign $this in C:\xampp\xampplite\htdocs\catalog\admin\includes\classes\upload.php on line 31

 

 

 

 

So, when i remove the Upload function (see below), I'm able to update the mySQL database and the error goes away.....but, I can't upload images via admin web interface...this is an important feature for me,......help.

 

--------------------------when removed from admin\includes\classes\upload.php, everything works-------------------------------------------------------

 

function upload($file = '', $destination = '', $permissions = '777', $extensions = '') {

$this->set_file($file);

$this->set_destination($destination);

$this->set_permissions($permissions);

$this->set_extensions($extensions);

 

$this->set_output_messages('direct');

 

if (tep_not_null($this->file) && tep_not_null($this->destination)) {

$this->set_output_messages('session');

 

if ( ($this->parse() == true) && ($this->save() == true) ) {

return true;

} else {

// self destruct

$this = null;

 

return false;

}

}

}

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

Link to comment
Share on other sites

you are using php5, which does not work properly with osCommerce.

 

if you search on $this you should find some things on it.

 

search is a wonderful thing.

 

comment out $this by // ie

 

// $this

Link to comment
Share on other sites

thanks. that did it....but still not able to upload image files. is there a modified function that can allow me to upload images?....or is that even related to this problem?

thanks.

 

you are using php5, which does not work properly with osCommerce.

 

if you search on $this you should find some things on it.

 

search is a wonderful thing.

 

comment out $this by // ie 

 

// $this

Link to comment
Share on other sites

I think I have a better question knowing there are issues with php 5. I installed XAMPP and it installed PHP 5.

Can I downgrade gracefully from PHP 5 to PHP 4.x?

 

How can I get XAMPP and PHP 4.x together?

thanks.

 

thanks. that did it....but still not able to upload image files. is there a modified function that can allow me to upload images?....or is that even related to this problem?

thanks.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...