ID:               25876
 Comment by:       zsubscriber at mail dot ru
 Reported By:      golden at riscom dot com
 Status:           Closed
 Bug Type:         Session related
 Operating System: freebsd 4.8
 PHP Version:      4.3.3
 New Comment:

I have such problem, but I tried to solve this by installing older
version of PHP. This problem persist and error appears in random time
and for all sites which using session modules. I have two questions:
Does this patch fully solving the problem or just stop generating fatal
error? Does php.ini settings affects to this error?



P.S. Sorry for my spelling


Previous Comments:
------------------------------------------------------------------------

[2004-02-24 11:56:34] [EMAIL PROTECTED]

This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------

[2004-02-24 05:16:45] [EMAIL PROTECTED]

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

------------------------------------------------------------------------

[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;



------------------------------------------------------------------------

[2003-10-17 04:39:19] golden at riscom dot com

/tmp is not a separate partition

/dev/da0s1a   4.7G   133M   4.2G     3%    /

------------------------------------------------------------------------

[2003-10-17 04:37:05] golden at riscom dot com

-bash-2.05b$ ls -l

drwxrwxrwt   4 root  wheel     2048 Oct 17 11:37 tmp

------------------------------------------------------------------------

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

Reply via email to