Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

File Upload .7 (for PA - Option Type Feature)


pirhola

Recommended Posts

Hi there,

 

installed File upload .77

after adding option type "file" to a product; upload field with browse button appears quite nicely but:

after uploading a (jpg) file (add to cart) next fatal error occurs:

 

Fatal error: Cannot re-assign $this in /var/www/vhosts/...../httpdocs/catalog/includes/classes/upload.php on line 33

 

any clues where to start troubleshooting?

 

 

upload.php:

...

13 // iii changed: all references to $message_stack were commented out, since it is not defined here

14

15 class upload {

16 var $file, $filename, $destination, $permissions, $extensions, $tmp_filename, $message_location;

17

18 function upload($file = '', $destination = '', $permissions = '666', $extensions = array

('jpg', 'jpeg', 'gif', 'png', 'eps', 'cdr', 'ai', 'pdf', 'tif', 'tiff', 'bmp')) {

19 $this->set_file($file);

20 $this->set_destination($destination);

21 $this->set_permissions($permissions);

22 $this->set_extensions($extensions);

23

24 $this->set_output_messages('direct');

25

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

27 $this->set_output_messages('session');

28

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

30 return true;

31 } else {

32 // self destruct

33 $this = null;

34

35 return false;

36 }

37 }

38 }

...

 

 

many thanks

Kees

Link to comment
Share on other sites

Have you veryfied the permissions of the destination directory??

try to give to the destination folder a chm 777 permission and upload again the jpg file.

If it doesn't work, tell me.

 

 

Omar - thanx for the speedy reply

yes the upload dir (catalog/images/uploads) was already chm 777

Link to comment
Share on other sites

Try to do this:

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

30 return true;

31 } else {

32 // self destruct

33 return false;

34 }

35 }

36 }

Erase the lines what I erased and try with this.

After trying, not matter what happen, go to the destination directory to verify.

Link to comment
Share on other sites

...no file uploaded into destination directory..

 

error is now:

1146 - Table 'poster.files_uploaded' doesn't exist

 

insert into files_uploaded (sesskey, files_uploaded_name) values('35300979ea35da83854c3e2e74ab9d76', 'Print_test_target.png')

 

[TEP STOP]

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...