PeterJ
Posts: 90
|
| Posted: 07/30/2004, 3:36 AM |
|
I have a page in which users enter data. This is a restricted page as defined with the project. Unauthorised users will be re-directed.
This page timesout very quickly if the user has to look up information or simply anser the phone.
I have introduced this at the top of the php page:
$x = 15000;
ini_set(session.gc_maxlifetime, $x);
session_start();
Still the user finds himself redirected after a few minutes.
Can anyone advise me please so that I can give the user longer than a couple of minutes?
|
 |
 |
Zulu
Posts: 33
|
| Posted: 08/16/2004, 12:52 AM |
|
Can u help me rather?
I needed a similar picture like yours but in a worse position.
I tried to test your code in test php file and got the following error msg:
Notice: Use of undefined constant session - assumed 'session' in d:\inetpub\wwwroot\test.php on line 3
Notice: Use of undefined constant gc_maxlifetime - assumed 'gc_maxlifetime' in d:\inetpub\wwwroot\test.php on line 3
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at d:\inetpub\wwwroot\test.php:3) in d:\inetpub\wwwroot\test.php on line 4
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at d:\inetpub\wwwroot\test.php:3) in d:\inetpub\wwwroot\test.php on line 4
---------------
Can u pls help me correct this error. Pls note I working in PHP 4.3, MYSQL, MS-Windows 2000 adv server, IIS environment. I actually want a page to be expire in 30 seconds and before expiring I need to do some database updating. I also need to show the time remaining to expire on the page.
CAN U PLS HELP!
|
 |
 |
PeterJ
Posts: 90
|
| Posted: 08/16/2004, 9:52 AM |
|
Hello Zulu
gc_maxlifetime is set in your php.ini file
As for the count down, I would be tempted to use an uncomplicated Javascript countdown for the page before a forced redirect via meta-tag. Some would say clumbsy but it would work!
|
 |
 |
aradi
Posts: 66
|
| Posted: 08/16/2004, 11:18 AM |
|
Hi PeterJ,
Just put double quotes around :
$x = 15000;
ini_set("session.gc_maxlifetime", "$x");
you can check the value is set ,buy using echo
$a= ini_set("session.gc_maxlifetime", "");
echo $a;.
Using it without quotes returns the value set by php.ini.
|
 |
 |
PeterJ
Posts: 90
|
| Posted: 08/16/2004, 12:41 PM |
|
Many thanks aradi that will solve a headache or three!! 
- thanks again
P
|
 |
 |
Zulu
Posts: 33
|
| Posted: 08/16/2004, 1:23 PM |
|
Thanks Peter. Yes I guess I would rather use the javascripts to show the countdown.
Another thing, is it possible to call J functions from PHP and vice versa within codecharge?
Thanks in advance
|
 |
 |
PeterJ
Posts: 90
|
| Posted: 08/17/2004, 10:05 PM |
|
Hi Zulu
Truthfully I'm not sure I can answer that with confidence but I guess so given the versitility of the package. I would suggest a quick email to the support address for a quick response.
P
|
 |
 |
bronkie
|
| Posted: 09/02/2004, 9:46 AM |
|
Quote aradi:
Hi PeterJ,
Just put double quotes around :
$x = 15000;
ini_set("session.gc_maxlifetime", "$x");
you can check the value is set ,buy using echo
$a= ini_set("session.gc_maxlifetime", "");
echo $a;.
Using it without quotes returns the value set by php.ini.
that $x, is it in minutes or seconds?
|
|
|
 |
aradi
Posts: 66
|
| Posted: 09/02/2004, 10:52 AM |
|
Hi,
Seconds
|
 |
 |