ID: 13182 User updated by: [EMAIL PROTECTED] Old Summary: session_start() can't create a _new_ session control file. Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Session related Operating System: Solaris 7 PHP Version: 4.1.1 New Comment:
We sloved the problem in out system by saving the session data in the mySQL-databas. That is at least a way to avoid the problem. best regards, Andreas Lundgren Previous Comments: ------------------------------------------------------------------------ [2002-01-15 03:37:51] [EMAIL PROTECTED] Version update. ------------------------------------------------------------------------ [2002-01-15 03:34:49] [EMAIL PROTECTED] Got feedback from a user. -- feedback from [EMAIL PROTECTED] -- Hello, I was hoping you could re-open PHP-BUG #13182. I have completed a test in 4.1.1 and receive the same error. I have also attempted to compile a snapshot from CVS but the build failed so I will have to tweak it and get back to you on that. As for this bug, I am attaching the error on top of a phpinfo() page. I originally tried it in 4.0.6 or some older release. The only configure params, as you can see, are the Roxen location and the Sybase location (for Sybase support). I have tested this application from 4.0.0 on in Apache on Win2000, Solaris 7 and Solaris 8. I have tested it with 4.0.6 on Roxen with Solaris 7. So the difference here (and I have really tried to bring the configs as close as possible) seems to be the Solaris 7 vs 8. I will try and gather more information but would appreciate the bug being reopened as I feel it is reproducible. Regards, Sam Cooley __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ 4.1.1 OUTPUT ----- --------------------------------------------------------------------- Warning: open(/opt/www/cgi-bin/blahapp/conf/sess_9265832f97f81fa3ad1ee1bcc7bd4de7, O_RDWR) failed: Error 0 (0) in /opt/www/cgi-bin/blahapp/php/blahapp_init.phtml on line 37 PHP Version 4.1.1 System SunOS www.blah.com 5.8 Generic_108528-05 sun4u sparc SUNW,Ultra-80 Build Date Jan 15 2002 Configure Command './configure' '--with-sybase=/opt/sybase/SQL/current' '--with-roxen=/opt/roxen/server' Server API Roxen Virtual Directory Support disabled Configuration File (php.ini) Path /usr/local/lib/php.ini ZEND_DEBUG disabled Thread Safety disabled This program makes use of the Zend Scripting Language Engine: Zend Engine v1.1.1, Copyright (c) 1998-2001 Zend Technologies -------------------------------------------------------------------------------- PHP 4.0 Credits -------------------------------------------------------------------------------- Configuration PHP Core Directive Local Value Master Value allow_call_time_pass_reference On On allow_url_fopen 1 1 always_populate_raw_post_data 0 0 arg_separator.input & & arg_separator.output & & asp_tags Off Off auto_append_file no value no value auto_prepend_file no value no value browscap no value no value default_charset no value no value default_mimetype text/html text/html define_syslog_variables Off Off disable_functions no value no value display_errors On On display_startup_errors Off Off doc_root no value no value enable_dl On On error_append_string no value no value error_log no value no value error_prepend_string no value no value error_reporting 2039 2039 expose_php On On extension_dir ./ ./ file_uploads 1 1 gpc_order GPC GPC highlight.bg #FFFFFF #FFFFFF highlight.comment #FF9900 #FF9900 highlight.default #0000CC #0000CC highlight.html #000000 #000000 highlight.keyword #006600 #006600 highlight.string #CC0000 #CC0000 html_errors On On ignore_user_abort Off Off implicit_flush Off Off include_path .:/usr/local/lib/php .:/usr/local/lib/php log_errors Off Off magic_quotes_gpc On On magic_quotes_runtime Off Off magic_quotes_sybase Off Off max_execution_time 30 30 open_basedir no value no value output_buffering no value no value output_handler no value no value post_max_size 8M 8M precision 14 14 register_argc_argv On On register_globals Off Off safe_mode Off Off safe_mode_exec_dir no value no value safe_mode_gid Off Off safe_mode_include_dir no value no value sendmail_from [EMAIL PROTECTED] [EMAIL PROTECTED] sendmail_path /usr/lib/sendmail -t -i /usr/lib/sendmail -t -i short_open_tag On On SMTP localhost localhost sql.safe_mode Off Off track_errors Off Off upload_max_filesize 2M 2M upload_tmp_dir no value no value user_dir no value no value variables_order EGPCS EGPCS xmlrpc_error_number 0 0 xmlrpc_errors Off Off y2k_compliance Off Off xml XML Support active XML Namespace Support active EXPAT Version 1.95.2 sybase Sybase Support enabled Allow Persistent Links Yes Persistent Links 0/unlimited Total Links 0/unlimited Application Name PHP 4.0 Client API Version Sybase DB-Library/12.0/P/SPARC/Solaris 2.5.1/1/OPT/Sat Sep 25 21:02:07 1999 standard Regex Library Bundled library enabled Dynamic Library Support enabled Path to sendmail /usr/lib/sendmail -t -i Directive Local Value Master Value assert.active 1 1 assert.bail 0 0 assert.callback no value no value assert.quiet_eval 0 0 assert.warning 1 1 safe_mode_allowed_env_vars PHP_ PHP_ safe_mode_protected_env_vars LD_LIBRARY_PATH LD_LIBRARY_PATH session.use_trans_sid 1 1 session Session Support enabled Directive Local Value Master Value session.auto_start Off Off session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_secure Off Off session.entropy_file no value no value session.entropy_length 0 0 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path /opt/www/cgi-bin/blahapp/conf /opt/www/cgi-bin/blahapp/conf session.serialize_handler php php session.use_cookies On On posix Revision $Revision: 1.33.2.1 $ pcre PCRE (Perl Compatible Regular Expressions) Support enabled PCRE Library Version 3.4 22-Aug-2000 mysql MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version 3.23.39 MYSQL_MODULE_TYPE builtin MYSQL_SOCKET /tmp/mysql.sock MYSQL_INCLUDE MYSQL_LIBS Directive Local Value Master Value mysql.allow_persistent On On mysql.default_host no value no value mysql.default_password no value no value mysql.default_port no value no value mysql.default_socket no value no value mysql.default_user no value no value mysql.max_links Unlimited Unlimited mysql.max_persistent Unlimited Unlimited Roxen SAPI module version $Id: roxen.c,v 1.47.2.1 2001/10/12 11:56:37 ssb Exp $ Additional Modules Environment Variable Value CLASSPATH java/classes/servlet.jar:java/classes/roxen_servlet.jar:java/classes/roxen_module.jar:java/classes DISPLAY idonex:0 HOME /export/home/demo JREHOME /usr/java1.2/jre LD_LIBRARY_PATH /opt/sybase/SQL/current/ASE-12_0/lib:/opt/sybase/SQL/current/OCS-12_0/lib:/opt/sybase/SQL/current/OCS-12_0/devlib:/usr/java1.2/jre/lib/sparc:/opt/sybase/SQL/current/lib LOGNAME demo MAIL /var/mail/demo PATH /usr/sbin:/usr/bin PS1 # PWD /etc/rc3.d SHELL /bin/csh SSH_CLIENT 193.45.251.45 1015 22 SSH_TTY /dev/pts/2 SYBASE /opt/sybase/SQL/current TERM xterm TZ MET USER demo PHP Variables Variable Value PHP_SELF /php/blahapp.phtml _COOKIE["PHPSESSID"] 9265832f97f81fa3ad1ee1bcc7bd4de7 _SERVER["argv"] Array ( ) _SERVER["argc"] 0 _ENV["CLASSPATH"] java/classes/servlet.jar:java/classes/roxen_servlet.jar:java/classes/roxen_module.jar:java/classes _ENV["DISPLAY"] idonex:0 _ENV["HOME"] /export/home/demo _ENV["JREHOME"] /usr/java1.2/jre _ENV["LD_LIBRARY_PATH"] /opt/sybase/SQL/current/ASE-12_0/lib:/opt/sybase/SQL/current/OCS-12_0/lib:/opt/sybase/SQL/current/OCS-12_0/devlib:/usr/java1.2/jre/lib/sparc:/opt/sybase/SQL/current/lib _ENV["LOGNAME"] demo _ENV["MAIL"] /var/mail/demo _ENV["PATH"] /usr/sbin:/usr/bin _ENV["PS1"] # _ENV["PWD"] /etc/rc3.d _ENV["SHELL"] /bin/csh _ENV["SSH_CLIENT"] 193.45.251.45 1015 22 _ENV["SSH_TTY"] /dev/pts/2 _ENV["SYBASE"] /opt/sybase/SQL/current _ENV["TERM"] xterm _ENV["TZ"] MET _ENV["USER"] demo PHP License This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact [EMAIL PROTECTED] 4.latest-20020114 OUTPUT ----- --------------------------------------------------------------------- ------------------------------------------------------------------------ [2002-01-09 02:07:29] [EMAIL PROTECTED] No feedback. Closing. ------------------------------------------------------------------------ [2001-12-19 22:24:52] [EMAIL PROTECTED] 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 ------------------------------------------------------------------------ [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]