Web Hosting Talk







View Full Version : Error after moving website


hiredfreelance-com
09-23-2008, 03:59 AM
Hi there,
I recently moved a site to a new server and suddenly get an error message on some of my pages.

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/images/stories/ferrari_office.jpg) is not within the allowed path(s): (/var/www/vhosts/site.co.uk/httpdocs:/tmp) in /var/www/vhosts/site.co.uk/httpdocs/mambots/content/multithumb.php on line 602

I checked the file paths but no luck,
Any help ?

Thanks

servertechs
09-23-2008, 05:17 AM
The open_base_dir setting is primarily used to prevent php scripts for a particular user from accessing files in another user's account. So usually, any files in your own account should be readable by your own scripts.

mod_webhosting
09-23-2008, 07:25 AM
Go to /var/www/vhosts/site.co.uk/httpdocs/mambots/content/multithumb.php and in line 602 change /images/stories/ferrari_office.jpg to /var/www/vhosts/site.co.uk/httpdocs/images/stories/ferrari_office.jpg

Does that solve your problem?

Dynash
09-23-2008, 06:53 PM
A more easier way would be to disable open_base_dir.

mod_webhosting
09-24-2008, 06:46 AM
Disabling open_base_dir is an option only if server administrator allows it and if OP understands what open_base_dir actually is and what are implications of turning it on/off.

If someone enabled open_base_dir on a new server, I'm guessing he did it for a reason.

SparkSupport
09-26-2008, 04:18 AM
Are you accessing the site on new server via http://<IP-Address>/~username/ ??? If yes, the open_base_dir issue would automatically get resolved once the site is accessible by domain-name.