ID: 13182
Updated by: yohgaki
Reported By: [EMAIL PROTECTED]
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] [EMAIL PROTECTED]

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 this 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]

Reply via email to