how can I disable open_basedir?

Associate
Joined
28 Apr 2007
Posts
27
Location
Colchester, UK
Hi

Ive just setup a VPS but I'm having mega issues with the open_basedir restriction. Where do I disable this, so all vhosts I create can run scripts from anywhere? Is it php.ini on httpd.conf?

Any help greatly appreciated
 
cheers mate :D

I've tried setting open_basedir = Off in my php.ini but it's not having any effect. I ideally want to remove the restriction, or at least allow all my vhost directories.

I also found a page saying I need to add
php_admin_value open_basedir none
to my httpd.conf, but this had no effect either. Any ideas?
 
still no luck :(

From that I added...

<VirtualHost *:80>
ServerName "mydomain.com"
DocumentRoot "/var/www"
<Directory "/var/www">
Options Indexes ExecCgi
php_admin_value safe_mode 0
php_admin_value open_basedir "/"
</Directory>
</VirtualHost>

to my httpd.conf, but it's not even changing in my phpinfo() value bit. Any more ideas?
 
Last edited:
Just tried it and still no luck. Maybe I'm looking at the wrong place, it seems the file that is trying to run is outside of my vhost directory (where scripts ARE running). Here's the error

warning: main() [function.main]: open_basedir restriction in effect. File(/usr/share/pear/cre_query_obj.inc) is not

This file isn't in my directories, and it doesn't seem to exist either. Do you think I'm looking in the wrong place?
 
ns400r said:
Are you sure your changing the correct php.ini file?
Pretty sure. It's in /etc/php.ini
Once I change it I can see the master value change, but not the local value when I run phpinfo().

I've made a little progress today - I can run php scripts (I'm running Drupal), but one of the modules is including a file (which is in the same folder) but for some reason it's trying to run from another directory. Any idea what could cause that? The include is just a standard require_once().
 
Back
Top Bottom