Sam Webb wrote:
I've installed Apache 2 and PHP 5 on Windows XP, and I'm having some
issues with sessions. Everything else I've tried to do in PHP works
fine, but for some reason every time I try to use session_start() i
get the following errors:
Warning: session_start() [function.session-start]:
open(C:\PHP\sessiondata\sess_29eb1a211c118cc8083168f24e32ee75, O_RDWR)
failed: No such file or directory (2) in C:\Program Files\Apache
Group\Apache2\htdocs\Games\main.php on line 3
C:\PHP\sessiondata\ does not exist or permissions don't allow whatever
user php5 is running under to write the session storage file.
create the dir and make sure the relevant user has write permissions.
if that doesn't work - please come back ;-)
Warning: session_start() [function.session-start]: Cannot send session
cookie - headers already sent by (output started at C:\Program
Files\Apache Group\Apache2\htdocs\Games\main.php:3) in C:\Program
Files\Apache Group\Apache2\htdocs\Games\main.php on line 3
Warning: session_start() [function.session-start]: Cannot send session
cache limiter - headers already sent (output started at C:\Program
Files\Apache Group\Apache2\htdocs\Games\main.php:3) in C:\Program
Files\Apache Group\Apache2\htdocs\Games\main.php on line 3
these 2 warnings merely state that the session could not be started - the reason
being that the first error caused php to send out output (i.e. the warning
about not being able to write the session storage file) which means headers
can no longer be sent for that request. if you fix the first error these will go
away too.
Any suggestions?
Sam
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php