NYCPHP Meetup

NYPHP.org

[nycphp-talk] Sessions help

Brian Pang bpang at bpang.com
Thu Sep 11 21:43:21 EDT 2003


even tho the errors are reporting an error with line 2, which would be
the $retStat = session_start(); line, make sure that there is NOTHING
above the opening <?php tag
no line, breaks, no spaces, nada, zip

I've never actually tried tying session_start() to a var. I usually just
stick it in there...

otherwise, it looks to me like php is trying to find the /tmp dir, which
is typical Un*x/linux, but the other file paths appear to be windows
file structure.

/tmp would be at the root of the filesystem, not a subdir of anything.

Is this a new server? Perhaps the configuration was wrong at install?
I think you can change the path to the tmp dir that sessions are stored
in via the php.ini file, but I'd have to look it up to be certain.




> This is a multi-part message in MIME format.
> 
> 
> When I execute the following code: 
> 
> -------------- 
> 
> <?php
> $retStat = session_start();
> echo "retStat is: $retStat";
> ?> 
> 
> -------------- 
> 
> I get the following error: 
> 
> -------------------------------- 
> 
> 
> Warning: session_start() [function.session-start]:
open(/tmp\sess_216759f1842cd310eb16bf6de9c5ad60, O_RDWR) failed: No such
file or directory (2) in c:\program files\apache
group\apache\htdocs\test\session1.php on line 2
> 
> Warning: session_start() [function.session-start]: Cannot send session
cookie - headers already sent by (output started at c:\program
files\apache group\apache\htdocs\test\session1.php:2) in c:\program
files\apache group\apache\htdocs\test\session1.php on line 2
> 
> Warning: session_start() [function.session-start]: Cannot send session
cache limiter - headers already sent (output started at c:\program
files\apache group\apache\htdocs\test\session1.php:2) in c:\program
files\apache group\apache\htdocs\test\session1.php on line 2
> retStat is: 1
> Warning: Unknown(): open(/tmp\sess_216759f1842cd310eb16bf6de9c5ad60,
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 (/tmp)
in Unknown on line 0
> ---------------------------- 
> 
> Do I interpret this as I am missing a /tmp directory? If so, what is
that a subdirectory of? 
> 
> Thanks, 
> 
> John 
> 
> ___________________________________________
> 
> John W. Markert
> 14 Joanna Way
> Kinnelon, NJ 07405
> Phone: (973)838-8956
> Cell: (201)788-1740
> Fax: (973)838-4561 
> email: markert at optonline.net
> 
> 






More information about the talk mailing list