php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4360 Session files empty
Submitted: 2000-05-09 15:43 UTC Modified: 2000-06-13 09:41 UTC
From: cortex at execpc dot com Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0 Release Candidate 1/2 OS: FreeBSD 4.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cortex at execpc dot com
New email:
PHP Version: OS:

 

 [2000-05-09 15:43 UTC] cortex at execpc dot com
/* The following script does not work.
 * $count is never incremented from page to page
 * Session files in /tmp are 0 bytes, yet
 * are read/writable by the Apache user!
 */
<?php
session_register("count");
$count++;
?>

<p>Been here <?php echo $count; ?> times.</p>

<p><a href="<?php echo $PHP_SELF; ?>?<?=SID?>">Continue</a></p>

/* End of script */

Configure command: './configure' '--enable-track-vars' '--with-apxs=/usr/local/sbin/apxs' '--enable-bcmath' '--with-ftp'
'--with-gd=/usr/local' '--with-gettext' '--with-ttf' '--with-mysql' '--with-config-file-path=/usr/local/etc' '--with-ldap'

## php.ini session portion ##
session.save_handler      = files
session.save_path         = /tmp
session.use_cookies       = 1
session.name              = PHPSESSID
session.auto_start        = 0
session.cookie_lifetime   = 0
session.cookie_path       = /
session.cookie_domain     =
session.serialize_handler = php
session.gc_probability    = 1
session.gc_maxlifetime    = 1440
session.referer_check     =
session.entropy_length    = 0
session.entropy_file      =
session.cache_limiter     = nocache
session.cache_expire      = 180

Running Apache 1.3.12+PHP4.0RC1+SSL
No other known PHP-related issues

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-11 00:47 UTC] cortex at execpc dot com
Seems to be related to <VirtualHost> paramaters in Apache's configuration file.  Commenting out my virtualhosts solved the problem.  Then, adding them back one at a time, the problem started happening as soon as I had more than two 'CustomLog' or 'ErrorLog' directives piping their information to an external program (Cronolog, http://www.ford-mason.co.uk/resources/cronolog).

So, now it looks like if I have more than two virtualhost log commands sending piping to external programs, PHP sessions stop working!!

Nothing else is acting strange on this machine.
 [2000-06-13 09:41 UTC] stas at cvs dot php dot net
Closed per user request. See comment below:

>     IIRC the problem was that Apache got an fd from open(2), then
>     the PHP module started and got the same fd again. The strange
>     thing was that Apache did not close the fd in the meantime.
>     It's probably a bug in FreeBSD, at least noone has reported
>     this problem on any other OS.
> 
>     - Sascha

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 12:01:29 2025 UTC