Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

new configuration


gschep

Recommended Posts

Posted

In the process of switching our store to a new provider and am stumped with this error -

 

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

 

This comes up on the script installed by the Fantistisco script and my copy which I uploaded. I think maybe I'm missing a CHMOD change somewhere but not totally sure.

 

Here are lines 13 through 39 of upload.php

  class upload {
   var $file, $filename, $destination, $permissions, $extensions, $tmp_filename, $message_location;

   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
Line 31          $this = null;
         
         return false;
       }
     }
   }

   function parse() {
     global $messageStack;

 

Thanks for the help

Gerald

Posted

Just change $this on line 31 of that file to //$this. It is a php5/osCommerce compatibility problem, and once you've done that you should have no problems.

 

Vger

Archived

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

×
×
  • Create New...