Code: Select all
Primary browser: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0Code: Select all
Version: php-4.2.3
System: Linux xxxxx.xxxxxxxxxxx 2.4.18-6mdk #1 Fri Mar 15 02:59:08 CET 2002 i686 unknown
Build Date: Sep 9 2002 23:20:47
Configure Command: './configure' '--with-mysql' '--with-zlib-dir=/usr/local/lib' '--with-png-dir=/usr/local/lib' '--with-gd' '--enable-gd-native-ttf' '--with-freetype-dir=/usr/local/lib' '--with-apxs=/usr/local/apache/bin/apxs'
Server API: Apache
Virtual Directory Support: disabledDescription of problem:
I have an invisible frame on my site that reloads periodically using javascript. It is included at the bottom.
Its task is to perform various things AND KEEP THE PHP-SESSION ALIVE.
After some minutes (I do not know exactly how many), the session, including the session variable $_SESSION['POLL_INTERVAL'], is
suddenly empty and the page starts to reload without delay, over and over again.
I ask myself, Why is the session unset? The page is really re-read from the server.
This "session died" experience occurs even though I am browsing the site.
Now what is wrong with my settings?
I included them below.
Someone help me out!
Code: Select all
My PHP install script:
**********
#!/bin/bash
#Unzip php:
uzut php-4.2.3.tar.gz
cd php-4.2.3/
./configure --with-zlib-dir=/usr/local/lib --with-png-dir=/usr/local/lib --with-gd --enable-gd-native-ttf --with-freetype-dir=/usr/local/lib --with-apxs=/usr/local/apache/bin/apxs
make
make install
cd ..
apachectl restart
**********
php.ini:
*****************
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 30
memory_limit = 8M
їSession]
session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 1
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_maxlifetime =
session.referer_check =
session.entropy_length = 0
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 1
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"
Apache httpd.conf:
*******************
Timeout 300
KeepAlive Off
MaxKeepAliveRequests 10
KeepAliveTimeout 15
MinSpareServers 1
MaxSpareServers 2
StartServers 1
MaxClients 150
MaxRequestsPerChild 0 # This was set to 100 before. I set it to 0 while looking for the cause of this problemMy faulty PHP script: CheckThings.php
******************************************
Code: Select all
<?php
// This page displays no information at all. In fact, it is intended to be run in a frame with zero height.
// It reloads periodically with a predefined interval.
// It performs several supervising tasks.
require_once $_SERVERї'DOCUMENT_ROOT']."/Includes/Globals.php";
// Among other things, Globals.php sends HTTP-headers to prevent caching.
//...Performing various things here...
$Action = "'CheckThings.php?time=".time()."'";
?>
<HTML>
<HEAD>
</HEAD>
<BODY OnLoad ="<? echo $UpdateMenuStr ?>" BGCOLOR="#bbbbbb">
<SCRIPT LANGUAGE=JAVASCRIPT>
function Reload(){
document.location=<?=$Action?>;
}
window.setTimeout("Reload()",<? echo intval($_SESSIONї'POLL_INTERVAL'])?>);
</SCRIPT>
</BODY></HTML>
?>