LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-22-2004, 07:18 PM   #1
chadi
Member
 
Registered: Aug 2004
Posts: 96

Rep: Reputation: 15
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?
 
Old 12-25-2004, 11:25 AM   #2
brettcave
LQ Newbie
 
Registered: Aug 2004
Location: Johannesburg, South Africa
Distribution: Mandrake, RH, Fedora
Posts: 22

Rep: Reputation: 15
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP parse error in config.inc.php.in Confusedious Linux - Software 2 11-03-2005 05:08 AM
PHP Error newuser455 Linux - Software 1 08-03-2005 12:54 PM
PHP error? jacksmash Programming 4 03-28-2004 09:33 PM
PHP error? Or MySQL error? DoobyWho Linux - General 5 04-09-2003 10:31 AM
php error TravisB Programming 4 06-26-2002 06:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration