Edit report at https://bugs.php.net/bug.php?id=25876&edit=1
ID: 25876
Comment by: okasion at gmail dot com
Reported by: golden at riscom dot com
Summary: session_start(): Failed to initialize storage module
Status: No Feedback
Type: Bug
Package: Session related
Operating System: freebsd 4.8
PHP Version: 4.3.9-4.3.10
Block user comment: N
Private report: N
New Comment:
Hi, I know this problem refers to FreeBSD minor to version 5.x and PHP minor to
version 5.x, but I want you guys to know that I solved this problem on FreeBSD
8.0 Release by uncommenting in your php.ini file:
session.save_path = "/tmp"
Previous Comments:
------------------------------------------------------------------------
[2011-07-12 03:19:24] shappen at gmail dot com
I still have this problem, when i use php5.3.6 and phpmyadmin3.4.3.1.
And i have changed the php.ini session.save_path configuration to "/tmp"
.
------------------------------------------------------------------------
[2011-03-03 12:18:10] comments at htmlcompressor dot com
If you are gettin the following error:
"Fatal error: session_start(): Failed to initialize storage module: files
(path: ) in...."
Make sure that you have setup the session save path in your php.ini:
session.save_path = "/tmp"
which seems to be disabled by default.
------------------------------------------------------------------------
[2009-11-05 13:32:03] gonzalo4 at gmail dot com
I have the same problem:
"Fatal error: session_start(): Failed to initialize storage module: files
(path: ) in...."
and i've put this line:
ini_set("session.save_handler", "files");
and nothing happens.
i'm using IIS 6.0 and PHP 5.2.11
------------------------------------------------------------------------
[2008-06-23 15:07:22] james at dunmore dot me dot uk
I use DB for sessions, and had the problem with session_destory (followed by
session_start) as well.
I had this code in a prepend-db file:
$GLOBALS["mysql_session_handler"] = new mysql_session_handler;
session_set_save_handler(
array($GLOBALS["mysql_session_handler"],'mysql_session_open'),
array($GLOBALS["mysql_session_handler"],'mysql_session_close'),
array($GLOBALS["mysql_session_handler"],'mysql_session_read'),
array($GLOBALS["mysql_session_handler"],'mysql_session_write'),
array($GLOBALS["mysql_session_handler"],'mysql_session_destroy'),
array($GLOBALS["mysql_session_handler"],'mysql_session_gc')
);
=====
So instead, I put that inside the class as a static function (the in the
prepend, called that static function, mysql_session_handler::setHandler();) ,
then called it again after session destroy. i.e.
session_destroy();
mysql_session_handler::setHandler();
Problem sovled - well, it's not, session_destroy should not destroy the save
handler
------------------------------------------------------------------------
[2008-04-02 06:37:29] webmaster at mindrabbit dot com
This bug is easy to repeat in following way:
1) Set session_save_handler to user based like DB
2) Start page like normal, start session etc
3) CHANGE your session_id BEFORE you print anything to your screen
3.1) Destroy the old session_id
3.2) set new session id with session_id('your_id')
3.3) Try start_session() which will produce error message
Problem is that system can not init custom session_save_handler in some odd
reason. When changing session_handler to local files, anything goes normal. But
with custom save handler like memcache or DB backend, code will fail.
When you refresh page, problem disappears.
I have tested this with Apache 2.2.8, PHP 5.2.5 and MySQL 5.1.23RC and with
newest memcache.
--JT--
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=25876
--
Edit this bug report at https://bugs.php.net/bug.php?id=25876&edit=1