• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Sparatic session_start() Error

J

johnson4

Guest
Fatal error: session_start(): Failed to initialize storage module. in /home/httpd/vhosts/realstuf.ca/httpdocs/phpwebsite-0.9.1/core/Core.php on line 303

at www.realstuf.ca
and

Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time. in /home/httpd/vhosts/sleepcomfy.ca/httpdocs/open_session.php on line 3

at www.sleepcomfy.ca/admin.php

I get this error for no apparent reason, ever since I switched to Plesk.

Any insight?
 
Hmm, I am wondering if this is also related to the number of recent posts regarding Horde/IMP sessions being terminated quickly.

The only 2 references I can find to a possible solution are:

In /etc/php.ini, set: session.auto_start = 0
which should be the default on Plesk servers (all that I've checked anyways).

Memory allocation problems (PHP Bugs#26005). Try setting 'memory_limit' to a higher value (32M, 64M, ?)

Also, what version of PHP do you have installed??
 
I have PHP4

I couldn't find /etc/php.ini, could it be under a different directory?

We have the option to switch to C-panel quite cheaply, do you think that would help here?
 
Hmm, interesting. Do you actually have a directory '/home/tmp' ? The 'session.save_path' is set to that.
 
no I didn't have that directory (/home/tmp),
so I created it and now have this error,

Fatal error: session_start(): Failed to initialize storage module. in /home/httpd/vhosts/sleepcomfy.ca/httpdocs/open_session.php on line 4

(only sparaticaly) and it usually disappears after refreshing the page.

Should I redirect the session.save_path
to somewhere specific?

I really appriciate the help, I know very very little, and migrating to a new server system has been quite a headache.
Thanks again.
 
I believe that normally the /etc/php.ini file has the following as default for most 7.5.x installs on RH type systems:

session.save_path = /tmp

Then the question would be what other settings are different than 'normal' (if there is such a thing as normal).... :)

If you can't find /etc/php.ini, you will have to do a search to find the path for your system.

You did not give any details about your server, OS, Plesk version.... I am only intimately familiar with RedHat, so if you are using Suse, FreeBSD, or something other than RedHat type Linux, then I can give general advice, just not OS specifics....
 
Interestingly enough, while investigating this post, I found that my own osTicket installation was no longer working. What I eventually found was:

1. My /etc/php.ini file had random garbage entries

2. In my subdomain's vhost.conf file, somehow I had managed to specify a session.save_path referring to a mambo directory... (must have been drinking too much that night!)

Once I cleaned up the php.ini and removed the errant session.save_path, all my session problems went away... Doh!~
 
Our programmer suggested this work around, not a real cure maybe but it keeps the error from coming up in our clients faces.
It should be ok as the sites function properly after you refresh the page that gives the error
Added this string

error_reporting(0);
ini_set('session.save_handler', 'files');

to the problem file, in this case open_session.php
 
Back
Top