iguess
Jan 3 2006, 08:28 PM
How do I take PHP out of safe-mode or disable
open_basedir protections??? I cant include the database files with my server. I need to enable PEAR DB module and also GD build support for php.
Following errors:
Warning: main(): open_basedir restriction in effect.
File(/usr/share/pear/DB.php) is not within the allowed path(s):
(/var/www/vhosts/gstacks.com/httpdocs:/tmp) in
/var/www/vhosts/gstacks.com/httpdocs/cpadmin/db_connect.php on line 9
Warning: main(DB.php): failed to open stream: Operation not permitted
in /var/www/vhosts/gstacks.com/httpdocs/cpadmin/db_connect.php on line
9
Fatal error: main(): Failed opening required 'DB.php'
(include_path='.:/usr/share/pear') in
/var/www/vhosts/gstacks.com/httpdocs/cpadmin/db_connect.php on line 9
jdames
Feb 20 2006, 02:36 PM
Hi everyone!
I am banging my head on an open_basedir error for accessing XML_RSS located in the pear/XML/RSS.php file. Seems like open_basedir is prohibiting access, however the almighty /etc/php.ini open_basedir config is commented out, leading me to believe that it's not even turned on.
How do I allow a .php script to allow access to the path /usr/share/pear/XML/RSS.php???
Thanks people!
Joe
scooterh
Feb 20 2006, 02:41 PM
in the include section of php.ini try adding /usr/share/pear to it as well.
jdames
Feb 20 2006, 02:55 PM
I have tried that. No difference. Check it out:
--------------------------------------------------
Warning: main(): open_basedir restriction in effect. File(/usr/share/pear/XML/RSS.php) is not within the allowed path(s): (/var/www/vhosts/xxxxxx.com/httpdocs:/tmp) in /var/www/vhosts/xxxxxx.com/httpdocs/rss2joomla.php on line 13
Warning: main(RSS.php): failed to open stream: Operation not permitted in /var/www/vhosts/xxxxxx.com/httpdocs/rss2joomla.php on line 13
Warning: main(): open_basedir restriction in effect. File(/usr/share/pear/XML/RSS.php) is not within the allowed path(s): (/var/www/vhosts/xxxxxx.com/httpdocs:/tmp) in /var/www/vhosts/xxxxxx.com/httpdocs/rss2joomla.php on line 13
Warning: main(RSS.php): failed to open stream: Operation not permitted in /var/www/vhosts/xxxxxx.com/httpdocs/rss2joomla.php on line 13
Fatal error: main(): Failed opening required 'RSS.php' (include_path='/usr/share/pear:/usr/share/pear/XML') in /var/www/vhosts/xxxxxx.com/httpdocs/rss2joomla.php on line 13
--------------------------------------------------
The thing is it's still complaing about open_basedir, but no friggin' value is even set for open_basedir in the /etc/php.ini. Where else is open_basedir configured for vhosts w/ plesk? Thanks!
Joe
jdames
Feb 20 2006, 02:57 PM
here's my php.ini include info:
-----------------------------------------
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
include_path = "/usr/share/pear:/usr/share/pear/XML"
-----------------------------------------
am I crazy, or this not the only file affecting php and the way it regards open_basedir?
jdames
Feb 20 2006, 03:21 PM
looks like my problem was open_basedir is set in the httpd.include which resides in the vhosts/xxx.com/conf/httpd.include . Once I added the pear dir to the include directive.... ta-da!
It works.
Thanks!
Joe
Squire
Feb 21 2006, 04:43 AM
http.include is going to get overwritten by Plesk often Joe. You'll want to use a vhost.conf file instead.
Lots of information about using vhost.conf both here and on the SWSoft site/forums.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.