Hi NG,
I have my own apache server 2.0.54 running with php 4.3.10.
I got a little logical problem here about http requests.
I have written a small php script which waits for x seconds. Every
second it appends the seconds to a file.
I expected a timeout after 300 seconds, becouse apache is configured
like that. But until now it doesn't matter. I can wait for more than 5
minutes and the script finishes i see the result page.
Why my browser doesn't get a timeout. Which part is responsible for a
timeout???
One said that it is configurable over the directive max-execution-time
in php.ini. BUT this one is set to 30 seconds. The timeout directive in
httpd.conf is 300 seconds.
One apache group user said, that maybe the max-execution-time of
php.ini maybe only applies to CPU time (non-sleeping).
How I can prevent scripts of running endless??? Which parts are
responsible?
Here the code:
<?php
// All print functions do not show up on the screen until it is
finished
print 'Now we wait<br>';
for($i = 1; $i <= 360; ++$i) {
sleep(1);
print "$i<br>";
$handle = fopen('test.dat ', "a");
fwrite($handle, $i . "\n");
fclose($handle) ;
}
print '<br><br>End... <br>';
?>
Thanks... 2 9599
On 18.11.2005 11:37, hakim wrote: Hi NG,
I have my own apache server 2.0.54 running with php 4.3.10.
I got a little logical problem here about http requests.
I have written a small php script which waits for x seconds. Every second it appends the seconds to a file.
I expected a timeout after 300 seconds, becouse apache is configured like that. But until now it doesn't matter. I can wait for more than 5 minutes and the script finishes i see the result page.
Why my browser doesn't get a timeout. Which part is responsible for a timeout???
One said that it is configurable over the directive max-execution-time in php.ini. BUT this one is set to 30 seconds. The timeout directive in httpd.conf is 300 seconds.
One apache group user said, that maybe the max-execution-time of php.ini maybe only applies to CPU time (non-sleeping).
How I can prevent scripts of running endless??? Which parts are responsible?
Here the code:
<?php
// All print functions do not show up on the screen until it is finished print 'Now we wait<br>';
for($i = 1; $i <= 360; ++$i) { sleep(1); print "$i<br>"; $handle = fopen('test.dat ', "a"); fwrite($handle, $i . "\n"); fclose($handle) ; }
print '<br><br>End... <br>';
?>
Thanks...
It's strange, looks like apache ignores your php.ini. You can yet try to
add set_time_limit( 30); to the beginning of your code. After 30 seconds
the script should end with php generated-error, so the last line never
prints. If set_time_limit will work, try to find if you are not using
another php.ini than you are trying to edit ;)
Y.
Hi,
I want to configure php and the webserver not to let run scripts
endless like mine. So I don't want to tell my friends on my server to
do it like that, because they are users and I can't trust on that.
I checked with phpinfo(); the path to php.ini:
Configuration File (php.ini) Path: /etc/php4/apache2/php.ini
And that's the php.ini i am working with.
I got a debian sarge installation. So there must be a way to configure
what i want.
I hope.
Thanks... This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Steven Bethard |
last post by:
So I've been playing around with trying to add a keyword argument to min
and max that works similarly to the one for sorted. It wasn't too hard
actually, but it does raise a few questions about proper handling of
keyword arguments. Currently, help(max) gives:
max(...)
max(sequence) -> value
max(a, b, c, ...) -> value
With a single sequence argument, return its largest item.
|
by: Jack |
last post by:
Greetings folks,
Just curious if anyone knows what the following would produce:
SELECT
MAX( ECP_SUPPORT_DED_EMAIL.CD_TYP_CMPGN) CD_TYP_CMPGN,
MAX(ECP_SUPPORT_DED_EMAIL.CELL_ID) CELL_ID,
ECP_SUPPORT_DED_EMAIL.CLIC_CUST_ID CUSTID,
MAX( ECP_SUPPORT_DED_EMAIL.ADDRESS) CONTACTED_PARTYID,
MAX( ECP_SUPPORT_DED_EMAIL.CONTACTED_PARTY_ID_TYPE )
FROM
|
by: Bayla Frankl |
last post by:
Hi all,
I am a little stumped. I have a query I am trying to run to retrieve
the last Progress Note record from the database for the current
patient so that the therapists can see the last note while typing the
current note. This seemed to be simple to me, since I figured, you
take the max(TxDate) that exists before my current date and all should
be fine.
I tried that and got all the records that exist for this patient
before that date.
|
by: charles.amith |
last post by:
I have 2 tables: LOCATION and ELEVATION
In location, I would like to find the record with the max value for
field: DATE1
In elevation, I would like to find the record with the max value for
field: DATE2
I would like to join the 2 tables using the common field: PID , and
also query a field called NOTE from the "LOCATION" table.
|
by: norb1 |
last post by:
After tracking down a bug in my Fortran program, I found that it
assumed
max(NaN,0.) = 0.
This makes no sense, as the outcome of the operation is undefined and
should be NaN.
max(NaN,0.) = NaN
After researching, it appears the first outcome is accepted behavior,
and might be included in the revised IEEE 754 standard, which affects
| |
by: copx |
last post by:
Are the macros min() and max() part of stdlib.h or not? (according to the
standard?)
I have the following problem: I defined my own min() / max() macros because
my compiler (MinGW) does NOT define them. When I tried to compile my program
with lcc-win32 the compiler complained about macro redefinition, because
min() and max() are defined in lcc's stdlib.h..
So do these macros belong there or not?
|
by: Eugeny Myunster |
last post by:
I know, only simple one:
#include <stdio.h>
int main()
{
int min=0,max=0,i,arr;
for(i=0;i<12;i++)
arr=rand()%31-10;
for(i=0;i<12;i++)
|
by: bearophileHUGS |
last post by:
Empty Python lists don't know the type of the items it will
contain, so this sounds strange:
0
Because that may be an empty sequence of someobject:
0
In a statically typed language in that situation you may answer the
|
by: hong.niu4 |
last post by:
please look our website ,have more mode shoes clothing hat cap bags !
Air Max
Air Max 87 shoes www.shoestrade.biz
Air Max 90 shoes www.shoestrade.biz
Air Max 91 shoes www.shoestrade.biz
Air Max 93 shoes www.shoestrade.biz
Air Max 95 shoes www.shoestrade.biz
Air Max 97 shoes www.shoestrade.biz
Air Max 2003 shoes www.shoestrade.biz
|
by: rahulsengupta895 |
last post by:
.
#define MIN(a,b) (a<b?a:b)
#define MAX(a,b) (a>b?a:b)
#include "Video.h"
#define NO_HUE -1
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |