LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   php error...openbasedir (https://www.linuxquestions.org/questions/linux-general-1/php-error-openbasedir-269354/)

chadi 12-22-2004 07:18 PM

php error...openbasedir
 
I get that when vieing http://xx.xx.35.138/~myusername/phpinfo.php
I've tested a few php files. Odd part is that it happens only to one account on the server but not the other (only 2 on the server total)

Centos 3.3
Cpanel 9.9.9 R-14
I've done an Apache Update in WHM using PHP 4.39 and all. Worked fine.

Warning: Unknown(): open_basedir restriction in effect. File(/home/outlet/public_html/phpinfo.php) is not within the allowed path(s): (/home/temple/:/usr/lib/php:/usr/local/lib/php:/tmp) in Unknown on line 0

Warning: Unknown(/home/outlet/public_html/phpinfo.php): failed to open stream: Operation not permitted in Unknown on line 0

Warning: Unknown(): open_basedir restriction in effect. File(/home/outlet/public_html/phpinfo.php) is not within the allowed path(s): (/home/temple/:/usr/lib/php:/usr/local/lib/php:/tmp) in Unknown on line 0

Warning: Unknown(/home/outlet/public_html/phpinfo.php): failed to open stream: Operation not permitted in Unknown on line 0

Warning: (null)(): Failed opening '/home/outlet/public_html/phpinfo.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in Unknown on line 0


Any ideas?

brettcave 12-25-2004 11:25 AM

There is a bug with PHP, which is triggered with certain permissions / configuration options while using relative pathing in php scripts.

A workaround is to edit your php scripts to use absolute pathing in your site (for example, instead of ../index.php, change it to /yoursite/index.php).

This appears to be happening only to virtual hosts which
do not have the admin flag open_basedir set.

Here is a patch to fix php:
http://cvs.php.net/diff.php/php4/mai....512.2.10&ty=u

release 4.3.5 of php will resolve this issue.


All times are GMT -5. The time now is 09:43 PM.