This is a discussion on problem with session_start() within the PHP Language forums, part of the PHP Programming Forums category; when I use the session_start() function at the top of my scripts I get 5 errors on the page If ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
when I use the session_start() function at the top of my scripts I get
5 errors on the page If anyone can help please do this has been a problem for a while and I cannot do much more work on my site without fixing this and getting the login system to work Here are the errors: At the TOP of the page I get the following three errors, Warning: session_start(): open(\sessiondata\sess_***, O_RDWR) failed: No such file or directory (2) in \header.php on line 2 Warning: session_start(): Cannot send session cookie - headers already sent by (output started at \header.php:2) in \header.php on line 2 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at \header.php:2) in \header.php on line 2 At the BOTTOM of the page I get two other errors, Warning: Unknown(): open(\sessiondata\sess_***, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (\sessiondata) in Unknown on line 0 |
|
|||
|
On 16 Apr 2005 08:16:15 -0700, "cowofchaos@gmail.com" <cowofchaos@gmail.com>
wrote: >when I use the session_start() function at the top of my scripts I get >5 errors on the page >If anyone can help please do this has been a problem for a while and I >cannot do much more work on my site without fixing this and getting the >login system to work > >Here are the errors: > >At the TOP of the page I get the following three errors, > >Warning: Unknown(): Failed to write session data (files). Please verify >that the current setting of session.save_path is correct (\sessiondata) >in Unknown on line 0 That's the key - your session.save_path is wrong. All the errors stem from PHP not being able to write session data to where you've specified. What operating system are you on? If Unix-based, the slash is the wrong way around. If Windows-based you haven't got a drive letter so it might be looking on the wrong drive. -- Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk> <http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool |
|
|||
|
On 16 Apr 2005 08:23:38 -0700, "cowofchaos@gmail.com" <cowofchaos@gmail.com>
wrote: >I'm on windows XP and I've checked the path its C:\PHP\sessiondata, I'm >going to double check it and make sure the folder exists now.. That's not what PHP is seeing though; you might want to reverse the slashes to c:/PHP/sessiondata, or add some quotes around it, or double up the \'s - Window's use of \ for a directory separate clashes nastily with \ as an escape character - but all the Windows system calls will accept Unix-style '/' as a separator as well. -- Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk> <http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool |