Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

HELP!!! Warning images


Snowman_G

Recommended Posts

When I try to upload images (make a new catagory for example) I get to following message:

 

Warning: move_uploaded_file(): open_basedir restriction in effect. File(/home2/...../public_html/shop/images/laptops.jpg) is not within the allowed path(s): (/home2/....../:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/...../public_html/shop/admin/includes/classes/upload.php on line 94

 

Warning: Cannot modify header information - headers already sent by (output started at /home/...../public_html/shop/admin/includes/classes/upload.php:94) in /home/....../public_html/shop/admin/includes/functions/general.php on line 20

 

Is this some kind of setting problem??

 

PLEASE HELP.... :unsure:

Link to comment
Share on other sites

When I try to upload images (make a new catagory for example) I get to following message:

 

(/home2/....../:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/...../public_html/shop/admin/includes/classes/upload.php on line 94

Is this some kind of setting problem??

 

PLEASE HELP.... :unsure:

It appears you are tyring to upload to a tmp directory in your php lib. I would check your config file and make sure your tmp directory is pointing correctly. This seemps weir to me. Usually the tmp directory is right off the root path of your site, for instance:

 

/home/public_html/tmp

 

???

 

JM

Always remember, we need patience, guidance and most of all understanding.

 

My Contributions

Link to comment
Share on other sites

Thanks for your reply but I think that's not the problem....

 

The directory permissions are on 777. The file is uploaded to:

(/home2/...../public_html/shop/images/laptops.jpg) so not to a temp dir.....

Link to comment
Share on other sites

It is a permissions problem, maybe with your host. Maybe you do not have access to that path. That is what it is saying in the error message.

 

See:

Warning: move_uploaded_file(): open_basedir restriction in effect. File(/home2/...../public_html/shop/images/laptops.jpg) is not within the allowed path(s): (/home2/....../:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/...../public_html/shop/admin/includes/classes/upload.php on line 94

Always remember, we need patience, guidance and most of all understanding.

 

My Contributions

Link to comment
Share on other sites

Yes:

 

define('HTTP_COOKIE_PATH', '/');

define('HTTPS_COOKIE_PATH', '');

define('DIR_WS_HTTP_CATALOG', '/');

define('DIR_WS_HTTPS_CATALOG', '');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

define('DIR_WS_INCLUDES', 'includes/');

define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');

define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

Link to comment
Share on other sites

No these are set right. I've found the solution:

It is a PHP setting. One which rejects PHP users to upload files in other dirs than the Basedir. This setting was OFF, when my host turned it ON the problem was solved!!!

Link to comment
Share on other sites

  • 4 weeks later...

Line 194 (PHP.ini)

 

; open_basedir, if set, limits all file operations to the defined directory

; and below. This directive makes most sense if used in a per-directory

; or per-virtualhost web server configuration file. This directive is

; *NOT* affected by whether Safe Mode is turned On or Off.

;open_basedir =

Link to comment
Share on other sites

I am having similar problems when uploading images using the admin tool. Here are my php.ini settings re: basedir:

 

; open_basedir, if set, limits all file operations to the defined directory

; and below. This directive makes most sense if used in a per-directory

; or per-virtualhost web server configuration file. This directive is

; *NOT* affected by whether Safe Mode is turned On or Off.

;open_basedir =

 

 

should open_basedir= be commented out? should a path be there??

Can anyone help?

 

Thanks.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...