Mike,
PHP 4.3.4 on Apache2, Mandrake 9.2.
I have my phpsession cookie set to expire in 14400 seconds (four hours) in my php.ini (I do
not want browser life cookies for this application). If I come back after 5
hours, and use any of my (very simple) php apps, I just get:
"An error occured while loading http://localhost/php-bin/rtt.php:
Connection to host localhost is broken"
That's in Konquerer, I think it's a generic error printed by Konquerer, not php. I can recreate the error in IE as well and it gives the generic IE error page.
In my apache error log I get:
[Mon Feb 23 21:58:48 2004] [notice] child pid 4555 exit signal Segmentation
fault (11)
This is all it takes to recreate the error (after the session expires):
<? session_start(); //take this out and the error goes away. print 'wefwef'; ?>
This is as consistent as the northern star, easy to recreate. I can set my expiration to 200 seconds and cause the error over and over... There's nothing unusual about either my php compile or my apache.
I've pretty much ruled out garbage collection because there's no activity at all during those five hours, so therefore no gc happens (and my gc probability is set to 1 anyway).
I need to insure that this doesn't keep happening on the production site or we have to bail out of php and go to something else,
please advise tia Mike
I've not heard of this. Have you looked on http://bugs.php.net? there seem to be several with segmentation faults and Apache httpd 2x and mentioning sessions, it may give you some ideas. The manual says that a session is not actually written until a $_SESSION variable is registered, even though session_start() is called. Do you still get the error if you register a variable e.g. $_SESSION['myvar'] = 'abc'; after session_start()?
I assume you are using Apache httpd in prefork rather than worker mode? (httpd 2 + php not yet prime time?).
Out of interest, from the ptt-bin part of your url, are you running this as cgi rather than a module?
I feel there must be something unusual about your set up, the fact that you are getting this fault. I've been doing a php development with php 4.3.3, Apache httpd 2.0.47 on Fedora Core 1 using sessions and not come across this. I've also used earlier versions without problems. I can understand the frustration, but if you feel that dropping php because of this is the right course of action then the phrase "throwing the baby out with the bath water" comes into my mind.
Sorry that I can't put my finger on the specific solution you need, but I hope that I have suggested some useful avenues for you to look into.
Let us know how you get on. HTH Chris