Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

HELP!!! Warning images


Snowman_G

Recommended Posts

Posted

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:

Posted

CHMOD your images directory to 777 and refresh. Try this first, usually this is a simple permissions problem.

 

JM

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

 

My Contributions

Posted
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

Posted

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.....

Posted

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

Posted

Is this what you have for your images directory in your catalog/includes/config.php

file

 

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

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

 

My Contributions

Posted

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/');

Posted

did you remove the paths to your http and https and catalog areas or is this an overlook?

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

 

My Contributions

Posted

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!!!

  • 4 weeks later...
Posted

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 =

Posted

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.

Archived

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

×
×
  • Create New...