[error] PHP Fatal error: session_start(): Failed to initialize storage module

Miquel

Member
Jan 19, 2004
12
0
151
The Netherlands
PHP session error

anton_latvia said:
We are getting the same error for the last few days-weeks. Although it is not permanent and most pages are working, just sometimes it breaks. Permissions and everything other are ok. We also have upgraded Apache recently. Any ideas?
Add the following line to your PHP script before you start your session:
Code:
ini_set('session.save_handler', 'files');
session_start();
I found out that this error is caused by webservers using Squirrelmail.
 

oderland

Well-Known Member
PartnerNOC
Dec 30, 2002
103
0
166
Kungsbacka, Sweden
try to run following on RH7-9
up2date -f libxml2 libxml2-devel

or feodorar/rhe/centos
yum install libxml2 libxml2-devel

it fixed it for me, found some message about that on webhosting talk a while ago
 

ricardom

Active Member
Mar 10, 2004
31
0
156
group and file owner

As i can see in the ls -la /tmp, the session files are being created by the user and group nobody, and before the upgrade of the php to 4.4.0 this files seens to be created by the real user of the site, in my understanding that is giving this trouble for us guys.

I will try to compile php and apache with phpsuexec to see if this issue can get solved, ill return with the results.
 

ricardom

Active Member
Mar 10, 2004
31
0
156
ricardom said:
As i can see in the ls -la /tmp, the session files are being created by the user and group nobody, and before the upgrade of the php to 4.4.0 this files seens to be created by the real user of the site, in my understanding that is giving this trouble for us guys.

I will try to compile php and apache with phpsuexec to see if this issue can get solved, ill return with the results.
No sucess!

Ill downgrade to the 4.3.1 now.
 

ricardom

Active Member
Mar 10, 2004
31
0
156
ricardom said:
No sucess!

Ill downgrade to the 4.3.1 now.
Everything is ok now in the sites, so i must think that this is a bug or some issue in the 4.4.0 version of the php.
 

Miquel

Member
Jan 19, 2004
12
0
151
The Netherlands
php_flag register_globals on

I run PHP/4.3.11 on FreeBSD and still have this issue which I solved with the following solution:

added a .htaccess file in the public_html directory of the cpanel3-skel rootdir from the reseller account. In .htaccess I added the following line:

Code:
php_flag register_globals on
Now every new account automatically gets this .htaccess file with the right php settings. I use this for several months now and it works. However, I know it's not the right solution but since php admitted it's a bug in their programming it's a good alternative.
 
Last edited:

Shazan

Active Member
Aug 31, 2002
27
5
153
I had this problem with PHP 4.4.0. After downgrading it to 4.3.11 it went away...
 

Shazan

Active Member
Aug 31, 2002
27
5
153
Unfortunately I was wrong... it worked for a while but now the error appears again...
 

Shazan

Active Member
Aug 31, 2002
27
5
153
For everyone that is experiencing the problem, could you post the result of:

lsof | wc -l

and

sysctl -a | grep fs.file-max

?

I believe it could be connected to the open files in the system.
 

HostIt

Well-Known Member
Feb 22, 2003
151
1
168
ezztro said:
Hello,

same Prob since 4 Days.
PHP 4.3.11 and the last cPanel Release
I would suggest at least upgrading to PHP 4.4.0, as you're using a very outdated version.
 

anton_latvia

Well-Known Member
PartnerNOC
May 11, 2004
410
17
168
Latvia
cPanel Access Level
Root Administrator
We have found simple solution that works for us:
chown nobody.nobody /tmp

(We have this problem with PHP 4.3.10 and it doesn't look like they (PHP) did anything in 4.4.0, at least according to changelog)
 

ezztro

Well-Known Member
Nov 11, 2003
148
0
166
HostIt said:
I would suggest at least upgrading to PHP 4.4.0, as you're using a very outdated version.
This is not the prob.

Same Error with 4.4.0

/tmp is nobody:nobody and 777
 

bjarne

Well-Known Member
Mar 23, 2002
135
0
316
Miquel said:
I run PHP/4.3.11 on FreeBSD and still have this issue which I solved with the following solution:

added a .htaccess file in the public_html directory of the cpanel3-skel rootdir from the reseller account. In .htaccess I added the following line:

Code:
php_flag register_globals on
Now every new account automatically gets this .htaccess file with the right php settings. I use this for several months now and it works. However, I know it's not the right solution but since php admitted it's a bug in their programming it's a good alternative.

Why not just put register_globals on i php.ini?
 

FijianTribe

Well-Known Member
Jan 30, 2003
69
0
156
I was having this same issue, do not know why. I've also been having troubles rebuilding Apache from WHM. I had to replace the .htaccess file with an older one that was named .htaccess.11... something.
 

Miquel

Member
Jan 19, 2004
12
0
151
The Netherlands
bjarne said:
Why not just put register_globals on i php.ini?
Because setting this on is a wellknown security risk. The safest way to program PHP is to set it off and program without register_globals. I found it somewhere a while ago on www.php.net. If you want to know more about this I suggest to search for it on www.php.net

In short: With register_globals on it means that variables used in the script can be manipulated from de browsers-adressbar resulting in unwanted output or when someone is really smart or lucky he might find a way to log into members-areas.
 
Last edited: