Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I can't upload pictures in my new product listings


albaughed

Recommended Posts

Posted

I have been able to add new items with pics in the past, but now for some reason I am getting this error message when I try to upload them.

 

Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/hsphere/local/home/finaltou/aawholesalechaircovers.com/catalog/images/n_cc_wh_pl.JPG) is not within the allowed path(s): (/hsphere/local/home/finaltou:/usr/local/lib/php:/hsphere/shared/apache/libexec:/tmp:/var/tmp) in /var/hsphere/local/home/finaltou/aawholesalechaircovers.com/catalog/admin/includes/classes/upload.php on line 86

Error Error: File upload not saved.

 

Any help would be appreciated.

 

Thanks.

Posted
The folder is set to 777 and it still doesn't allow me to upload it.

 

you should not have your images/ directory with permissions of 777. you're asking to get hacked. set it to 755. as long as the first digit is a 7, your scripts have access to the directory...that's all you need.

 

the error message says "Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/hsphere/local/home/finaltou/aawholesalechaircovers.com/catalog/images/n_cc_wh_pl.JPG) is not within the allowed path(s)".

 

regarding, move_uploaded_file(), the php.net site ( http://us3.php.net/manual/en/function.move-uploaded-file.php ) says: "Note: move_uploaded_file() is both safe mode and open_basedir aware. However, restrictions are placed only on the destination path as to allow the moving of uploaded files in which filename may conflict with such restrictions. move_uploaded_file() ensures the safety of this operation by allowing only those files uploaded through PHP to be moved. "

 

so it looks like your host does not have your catalog/images path as an allowed directory for open_basdir. this is something they will have to change.

 

i hope this helps.

Archived

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

×
×
  • Create New...