open_basedir restriction problem

DA-Rff

Verified User
Joined
Dec 4, 2006
Messages
109
open_basedir restriction problem -SOLVED

on one of my sites I suddenly get this message:

Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(/var/tmp/) is not within the allowed path(s): (/home/admin/:/tmp:/usr/local/lib/php/) in /xxx/xxx/domains/xxx.nl/public_html/manager/includes/config.inc.php on line 60

Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: files (path: ) in /xxx/xxx/domains/xxx.nl/public_html/manager/includes/config.inc.php on line 60

Line 60 of that file says: session_start();

I have other sites which use same cms on this server that do not have this problem.

thanks for any help.
 
Last edited:
First, check that session.save_path is set to "/tmp" and not "/var/tmp" in the correct php.ini file. Then, check that the CMS doesn't call session_save_path() with the wrong path.
 
Hi tillo

phpinfo.php says php.ini in /usr/local/lib

I changed
; session.save_path = /tmp
to
session.save_path = /tmp

rebooted and phpinfo.php still says for session.save_path no value

Any more ideas?
 
tillo,

thanks for thinking along, but the cms does not specify the path.

Strange thing is that I have more than one site on this server that uses the same cms, and no problems on any of them.

How can I debug this?
 
For starters you may want to "grep -Ri session_save_path /home/username/domains/domain.example" for the concerned user and domain. If there is a call like that, check which variable is using and modify it accordingly. If not, try to modify the session.save_path line on every php.ini file in your system ("locate php.ini") and restart gracefully apache.
 
tillo thanks,

I made one step forward, I managed to set the session.save_path to /tmp

and that seems to sort out most php problems on this domain.

Only the cms now throws a totally blank page...
 
thanks,

issue fixed by doing reinstall of cms and restoring databases

looks like the cms corrupted itself during saving of changes by the cms.

thanks for thinking along

Oliver
 
Last edited:
Back
Top