Fatal error! (not phpwcms)

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Gnolen
Posts: 158
Joined: Thu 11. Mar 2004, 11:34

Fatal error! (not phpwcms)

Post 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
User avatar
pico
Posts: 2595
Joined: Wed 28. Jul 2004, 18:04
Location: Frankfurt/M Germany
Contact:

Post 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
Lieber Gott gib mir Geduld - ABER BEEIL DICH
Horst - find me at Musiker-Board
Karla
Posts: 223
Joined: Tue 26. Oct 2004, 11:56

Post by Karla »

It may be a "bug" in recent PHP versions:
http://bugs.php.net/bug.php?id=25876
Gnolen
Posts: 158
Joined: Thu 11. Mar 2004, 11:34

Post 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
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Gnolen
Posts: 158
Joined: Thu 11. Mar 2004, 11:34

Post 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
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

Has nothing to do with cache ;-)

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

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Gnolen
Posts: 158
Joined: Thu 11. Mar 2004, 11:34

Post 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
Gnolen
Posts: 158
Joined: Thu 11. Mar 2004, 11:34

Post 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?
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post by Oliver Georgi »

no - no good idea - or is it a windows system?

Oliver
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Gnolen
Posts: 158
Joined: Thu 11. Mar 2004, 11:34

Post 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
User avatar
Oliver Georgi
Site Admin
Posts: 9900
Joined: Fri 3. Oct 2003, 22:22
Contact:

Post 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
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
Gnolen
Posts: 158
Joined: Thu 11. Mar 2004, 11:34

Post by Gnolen »

Thanks!

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

Greetings / Gnolen
brownc
Posts: 3
Joined: Mon 7. Feb 2005, 13:45
Location: Perth, Western Australia
Contact:

Post 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
jlbach
Posts: 18
Joined: Fri 1. Apr 2005, 12:50
Contact:

Post 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...
Post Reply