Fatal error: session_start()

voider

Verified User
Joined
Feb 27, 2008
Messages
11
Location
europe
Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(/var/tmp/) is not within the allowed path(s): (/home/mysite/:/tmp:/usr/local/lib/php/) in /home/mysite/domains/mysite.com/public_html/index.php on line 4

Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: files (path: ) in /home/mysite/domains/mysite.com/public_html/index.php on line 4
 

gaw

Verified User
Joined
Apr 8, 2008
Messages
55
There is no simple answer to your question.

On the DA admin screen there is an item called "Safe Mode Settings" where you can turn php "Safe Mode" and "Base Dir" settings on or off. You should have one of those turned on, but depending on what you are trying to do, you may get better mileage with a Safe Mode restriction than with a BaseDir restriction. But most people do not - there are lots of kinky situations like source you can execute but not read, directories you can create but not access, etc....

If you want to continue with a BaseDir restriction you must by sure that the temp space you are using is within the restriction. Go to the DA Custom HTTPD screen and look at the bottom pane and look at the line that begins

php_admin_value open_basedir colon:separated:directories

That text is generated a line in the VHOST template that looks like this:

|?OPEN_BASEDIR_PATH=`HOME`/:colon:separated:directories|

From your error message, it looks like you have the default.

If this is a one domain problem, insert your own version of the above directive in the top level window. Observe the effect of the changes in the bottom pane after clicking Save. Note that custom code is inserted at the top of the generated config, so a direct override is not possible.

If this is a universal problem, go to the knowledge base and look up "Using a custom VirtualHost template" to see how to modify BaseDir setting the template and apply the changes to all domains.

Hope this helps...
 
Top