[PHP] re:[PHP] 4.3.1 sessions not expiring / garbage collection not working

2003-04-04 Thread Barry Gould
Any other ideas on this?
Should I submit it to the bug system?
Thanks,
Barry
Date: Thu, 03 Apr 2003 13:25:16 -0800

Hi,

I'm having a problem where session files are not expiring or getting deleted.

I'm running RedHat 7.3 (which normally expires sessions fine).
I removed the RedHat PHP packages (rpm -e), and compiled and installed PHP 
4.3.1 from source.

 './configure' '--with-mysql' '--with-gd' '--with-zlib-dir=/usr/lib' 
'--with-apxs=/usr/sbin/apxs' '--with-config-file-path=/etc'

I'm using the php.ini-recommended, with ONLY the following changes:
display_errors = On
session.save_path = /tmp/php
session.auto_start = 1
session.entropy_length = 16
session.entropy_file = /dev/urandom
Following some documentation I found somewhere on php.net, I have the 
permissions on /tmp/php equal to 310:
ls -l /tmp
d-wx--x---2 apache   apache  17408 Apr  3 11:14 php

There are hundreds of files in there; many are over 1 week old.

I've just tried changing the permissions to 770 (drwxrwx---) and 
restarting apache; it doesn't seem to be making any difference.

apache is
apache-1.3.27-2
from RedHat's RPM
Any ideas would be appreciated.

Thank you,
Barry Gould
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] re:[PHP] 4.3.1 sessions not expiring / garbage collection not working

2003-04-04 Thread CPT John W. Holmes
How much traffic does this site get? Is it possible that the garbage
collection is just never triggered? What if you up the garbage collection
probability in your php.ini file to 100% (to trigger it with each session
start)? Do the files get removed then? I'm sure this isn't the problem, but
the OS must be able to track the last access time of the file in order for
garbage collection to work. I'm sure RedHat does that, but I'm just bringing
it up.

Can you write a simple PHP script to try and delete one of these files? Just
a one liner using ulink() would work. You could then see if PHP, running as
Apache, has any issues accessing these files.

---John Holmes...

- Original Message -
From: Barry Gould [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 04, 2003 2:10 PM
Subject: [PHP] re:[PHP] 4.3.1 sessions not expiring / garbage collection not
working


 Any other ideas on this?
 Should I submit it to the bug system?

 Thanks,
 Barry

 Date: Thu, 03 Apr 2003 13:25:16 -0800
 
 Hi,
 
 I'm having a problem where session files are not expiring or getting
deleted.
 
 I'm running RedHat 7.3 (which normally expires sessions fine).
 I removed the RedHat PHP packages (rpm -e), and compiled and installed
PHP
 4.3.1 from source.
 
   './configure' '--with-mysql' '--with-gd' '--with-zlib-dir=/usr/lib'
  '--with-apxs=/usr/sbin/apxs' '--with-config-file-path=/etc'
 
 I'm using the php.ini-recommended, with ONLY the following changes:
 display_errors = On
 session.save_path = /tmp/php
 session.auto_start = 1
 session.entropy_length = 16
 session.entropy_file = /dev/urandom
 
 Following some documentation I found somewhere on php.net, I have the
 permissions on /tmp/php equal to 310:
  ls -l /tmp
 d-wx--x---2 apache   apache  17408 Apr  3 11:14 php
 
 There are hundreds of files in there; many are over 1 week old.
 
 I've just tried changing the permissions to 770 (drwxrwx---) and
 restarting apache; it doesn't seem to be making any difference.
 
 apache is
 apache-1.3.27-2
 from RedHat's RPM
 
 Any ideas would be appreciated.
 
 Thank you,
 Barry Gould
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] re:[PHP] 4.3.1 sessions not expiring / garbage collection not working

2003-04-04 Thread Barry Gould
At 11:20 AM 4/4/2003, CPT John W. Holmes wrote:
How much traffic does this site get? Is it possible that the garbage
collection is just never triggered? What if you up the garbage collection
probability in your php.ini file to 100% (to trigger it with each session
start)? Do the files get removed then?
AHA!
That's it!
I thought the default was 1%, which should have been enough as I had 
several hundred session files there, but it was at 1/1000 or 0.1%

Thank you,
Barry
I'm sure this isn't the problem, but
the OS must be able to track the last access time of the file in order for
garbage collection to work. I'm sure RedHat does that, but I'm just bringing
it up.
Can you write a simple PHP script to try and delete one of these files? Just
a one liner using ulink() would work. You could then see if PHP, running as
Apache, has any issues accessing these files.
---John Holmes...

- Original Message -
From: Barry Gould [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 04, 2003 2:10 PM
Subject: [PHP] re:[PHP] 4.3.1 sessions not expiring / garbage collection not
working
 Any other ideas on this?
 Should I submit it to the bug system?

 Thanks,
 Barry

 Date: Thu, 03 Apr 2003 13:25:16 -0800
 
 Hi,
 
 I'm having a problem where session files are not expiring or getting
deleted.
 
 I'm running RedHat 7.3 (which normally expires sessions fine).
 I removed the RedHat PHP packages (rpm -e), and compiled and installed
PHP
 4.3.1 from source.
 
   './configure' '--with-mysql' '--with-gd' '--with-zlib-dir=/usr/lib'
  '--with-apxs=/usr/sbin/apxs' '--with-config-file-path=/etc'
 
 I'm using the php.ini-recommended, with ONLY the following changes:
 display_errors = On
 session.save_path = /tmp/php
 session.auto_start = 1
 session.entropy_length = 16
 session.entropy_file = /dev/urandom
 
 Following some documentation I found somewhere on php.net, I have the
 permissions on /tmp/php equal to 310:
  ls -l /tmp
 d-wx--x---2 apache   apache  17408 Apr  3 11:14 php
 
 There are hundreds of files in there; many are over 1 week old.
 
 I've just tried changing the permissions to 770 (drwxrwx---) and
 restarting apache; it doesn't seem to be making any difference.
 
 apache is
 apache-1.3.27-2
 from RedHat's RPM
 
 Any ideas would be appreciated.
 
 Thank you,
 Barry Gould
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php