From: [EMAIL PROTECTED]
Operating system: Solaris 7
PHP version: 4.0.6
PHP Bug Type: Session related
Bug description: session_start() can't create a _new_ session control file.
We installed php 4.0.6 in a Roxen 2.1.625 web server on Solaris 7. Now we
have a problem with temporary session files. The session_start() command
will abort with the following error message:
Warning: open(/tmp/sess_e8771af1171a6cbdf51eebdba5199d25, O_RDWR) failed: m
(0) in [path/file.php] on line 78
Warning: open(/tmp/sess_e8771af1171a6cbdf51eebdba5199d25, O_RDWR) failed: m
(0) in Unknown on line 0
Warning: Failed to write session data (files). Please verify that the
current setting of session.save_path is correct (/tmp) in Unknown on line
0
The thing is that session.save_path is correct. It points to /tmp, where
the web server and php has write permissions. The session controller can
read and write existing files. The problem occurs only when session_start()
has to create a _new_ session control file.
If we use fopen(), we can read and write files in /tmp. If we create a file
with the name of the supposed session control file (sess_..., the name
stated in the error message from session_start()) with fopen() and then
reload the page, session_start() will execute correctly, using the file we
just created for it. Then php will access the file correctly, writing and
reading session variables just as it is supposed to.
So, again, the problem occurs only when session_start() has to create a
_new_ session control file. Shouldn't a file be created automatically if it
doesn't exist?
The only strange thing with the installation of PHP on Roxen was that no
binary file was created. We can't find the stand-alone program to execute
php files from the shell. This happened even though no error message was
given at the time of installation.
The roxen installation was made as the config script suggested.
Do you have a clue why this problem occurs?
What our research toold us is:
"If the 'open' is a system call, then this is the expected behavior.
You need to provide a O_CREAT (or O_APPEND, don't know which) that will
automatically create the file if it doesn't exist. Just providing
O_RDWR/RDONLY will not create the file, and will return an error if the
file doesn't exist.
This is the correct behavior for a POSIX open system call."
Best regards,
Andreas Lundgren
mailto:[EMAIL PROTECTED]
please reply!
--
Edit bug report at: http://bugs.php.net/?id=13182&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]