basedir drives me crazy

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
johniem
Forum Commoner
Posts: 29
Joined: Mon Jul 20, 2009 8:58 am

basedir drives me crazy

Post by johniem »

I haven't uncomment the basedir setting in php.ini but i'm still getting the "open_basedir restriction in effect " error.. When i'm running the phpinfo() on the server it sais that :

Directive: open_basedir
Local Value: /var/www/vhosts/mydomain.com/subdomains/images/httpdocs:/tmp
Master Value: no value

I really don't know what to do more to disable basedir and just run my scripts without these errors.
johniem
Forum Commoner
Posts: 29
Joined: Mon Jul 20, 2009 8:58 am

Re: basedir drives me crazy

Post by johniem »

I have disable it in my php.ini file by setting

Code: Select all

1.php_admin_value open_basedir none
and there is no such parameter in the httpd.conf file.

I have create a vhost.conf for every domain and subdomain and following the httpd.include file on my domain/conf folder
trying to disable or add a new path to the directory and its all subdirectories that i want to give access, without success.
I don't know if i'm doing it right and don't know what else to do...
Here is the vhost.conf file that i add in one of my subdomains to give access to another subdomain which i use to store my images and videos.

Code: Select all

 
<Directory  /var/www/vhosts/mydomain.com/subdomains/admin/httpdocs>
<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir "/var/www/vhosts/mydomain.com/subdomains/admin/httpdocs:/tmp:/var/www/vhosts/mydomain.com/subdomains/images"
</IfModule>
<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir "/var/www/vhosts/mydomain.com/subdomains/admin/httpdocs:/tmp:/var/www/vhosts/mydomain.com/subdomains/images"
</IfModule>
Options -Includes -ExecCGI
</Directory>
 
 
Post Reply