Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

error in upload of images


HI-Lab

Recommended Posts

If I upload an image inserting a new product I receive this error:

 

Warning: open_basedir restriction in effect. File is in wrong directory in /pathtohttpdoc/admin/includes/classes/upload.php on line 83

 

The images/ folder have the right permissions. If I take a look with ftp I see uploaded image and I see product inserted with uploaded image.

 

Why this error?

(I use a 2.2-MS2-CVS)

 

thanx

=====================

HI-LAB ~ the Social Technology

-------------------------------------

http://www.hi-lab.net

-------------------------------------

by cooperativa sociale l'Utopia a r.l.

=====================

Link to comment
Share on other sites

You've got two options,

 

One go to your host with this part of your error. And tell them your trying to do an http upload.

Warning: open_basedir restriction in effect.

 

Or upload your images via ftp.

 

This isn't OSC, it is the way that your host has PHP setup. What is happening is that when you try and do a http upload, OSC is looking for a /tmp dir in the servers root, but PHP is in safe mode and won't allow OSC to go outside of your root dir. There is two fixes, and one has to be done by your host. They need to add :tmp to the end of your open_basedir path.

 

or you can ignore the error and go as you would if it wasn't there and then upload the images via FTP later.

Steve

-------------------------

Link to comment
Share on other sites

Yes, but to be sure, I must tell you that in Cache Directory I wrote:

 

/absolutepath/httpdocs/tmp/

 

and in Session Directory:

 

/absolutepath/httpdocs/tmp

 

Is it right?

=====================

HI-LAB ~ the Social Technology

-------------------------------------

http://www.hi-lab.net

-------------------------------------

by cooperativa sociale l'Utopia a r.l.

=====================

Link to comment
Share on other sites

Yes, but to be sure, I must tell you that in Cache Directory I wrote:

 

/absolutepath/httpdocs/tmp/

 

and in Session Directory:

 

/absolutepath/httpdocs/tmp

 

Is it right?

 

The sessions I would leave as set with a stock OSC and move them to the database. And the other path can be set in Admin. But I don't see any reason you can't set it manualy.

Steve

-------------------------

Link to comment
Share on other sites

Specifically:

 

- in hosting I use, can I use a tmp/ folder for cache into my httpdocs?

- if yes, I must put absolute path or relative path?

=====================

HI-LAB ~ the Social Technology

-------------------------------------

http://www.hi-lab.net

-------------------------------------

by cooperativa sociale l'Utopia a r.l.

=====================

Link to comment
Share on other sites

Specifically:

 

- in hosting I use, can I use a tmp/ folder for cache into my httpdocs?

- if yes, I must put absolute path or relative path?

 

Absolute path is best. I never could figure out relative paths in linux.

 

Example

/home/user_name/public_html/tmp

Steve

-------------------------

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...