Bug #13182 Updated: session_start() can't create a _new_ session control file.
| From: | yohgaki@php.net | Date: | Thu, 20 Dec 2001 03:24:52 +0000 |
| Subject: | Bug #13182 Updated: session_start() can't create a _new_ session control file. | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-74499@lists.php.net to get a copy of this message | ||
ID: 13182
Updated by: yohgaki
Reported By: d99alu@efd.lth.se
Old Status: Open
Status: Feedback
Bug Type: Session related
Operating System: Solaris 7
PHP Version: 4.0.6
New Comment:
Please test with 4.1.0 and latest CVS snapshot.
CVS snapshot source can be found
http://snaps.php.net/
(No windows binary)
If you don't have problem with latest CVS snapshot,
you can close your bug report by yourself.
Please report the result. When you update your bug
report, do not forget updating PHP version also.
Thank you
--
Yasuo
Previous Comments:
------------------------------------------------------------------------
[2001-09-06 14:16:14] d99alu@efd.lth.se
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:d99alu@efd.lth.se
please reply!
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=13182&edit=1