ID:               25876
 Comment by:       ozone at sange dot fi
 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:

As suggested by mivox on Feb 12 in comments to bug 26038, which seems
to be a duplicate of this one, I added a line in my apache.conf:



php_value session.save_handler files



(source: http://bugs.php.net/bug.php?id=260389 )



After this I haven't seen any problems (running for a bit less than a
day), but it's hard to say whether it really helped.



Maybe there are still problems with the initialization of session
parameters when PHP is running as a module and the same code is used to
serve lots of requests.



For me the problems started when using FreeBSD 4-STABLE (4.8 I think,
or even earlier) with PHP 4.2.x and continued with PHP 4.3.x, but they
were very infrequent when using Apache 1.3. Upgrading to Apache 2 made
problems turn up much more often and users started complaining loudly.



I applied the patch from CVS that was supposed to fix the problem to
PHP 4.3.4 (from FreeBSD ports) but it didn't help. Of course that's not
quite the same as trying a recent snapshot, but other people have tried
that and it didn't help either.


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

[2004-02-27 10:30:37] bernoico at netcabo dot pt

I also have made the change you sugested and the problem continues...

You have to reopen this bug report.

Thanks.

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

[2004-02-27 08:49:34] php at lathwood dot co dot uk

We are having the same problem described in this bug report.



I have tried both the patch and two CVS versions of PHP, none of which
have solved this problem yet.



We are currently running php4-STABLE-200402261430 which still causes
the errors reported above, the only thing I can see that is wrong is:



PHP Fatal error:  session_start(): Failed to initialize storage module:
user (path: /tmp)



The storage module above is user but php.ini defines the storage module
as files which is what it should be and is being used.

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

[2004-02-26 05:44:15] zsubscriber at mail dot ru

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

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

[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

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

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