...

View Full Version : PHP Error open_basedir restriction



Jagan
02-22-2004, 04:27 AM
We are facing this error

Warning: open_basedir restriction in effect. File is in wrong directory in /home/httpd/vhosts/domain.com/httpdocs/helplive/inc/header_mm.php on line 24

Warning: Cannot add header information - headers already sent by (output started at /home/httpd/vhosts/domain.com/httpdocs/helplive/inc/header_mm.php:24) in /home/httpd/vhosts/domain.com/httpdocs/helplive/inc/config.php on line 203

Warning: Cannot add header information - headers already sent by (output started at /home/httpd/vhosts/domain.com/httpdocs/helplive/inc/header_mm.php:24) in /home/httpd/vhosts/domain.com/httpdocs/helplive/inc/config.php on line 206

Warning: Cannot add header information - headers already sent by (output started at /home/httpd/vhosts/domain.com/httpdocs/helplive/inc/header_mm.php:24) in /home/httpd/vhosts/domain.com/httpdocs/helplive/inc/config.php on line 209



We have two servers

1 one dedicated on whicn php is 4.3.2 and the same script is running fine

2. we have VPS with plesk 6.0 and here php is 4.2.2 and we are facing above error

Above kind of error we are facing in most of php scripts wheb we contacted our vps provider they say this is script problem we said that when it is running on other dedicated sever why problem in your server(VPS). we told that we are getting same kind of error in lot of php scripts. we understadn some thing is to be done at server level not at domain level as on other dedicated server we are running all scripts fine

Can you guide what should be done at server level so that we should not face this error in most of domains

our registered globle is ON

missing-score
02-22-2004, 11:34 AM
can you not update the PHP version? Im no expert with servers but I have now managed to setup apache and updating PHP is almost just copying and pasting from what I can tell.

missing-score
02-22-2004, 11:36 AM
Also just like to point out to you that your signature is 5 lines long when the rules (http://www.codingforums.com/rules.htm) state it can be no more than 4 lines :)

firepages
02-22-2004, 11:44 AM
I assume on your VPS you should have access to the php.ini ? if so just disable open_basedir directive , else you will have to ask your provider to do so for you.

Jagan
02-22-2004, 01:57 PM
We contacted our server provider he says tell me the suggestion I will do it for you but he will charge 25USD for any modification so
please let me know what should we ask him to do either ask him to have new version on virtual private server or ask him modification in php.ini

firepages
02-22-2004, 02:11 PM
OK before you spend any $$
If its a VPS you should have access to your own php.ini [and should be able to modify it]

usually @ /usr/local/lib/php.ini but this can vary ,
do a find/locate and then

cat /usr/local/lib/php.ini

look for the open_basedir directive and see what it is set to , if it has no value then this is not the problem else post that value here ...or if you are feeling brave , backup the php.ini , comment out the directive , save and restart apache.

Jagan
02-23-2004, 06:44 AM
Dear firepages

Thanks for your support

we checked the php and found

open_basedir no value

well you can check the php here
http://www.megrihost.com/test.php

firepages
02-23-2004, 01:01 PM
Hi , the local value which is the value that your installation is using is ..

`/home/httpd/vhosts/megrihost.com/httpdocs:/tmp`

you need to add to this the absolute path to the files you are trying to include , e.g.

`/home/httpd/vhosts/megrihost.com/httpdocs:/tmp:/path/to/wherever/`

the colons : seperate the paths the same as with an include path



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum