ID: 25876 Updated by: [EMAIL PROTECTED] Reported By: golden at riscom dot com -Status: Bogus +Status: Open Bug Type: Session related Operating System: freebsd 4.8 PHP Version: 4.3.3 New Comment:
In the ext/session/mod_files.c inside the function PS_OPEN_FUNC(files) replace the next content: ------------------------------------------- if ((p = strchr(save_path, ';'))) { errno = 0; data->dirdepth = (size_t) strtol(save_path, NULL, 10); if (errno == ERANGE) { efree(data); PS_SET_MOD_DATA(0); return FAILURE; } save_path = p + 1; } ------------------------------------------- by this one: ------------------------------------------- if ((p = strrchr(save_path, ';'))) { data->dirdepth = (size_t)atol(save_path); save_path = p + 1; } ------------------------------------------- Compile again and try your scripts. The problem exists from old php versions, but in 4.3.4 was added the errno control to generate an error. Now the functionality is the correct one and never produce abnormal errors! Carlos Vilasis Faura & Javier Tacon Iglesias Previous Comments: ------------------------------------------------------------------------ [2004-02-23 22:20:17] evan dot leybourn at defence dot gov dot au I had the same problem trying to install Scout Portal Toolkit on Solaris. Check to make sure that in your php.ini file session.save_handler = files That worked for me. Good Luck ------------------------------------------------------------------------ [2004-02-23 17:37:10] aaron at serverlogistics dot com I am also experiencing this problem with Mac OS X and Apache 1.3.27 + PHP 4.3.4. Seems to happen randomly. I can restart Apache and it will go away for a while, but then comes back. I have each user using a different session save directory. I have double checked for proper permissions. This just started happening a couple of days ago. Nothing had changed (that I am aware of) that would cause this. ------------------------------------------------------------------------ [2004-02-20 21:42:44] [EMAIL PROTECTED] Apply this patch, run for awhile, then post updated logs of the error messages. Index: ext/session/mod_files.c =================================================================== RCS file: /repository/php-src/ext/session/mod_files.c,v retrieving revision 1.83.2.7 diff -u -r1.83.2.7 mod_files.c --- ext/session/mod_files.c 25 Sep 2003 14:53:58 -0000 1.83.2.7 +++ ext/session/mod_files.c 21 Feb 2004 02:49:05 -0000 @@ -239,6 +239,7 @@ errno = 0; data->dirdepth = (size_t) strtol(save_path, NULL, 10); if (errno == ERANGE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid save_path (%s)(%d)", save_path, strlen(save_path)); efree(data); PS_SET_MOD_DATA(0); return FAILURE; ------------------------------------------------------------------------ [2004-02-18 17:06:17] mitch at webcob dot com I'm also running FreeBSD 4.8 - same problem. My /tmp is on a separate partition, and has plenty of space... a restart (even a graceful one) seems to fix the problem. As a temp fix, I heard someone say that the sites they had using custom session storage handlers did NOT exhibit the problem, so I think I may try an auto-prepend file containing such an override on a server-wide basis. Any comment on this idea? Please copy my email. Thanks. ------------------------------------------------------------------------ [2004-02-18 11:18:59] bigrob at cox-internet dot com I'm having the same problems. FreeBSD 4.8, php 4.3.4. THIS IS GETTING VERY annoying. It quit doing it for a month, then almost to the exact day it just started up again this morning at 1AM and hasn't stoppd. Apache 2.0.47 as well. Restarting apache seems to do the trick for about a minute, then it starts popping up again. I've already had 20 customers call this morning saying they cannot place orders and they give me the error. I've check my apache access logs as well as the php log. I get this error several times: [18-Feb-2004 10:15:39] PHP Warning: Unknown(): A session is active. You cannot change the session module's ini settings at this time. in Unknown on line 0 Almost always following it is this srror: [18-Feb-2004 10:15:51] PHP Fatal error: session_start(): Failed to initialize storage module. in /mydir/myfile.php3 on line 2 All that is in myfile.php3 is session_start(); These errors started happening after moving to a new sever. NO PROBLEMS in the past, was using Apache 1.3.8 I believe and PHP 4.3.0. PHP People, WHAT ARE CAUSING THESE ERRORS???? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/25876 -- Edit this bug report at http://bugs.php.net/?id=25876&edit=1