开发者

session didn't started

I've found an amazing problem. I today released a website which is based on MLM business. The whole day I test the website, but no errors found. But at night when I tried to login a member page I'm getting the below error:

[21-Sep-2011 13:30:36] PHP Warning:  session_start() [<a href='function.session-start'>function.session-start</a>]: open(/tmp/sess_44507540b8d51d06160a2856360692e6, 开发者_Python百科O_RDWR) failed: Permission denied (13) in /home/dashingb/public_html/sts/conf.php on line 3

I'm on shared host with apache server. I've no root access. How to solve the problem ? also above is showing WARNING, But when I try to open the login page it shows 500 error (http://dashingbird.com/sts/admin/)

my session starting method is as below:

<?php
if(! isset($_SESSION)){
session_start();
}
?>

Plus below error is getting:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@dashingbird.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at dashingbird.com Port 80

When I turned error_reporting(E_ALL), I just got the above warning (session warning). please help me..


Most likely PHP can't write out the session file to whatever directory is specified for the session save path. You can find out what that path is with session_save_path().

If you can't modify the permissions on that directory to allow writes by the webserver, you'll have to change the PHP configuration to point at a directory where it CAN read/write files. Or manually override it in each script with a session_save_path('/path/to/writeable/dir') before you call session_start().


It seems there is something wrong on the server. Generally on a shared host there is not musc you can do yourself. I would suggest emailing (or opening a ticket) your hosting support.

Its most likely some sort of permission issue.

Also the 500 error means something is wrong with server config, Mostly it is caused by some error in .htaccess file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜