Question,
I can’t upload images to the web even that folder was given full access to the webserver. Server is Centos5 with Plesk loaded
My error messages should like this,
Wed Jan 27 08:55:57 2010] [error] [client 122.166.23.96] PHP Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/var/www/vhosts/mydomain.com/httpdocs/PrdImages/1517face.gif) is not within the allowed path(s): (/var/www/vhosts/mydomain.com/httpdocs:/tmp)
Solution,
1. create a conf. file on /var/www/vhosts/mydomain.com/conf/vhost.conf and added the following entries on it.
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir “none”php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir “none”
then include this file entry on domain.conf file
vi /var/www/vhosts/mydomain.com/conf/httpd.include
then added the following entry at the end of the file inside the virtualhost entry.
Include /var/www/vhosts/mydomain.com/conf/vhost.conf
then, restart apache . I do also disable the running php on safe mode ( webhosting settings) from Plesk control panel for the domain.
[root@mydomain.com ~]# vi /var/www/vhosts/mydomain.com/conf/httpd.include
[root@mydomain.com ~]# vi /var/www/vhosts/mydomain.com/conf/vhost.conf
[root@mydomain.com ~]# /usr/local/psa/admin/sbin/websrvmng -a -v
[root@mydomain.com ~]# service httpd configtest
Syntax OK
[root@mydomain.com ~]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
After the Apache restart, check the php variables should same as shown below,
open_basedir no value no value
safe_mode Off Off
-njoy