Page 1 of 1

Fatal error! (not phpwcms)

Posted: Fri 4. Feb 2005, 20:24
by Gnolen
Yo guys,

I am making a site for a client with the new dev version but a lot of times this error comes up:

Code: Select all

Fatal error: session_start(): Failed to initialize storage module: user (path: /tmp) in /home/site/public_html/index.php on line 34
This is really strange?! Does anyone know why this occurs?

Thanks,

Gnolen

Posted: Fri 4. Feb 2005, 20:42
by pico
think that it is a Configuration Problem of the Server

it seem so that the tmp Directory does not exsist or there is a Right Problem so the Server has no Space to store the Session-Data

Posted: Fri 4. Feb 2005, 21:24
by Karla
It may be a "bug" in recent PHP versions:
http://bugs.php.net/bug.php?id=25876

Posted: Fri 4. Feb 2005, 21:47
by Gnolen
Thanks for the answers!

No, the tmp folder doesn't exist (if it should be in the root) /tmp. But if I remember the installation correctly then it says that tmp folder doesn't exists and Oliver says that it not needed anymore.

But this is apperently wrong...Must be a bug in phpwcms..

And...It does not happen all the time just sometimes, but enough.

Greetings from Gnolen

Posted: Fri 4. Feb 2005, 21:51
by Oliver Georgi
The /tmp folder of the server (not phpwcms) is not writable for the user (web account or web server). It's your server's setting!

Oliver

Posted: Fri 4. Feb 2005, 22:06
by Gnolen
Oh, so it is the servers /tmp that maybe screwed! But it is on chmod 700 (drwx-----), and this should be correct or not?

Hmmm, strange. Because it doesn't happen all the time! Does it help if I put cache off maybe?

Thanks

Greetings from Gnolen

Posted: Fri 4. Feb 2005, 22:29
by Oliver Georgi
Has nothing to do with cache ;-)

Maybe... ..check this:
http://www.subdreamer.com/forum/showthread.php?t=229

Oliver

Posted: Fri 4. Feb 2005, 23:12
by Gnolen
Thanks Oliver! So chmod 700 sounds alright then?

Damn these things when I have to bet the deadline on monday!

Greetings from Gnolen

Posted: Fri 4. Feb 2005, 23:44
by Gnolen
Changed it to chmod 777 and I think it works much better...So far no error message.

But is chmod 777 for tmp safe?

Posted: Sat 5. Feb 2005, 00:41
by Oliver Georgi
no - no good idea - or is it a windows system?

Oliver

Posted: Sat 5. Feb 2005, 01:08
by Gnolen
No it is a linux system...

But this seams to clear the problem thought! And I can see that there's some stat files in the tmp folder and it maybe needs 777 for this!

What is then safe for the tmp folder?

Thanks / Gnolen

Posted: Sat 5. Feb 2005, 08:26
by Oliver Georgi
the default value 700.

Now it is possible for anybody to list all files in /tmp - read session_vars from there and so on ;-)

Oliver

Posted: Mon 7. Feb 2005, 14:31
by Gnolen
Thanks!

It was indead a server error and not about phpwcms...And someone already changed the title...

Greetings / Gnolen

Posted: Thu 17. Mar 2005, 05:07
by brownc
Hello all

I was experiencing this error also:

Code: Select all

Fatal error: session_start(): Failed to initialize storage module
But simply could not fix, even after doing all suggested fixes. I have now remarked out

Code: Select all

//session_start(); 
in index.php

Now I'm wondering what functionality this will remove?, or if it will cause phpwcms to break somewhere else. i.e. I do not know what this comment in index.php refers to: "neccessary if frontend users are available". Maybe someone could explain?

Also, is there alternate way to store session variable seeing this is a little tricky, in database maybe?

Thanks in advance

Chris

phpwcms Version 1.2.1-DEV

php info:
PHP Version 4.3.4

session
Session Support enabled
Registered save handlers files user mm

Directive Local Value Master Value
session.auto_start Off Off
session.bug_compat_42 On On
session.bug_compat_warn On On
session.cache_expire 180 180
session.cache_limiter nocache nocache
session.cookie_domain no value no value
session.cookie_lifetime 0 0
session.cookie_path / /
session.cookie_secure Off Off
session.entropy_file no value no value
session.entropy_length 0 0
session.gc_divisor 100 100
session.gc_maxlifetime 2880 2880
session.gc_probability 1 1
session.name hashID PHPSESSID
session.referer_check no value no value
session.save_handler files files
session.save_path /tmp /tmp
session.serialize_handler php php
session.use_cookies On On
session.use_only_cookies Off Off
session.use_trans_sid On On

Posted: Sun 19. Jun 2005, 08:38
by jlbach
Hope it helps:

In http://bugs.php.net/bug.php?id=25876 there is a user who suggest to add this line before the session_start():

ini_set("session.save_handler", "files");

And seems that the error desappear...