Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 05:08:24 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155544 Posts in 21714 Topics by 7736 Members
Latest Member: chris85
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: "Failed to initialize storage module"  (Read 8064 times)
DrunkMoose

Offline Offline

Posts: 53


« on: December 28, 2005, 04:08:16 AM »


Hi!

This is what I get, randomly, periodicaly and can last for a very long time sometimes

Code:
Fatal error: session_start(): Failed to initialize storage module: user (path: /tmp) in /home/my_dir/public_html/framework/initialize.php on line 57

Is this PHP, WB or server load related or all of the three? I did a search in the forums/tickets and didn't find anything. Any quick fix for this one?

(session.save_handle r is set to "files" by the way)

Logged
pcwacht
Guest
« Reply #1 on: December 28, 2005, 01:22:25 PM »

Google says it is a php bug

http://www.google.com/search?hl=us&q=Failed+to+initialize+storage+module&btnG=Google+zoeken&meta=


http://bugs.php.net/bug.php?id=25876

John
Logged
DrunkMoose

Offline Offline

Posts: 53


« Reply #2 on: December 28, 2005, 04:12:54 PM »


Yea, I guess it's also related with php.

But I mean, there's a wadload of php site out there that don't have this error at all. So I guess there must be a fix...

Logged
danielneamu

Offline Offline

Posts: 1


WWW
« Reply #3 on: March 06, 2006, 09:32:09 PM »

try to setup a writable /tmp folder in your WebsiteBaker folder. i did and never got this error again
Logged
flyingflee

Offline Offline

Posts: 2


WWW
« Reply #4 on: April 02, 2006, 05:16:28 AM »

Has anyone come up with a fix for this problem yet? tried last suggestion creating tmp folder and it didn't work.
Logged
learning

Offline Offline

Posts: 61


« Reply #5 on: June 08, 2006, 01:55:57 PM »

Virgin Baker here.. so go easy  wink

Love website baker, and have it running fine on one server, but .. I am getting this error while trying to install on another server.

Code:
Fatal error: session_start(): Failed to initialize storage module: user (path: /tmp) in /clientdata/www/au/t/mydomain/wb/framework/initialize.php on line 57

I have tried the suggestions here of creating a writable /tmp folder... but the same thing happens.

I did some googling and came up with the fact it may be a problem with my host, but I don't know where to look to fix it.

This piece of advice from a google search help in a small way, I was able to bring up the install page after doing this.. but couldn't go any further without the error coming up.

Quote
I struggled for several days with the "Failed to initialize storage
module: user" problem.  I read everything I could find on php.net and in
this bug database.  Finally, what solved the problem for me was this:

Whenever I made a call in my code to session_start(), I used an include
statement to include the following from an include file:

<?php
ini_set("session.save_handle r", "files");
session_start();
?>

And that did it.

Any help would be greatly appreciated... I really really want to get website baker working on this site too.  grin
Logged
pcwacht
Guest
« Reply #6 on: June 08, 2006, 02:25:35 PM »

This error is surely server related, ie the way all is installed on the server where apache (php) runs

Could be amultitude of things

Mostly it is poor writing rights in /tmp (not your html dir, but filesystems!!)
Allso seen some cases where the temp dir wasn't /tmp but something else (allso not enough permissions on it)



What did your isp answer on this issue?

Code:
<?php
ini_set
("session.save_handler""files");
session_start();
?>
All this does is overriding a setting in php.ini. If the server is good configered this should be in the php.ini so there is no need to overide it anymore Wink


John

Logged
learning

Offline Offline

Posts: 61


« Reply #7 on: June 08, 2006, 11:32:58 PM »


Thanks.

Yep was thinking it had something to do with my server/host. I will be asking them today what they think the solution is, but I don't like my chances  angry I have come across a few people having the same problems with this particular server/host.

Me thinks I might be looking for new hosting.. will get back to you if I have any joy.
Logged
pcwacht
Guest
« Reply #8 on: June 08, 2006, 11:51:23 PM »

Is is merely a matter of changing php.ini and or creating /tmp with the correct permissions and a restart of apache (when they run linux that is) and thats all

So don't give your hope up
Let them read what is written here Wink

John
Logged
learning

Offline Offline

Posts: 61


« Reply #9 on: June 09, 2006, 01:20:00 AM »

Is is merely a matter of changing php.ini and or creating /tmp with the correct permissions and a restart of apache (when they run linux that is) and thats all

So don't give your hope up
Let them read what is written here Wink

John

Thanks John

Please forgive my total ignorance... but who needs to change that?

The host has said something about session handling needing to be set to 'files' instead of 'user'.... any idea how and where that is done?

I am not a coder by any means, I am more an uploader and yay it works kinda gal... so I can be easily lost when people talk code to me.... lol  embarassed

Thanks for your help  smiley
« Last Edit: June 09, 2006, 01:21:49 AM by learning » Logged
learning

Offline Offline

Posts: 61


« Reply #10 on: June 09, 2006, 04:47:02 AM »

Right... so the host got back to me, this is the solution apparently.

Quote
File Based Session Handling
For File Based session handling, you will be required to change the
session save path from /tmp to your home directory. Your home directory
is the absolute server path to your hosting space on our servers.

Note: To get the full server path to your domain, use the syntax:
/clientdata/www/last-part-of-your-domain/first-letter-of-your-domain/your-domain/

e.g. domain netregistry.com.au will have a server path:
/clientdata/www/au/n/netregistry.com.au/
or domain netregistry.com will have a server path:
/clientdata/www/com/n/netregistry.com/

Also, note that by default, session.save_handle r is set to "user", this needs to be changed to "files". This needs to be changed in your code.

For further information, view: http://au.php.net/manual/en/function.ini-set.php

If the session.save_handle r is set to "user", you will see an error on the screen, which will look something like this:

Fatal error: session_start(): Failed to initialize storage module: user (path: /clientdata/www/au/e/example.com/) in /clientdata/www/au/e/example.com/file.php on line XX

This is because you are trying to use "user" mode, rather than "files".

The below should be added to your file:

ini_set("session.save_handle r", "files");
session_save_path ("path_to_temp_dir/");

Where path_to_temp_dir/ is the full server path mentioned earlier.


So guess my question is... any clues as to what files in WB I would need to edit these things in?

Cheers
Logged
kiwipete

Offline Offline

Posts: 8


« Reply #11 on: April 13, 2007, 01:53:10 AM »

Had this problem with a new install of 2.6.5. (Not that I believe it is a WB issue, but rather a server/php issue).

I ran into it straight away when I tried to install WB.

Solved it as follows:

1. created a "/tmp" directory in my WebsiteBaker installation and made sure it was word-writeable.

2. modified the index.php file in the install directory as follows:

just before it tries to start a session on line 29, inserted code:

Code:
*/
ini_set("session.save_path", "/home/strategy/public_html/portfoliowatch/tmp");
ini_set("session.save_handler","files");
ini_set("session.use_cookies","1");

Obviously, the path that you see in the first line needs to modified to correspond with your path.

This solved the installation problem.

I then ran into it again when trying to login as admin or trying to view the site normally.

To fix that, modify the file "initialize.php" file in the framework folder in the same manner. The session gets started on line number 54, so just insert the same code just above it.

Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!