Page 1 of 1
errors when uploading to web server
Posted: Tue Apr 20, 2004 6:12 am
by phppixel
hi!
im receiving these error messages
Fatal error: Failed to initialize session module in /www/clientweb/au/j/jetsafe.com.au/adminlogin.php on line 2
Warning: Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
im not printing code as i know i have missed something completely
my code works on the local apache server
the errors only come up with this function
session_start();
but obviously i need it!
any suggestions would be appreciated

Posted: Tue Apr 20, 2004 6:33 am
by JAM
The session module is bad (or not installed properly) in some way. I havn't seen this error before so I'm not completely sure on how to fix that.
If the module is bad, it's likely the reason of the second error/warning. However, a common pitfall is that the session directory actually do not exist.
You mention that you are uploading the page(s) to a webserver. You should contact the admin of that and politely provide the error messages and ask them to verify the issues. Last resort is to ask them to reinstall Apache I guess.
They also need to verify that the /tmp directory indeed is available for writing session files in.
Hope it helped some. If not, lets hope someone else have any more ideas to add...
Posted: Tue Apr 20, 2004 6:38 am
by magicrobotmonkey
I've had that before when I was doing a new install after an HD died and I thought I had it all set up and I was so proud but then I got the above error. Ahh! Didn't take me long to hunt it down, though... make sure your session.save_path is an actual location- it won't create a dir for you it will just give you an error! So look at /tmp/ and see if its there and if its not change session.save_path in php.ini to a location that actually exists!
Posted: Thu Apr 22, 2004 9:25 am
by phppixel
If anyone else has had this problem I have found an answer. See below.
From our web hosting provider:
-----------------------------------
It appears that you are trying to use file based session handling
(/tmp)according to the error you are receiving.
It is not possible to use file based sessions with PHP in our servers,
as we have load balancing. You will need to use a database session
handler instead, which you can find at
http://www.phpbuilder.com/
-------------------------------------
And a google for database session handlers directed us to:
http://www.phpbuilder.com/columns/ying20000602.php3
Read the article and download the ying20000602.zip file and follow the instructions within. Hope that helps others when they encounter this problem.
phppixel
