How to I configure open_basedir parameter under my Centos VPS?

Posted by deltanovember on Server Fault See other posts from Server Fault or by deltanovember
Published on 2011-02-01T03:56:07Z Indexed on 2012/04/11 5:31 UTC
Read the original article Hit count: 233

Filed under:
|
|

The parameter can be seen here

http://wordswithfriends.net/test.php

open_basedir    /var/www/vhosts/wor.wordswithfriends.net/wordswithfriends.net/:/tmp

I'm trying to add PHP pear directories

/var/www/vhosts/wor.wordswithfriends.net/conf is as follows

-rw-r-----  1 root apache   6461 Jan 25 08:56 12959674170.16899500_httpd.include
-rw-r-----  1 root apache   6461 Jan 31 06:52 12960111810.31860800_httpd.include
-rw-r-----  1 root apache   6532 Jan 31 06:55 12964785250.54523600_httpd.include
-rw-r-----  1 root apache   6532 Jan 31 07:01 12964788880.47252600_httpd.include
-rw-r-----  1 root apache   6532 Jan 31 15:54 12965108850.92819600_httpd.include
-rw-r-----  1 root apache   6652 Jan 31 21:32 12965206700.32285200_httpd.include

Currently configured as follows

grep base 12965206700.32285200_httpd.include
php_admin_value open_basedir /var/www/vhosts/wor.wordswithfriends.net/httpdocs/:/tmp/:/usr/share/pear/:/local/PEAR/
php_admin_value open_basedir /var/www/vhosts/wor.wordswithfriends.net/httpdocs/:/tmp/:/usr/share/pear/:/local/PEAR/
php_admin_value open_basedir /var/www/vhosts/wor.wordswithfriends.net/httpdocs/:/tmp/:/usr/share/pear/:/local/PEAR/
php_admin_value open_basedir /var/www/vhosts/wor.wordswithfriends.net/httpdocs/:/tmp/:/usr/share/pear/:/local/PEAR/

Configured vhost.conf as follows

<Directory /var/www/vhosts/wor.wordswithfriends.net/wordswithfriends.net>
<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir "/var/www/vhosts/wor.wordswithfriends.net:/tmp:/usr/share/pear/local/PEAR"
</IfModule>
<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir "/var/www/vhosts/wor.wordswithfriends.net:/tmp:/usr/share/pear:/local/PEAR"
</IfModule>
</Directory>

Restarted apache and the parameter is still the same. I'm not sure why my pear directories are not showing up. I'm using Plesk. Any help appreciated

© Server Fault or respective owner

Related posts about centos

Related posts about vps