[PHP] maximum execution time error
Is there a way to, on a script by script basis, change the maximum allowed time that a script is allowed to run? I have a web admin tool that I'm creating which will allow people to do some mysql database administration. The tool creates a big sql statement before it executes it. I'm getting the following error... Fatal error: Maximum execution time of 30 seconds exceeded in /Library/WebServer/Documents/sandbox/make_test_data/database_admin line 29 Is there a parameter that I can set on a script by script basis? -- -James
RE: [PHP] maximum execution time error
[snip] Is there a way to, on a script by script basis, change the maximum allowed time that a script is allowed to run? [/snip] http://www.php.net/set_time_limit -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maximum execution time error
On 7/5/05, James [EMAIL PROTECTED] wrote: Is there a way to, on a script by script basis, change the maximum allowed time that a script is allowed to run? ini_set() http://php.net/manual/en/ref.info.php#ini.max-execution-time -- Greg Donald Zend Certified Engineer MySQL Core Certification http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] maximum execution time error
On Tue, 2005-07-05 at 10:56 -0500, Jay Blanchard wrote: [snip] Is there a way to, on a script by script basis, change the maximum allowed time that a script is allowed to run? [/snip] http://www.php.net/set_time_limit More specifically... set_time_limit( 0 ); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] maximum execution time error
I also just found this... ini_set(max_execution_time, 60) But set_time_limit() seems more flexible, because you can call that in specific places in your script where you might expect long processing time. Thanks! At 10:56 AM -0500 7/5/05, Jay Blanchard wrote: [snip] Is there a way to, on a script by script basis, change the maximum allowed time that a script is allowed to run? [/snip] http://www.php.net/set_time_limit -- -James
Re: [PHP] maximum execution time error
Greg Donald wrote: On 7/5/05, James [EMAIL PROTECTED] wrote: Is there a way to, on a script by script basis, change the maximum allowed time that a script is allowed to run? ini_set() http://php.net/manual/en/ref.info.php#ini.max-execution-time also look here: http://php.net/manual/en/function.set-time-limit.php not to mention that the OP has a serious problem if his SQL statement is actually taking longer than 30 seconds to generate! :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] maximum execution time error
I was actually doing some extreme performance testing with inserts when I got that message. One of my scripts was inserting like 50,000 rows and I was writing one single sql to do it... I figured that because I came across this problem, I might as well find a work around if I run into this problem with my actual app. Thanks for everyone's help. -James At 8:35 PM +0200 7/5/05, Jochem Maas wrote: Greg Donald wrote: On 7/5/05, James [EMAIL PROTECTED] wrote: Is there a way to, on a script by script basis, change the maximum allowed time that a script is allowed to run? ini_set() http://php.net/manual/en/ref.info.php#ini.max-execution-time also look here: http://php.net/manual/en/function.set-time-limit.php not to mention that the OP has a serious problem if his SQL statement is actually taking longer than 30 seconds to generate! :-) -- 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] Maximum Execution Time Exceeded
[EMAIL PROTECTED] wrote: I would like to know if you could help me.. I don't understand what is wrong! I made a file that is supposed to list 2 categories with the boards that go to them under them. I get a Fatal Error: Maxmimum execution time of 30 seconds exceeded. Here is the file that gives me the error: http://subzer0.net/php/index.php Here is the source code for the file: http://subzer0.net/php/index.phps You did not use any curly braces, but from a quick look it seems you should. For example this code will assign to $board variable multiple times but the variable will never be used: while($get_cat=mysql_fetch_row($category)) $board=mysql_query(SELECT * FROM boards WHERE hidden='No' AND catid='.$get_cat[0].' ORDER BY boardid ASC); Your current code with braces in is: $category=mysql_query(SELECT * FROM categories ORDER BY catid ASC); while($get_cat=mysql_fetch_row($category)) { $board=mysql_query(SELECT * FROM boards WHERE hidden='No' AND catid='.$get_cat[0].' ORDER BY boardid ASC); } while($board=mysql_query(SELECT * FROM boards WHERE hidden='No' AND catid='.$get_cat[0].' ORDER BY boardid ASC)) { $get_board=mysql_fetch_row($board); } while($get_board=mysql_fetch_row($board) AND $get_cat=mysql_fetch_row($category)) { echo '/tabletable border=0 align=center width=100%tr class=cell2 align=centertdbi'. $get_cat[1] . '/i/b/td/tr/tabletable border=0 align=center width=100%tr ',shading(),'tda href=/php/topics.php?board='.$get_board[0].''.$get_board[1].'/abr /small'.$get_board[2].'/small/tdtd'.$get_board[3].'/tdtd'.$get_board[4].'/tdtd'.$get_board[5].'/td/tr'; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Maximum Execution Time Exceeded
I would like to know if you could help me.. I don't understand what is wrong! I made a file that is supposed to list 2 categories with the boards that go to them under them. I get a Fatal Error: Maxmimum execution time of 30 seconds exceeded. Here is the file that gives me the error: http://subzer0.net/php/index.php Here is the source code for the file: http://subzer0.net/php/index.phps Thanks. ~Mike
[PHP] Maximum execution time
Hi, Is there some way to turn off maximum execution time? Preferably within the script itself? Thanks, John -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Maximum execution time
John J Foerch wrote: Hi, Is there some way to turn off maximum execution time? Preferably within the script itself? Thanks, John ini_set('max_execution_time',0); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Maximum execution time
On Friday 05 December 2003 05:22 pm, John J Foerch wrote: Hi, Is there some way to turn off maximum execution time? Preferably within the script itself? Thanks, John set_time_limit(0); zero is for not timeout, change to # of seconds if you want. James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Maximum execution time exceeded when using dial up
Hello, I have database while query which populates cells in a html table, but noticed if using a slow dial up connection its times out... Fatal error: Maximum execution time of 60 seconds exceeded in D:\website\eis-vieworderlookup.php on line 75 What's the best way to deal with this?? Thanks, Andras Kende -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Maximum execution time exceeded when using dial up
My short answer: set_time_limit(); Niklas -Original Message- From: Andras Kende [mailto:[EMAIL PROTECTED] Sent: 7. maaliskuuta 2003 9:05 To: 'php list' Subject: [PHP] Maximum execution time exceeded when using dial up Hello, I have database while query which populates cells in a html table, but noticed if using a slow dial up connection its times out... Fatal error: Maximum execution time of 60 seconds exceeded in D:\website\eis-vieworderlookup.php on line 75 What's the best way to deal with this?? Thanks, Andras Kende -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ### This message has been scanned by F-Secure Anti-Virus for Internet Mail. For more information, connect to http://www.F-Secure.com/ ### This message has been scanned by F-Secure Anti-Virus for Internet Mail. For more information, connect to http://www.F-Secure.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Maximum execution time explanation needed
Ok, i got this script i run on my server, this script runs exactly 47 secs or so (45 to 49) each time i run it. I run it from the command line cause it's going to be a CRON job i'll run every month. My question is, why after 47 seconds or so does my script end saying: bFatal error/b: Maximum execution time of 30 seconds exceeded in b/var/www/autoexpert/includes/db.php/b on line b69/bbr This sucks, i did another script that imports data, it takes something like 5 minutes to execute, and it's pretty much the same code, why does this one end like that with a fatal error while the other goes trough its very long task of import a whole set of data in 5 minutes. I'd like to know exactly how PHP calculates that my script ran too much time. Here is the code in case you need to see it. Please do not fix my code for me, if there are bugs i will find them, i just want to know how PHP says it's been 30 seconds. Mathieu Dumoulin Web Solutions Programmer Analyst Code: #! /usr/bin/php ?php /*This file is used each month on the 1st day to compile the whole previous month data for the cars and for the person to which this post pertains to.*/ //Definition define('IN_INDEX', 1); //Connect to the database include(../includes/config.php); include(../includes/db.php); //Open the connection $db-connect(); //Get the current date //$curDate = date(Y-m-d); $curDate = 2003-03-01; //Get the previous month's complete date $cur_expl = explode(-, $curDate); $cur_month = $cur_expl[1]; if($cur_month == 1){ $prev_month = 12; $prev_year = $cur_expl[0] - 1; }else{ $prev_month = $cur_month - 1; $prev_year = $cur_expl[0]; } $prev_day = 01; $prevDate = (string)$prev_year . - . @str_repeat(0, 2 - strlen($prev_month)) . $prev_month . - . $prev_day; $prevDateYearOnly = (string)$prev_year . - . 01 . - . $prev_day; //Echo echo Running... please wait\n; //Get all this month's stats $db-query(SELECT * FROM stats_vehicules_days WHERE day = '$prevDate' AND day '$curDate' ORDER BY vehiculeid, stats_vehicules_days); //Loop and add all lines as needed while($row = $db-fetch_array(stats_vehicules_days)){ //Update the line in the stats_vehicules_month $db-query(UPDATE stats_vehicules_months SET clicks = clicks + . $row[clicks] . , views = views + . $row[views] . WHERE vehiculeid = . $row[vehiculeid] . AND month = '$prevDate', updateStats); //Get the Info ID for this vehicule $db-query(SELECT i.id AS info_id FROM info AS i, annonces AS a, vehicules AS v WHERE i.id = a.infoid AND a.id = v.annonceid AND v.id = . (string)$row[vehiculeid], infoId); $infoid_row = $db-fetch_array(infoId); //Write the stats for this user $db-query(UPDATE stats_info_months SET clicks = clicks + . $row[clicks] . , views = views + . $row[views] . WHERE infoid = . $infoid_row[info_id] . AND month = '$prevDate', updateStats); $db-query(UPDATE stats_info_years SET clicks = clicks + . $row[clicks] . , views = views + . $row[views] . WHERE infoid = . $infoid_row[info_id] . AND year = '$prevDateYearOnly', updateStats); } //Close the connection $db-close(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Maximum execution time of 30 seconds exceeded
Hi everybody! I wrote a script just to do some local replacement stuff here on my own machine. Is there any way to change the maximum execution time of PHP which seems to be restricted to 30 seconds Would be great if you could give me a hint on how to change this... Thanx alot, Kiko - It's not a bug, it's a feature. christoph starkmann mailto:[EMAIL PROTECTED] http://www.fh-augsburg.de/~kiko ICQ: 100601600 - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Maximum execution time of 30 seconds exceeded
set_time_limit(0); // no limit set_time_limit(60); // 60 seconds Regards, Andrey - Original Message - From: Christoph Starkmann [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 06, 2001 7:09 PM Subject: [PHP] Maximum execution time of 30 seconds exceeded Hi everybody! I wrote a script just to do some local replacement stuff here on my own machine. Is there any way to change the maximum execution time of PHP which seems to be restricted to 30 seconds Would be great if you could give me a hint on how to change this... Thanx alot, Kiko - It's not a bug, it's a feature. christoph starkmann mailto:[EMAIL PROTECTED] http://www.fh-augsburg.de/~kiko ICQ: 100601600 - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Maximum execution time of 30 seconds exceeded
I wrote a script just to do some local replacement stuff here on my own machine. Is there any way to change the maximum execution time of PHP which seems to be restricted to 30 seconds Would be great if you could give me a hint on how to change this... http://www.php.net/manual/en/function.set-time-limit.php -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07763 620378 PGP Key available, send email with subject: Send PGP Key -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Maximum execution time of 30 seconds exceeded
The timeout is set in php.ini -Original Message- From: Christoph Starkmann [SMTP:[EMAIL PROTECTED]] Sent: 06 December 2001 17:09 To: [EMAIL PROTECTED] Subject:[PHP] Maximum execution time of 30 seconds exceeded Hi everybody! I wrote a script just to do some local replacement stuff here on my own machine. Is there any way to change the maximum execution time of PHP which seems to be restricted to 30 seconds Would be great if you could give me a hint on how to change this... Thanx alot, Kiko - It's not a bug, it's a feature. christoph starkmann mailto:[EMAIL PROTECTED] http://www.fh-augsburg.de/~kiko ICQ: 100601600 - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Maximum execution time of 30 seconds exceeded
The timeout is set in php.ini Only change it in php.ini if you want it to be serverwide. For a specific script use set_time_linit(). Regards Jon -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07763 620378 PGP Key available, send email with subject: Send PGP Key -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Maximum execution time of 30 seconds exceeded...
Hi, Any ideas how to get by the following error? Fatal error: Maximum execution time of 30 seconds exceeded in c:\program files\nusphere\apache\htdocs\test.php on line 8 ? for($i=1;$i=9;$i++) { $lines = join(, file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web kb.html?TAB=dspkbid=' . $i)); $fp = fopen ($DOCUMENT_ROOT . / . $i . .html, w); fwrite($fp, $lines, strlen($lines)); fclose($fp); } ? Met vriendelijke groet / With kind regards, Simon de Kraa ICL Logistic Systems mailto:[EMAIL PROTECTED] --- Microsoft Windows 2000 Professional SP 1, Progress 9.1b, Roundtable 9.1b SCO UnixWare 7.1.1, Progress 9.1a11 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Maximum execution time of 30 seconds exceeded...
Change the max_execution_time setting in your php.ini file. You can also do it on a per-script basis but I can't remember how OTOH - a search on the manual should find it though. HTH Jon -Original Message- From: Kraa de Simon [mailto:[EMAIL PROTECTED]] Sent: 03 May 2001 11:48 To: Php-General (E-mail) Subject: [PHP] Maximum execution time of 30 seconds exceeded... Hi, Any ideas how to get by the following error? Fatal error: Maximum execution time of 30 seconds exceeded in c:\program files\nusphere\apache\htdocs\test.php on line 8 ? for($i=1;$i=9;$i++) { $lines = join(, file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web kb.html?TAB=dspkbid=' . $i)); $fp = fopen ($DOCUMENT_ROOT . / . $i . .html, w); fwrite($fp, $lines, strlen($lines)); fclose($fp); } ? Met vriendelijke groet / With kind regards, Simon de Kraa ICL Logistic Systems mailto:[EMAIL PROTECTED] ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Maximum execution time of 30 seconds exceeded...
Never tried it though! But what if you try this: form name=myform method=post action=?=$PHP_SELF? ? if (!isset($i) $i = 0; else $i++; ? input type=hidden name=i value=?=$i? /form ? $lines = join(, file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web kb.html?TAB=dspkbid=' . $i)); $fp = fopen ($DOCUMENT_ROOT . / . $i . .html, w); fwrite($fp, $lines, strlen($lines)); fclose($fp); ? script if (myform.i.value 1234) alert('reached max! script finished'); // stop submitting! else myform.submit(); // submit the form! /script by this you're giving each file a life time of 30secs max! meanwhile this trick can save solve your problem! -elias www.eassoft.cjb.net Kraa de Simon [EMAIL PROTECTED] wrote in message C1EBEEBBB842D411B412949A1F5875868B@wwmessd135">news:C1EBEEBBB842D411B412949A1F5875868B@wwmessd135... Hi, Any ideas how to get by the following error? Fatal error: Maximum execution time of 30 seconds exceeded in c:\program files\nusphere\apache\htdocs\test.php on line 8 ? for($i=1;$i=9;$i++) { $lines = join(, file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web kb.html?TAB=dspkbid=' . $i)); $fp = fopen ($DOCUMENT_ROOT . / . $i . .html, w); fwrite($fp, $lines, strlen($lines)); fclose($fp); } ? Met vriendelijke groet / With kind regards, Simon de Kraa ICL Logistic Systems mailto:[EMAIL PROTECTED] --- Microsoft Windows 2000 Professional SP 1, Progress 9.1b, Roundtable 9.1b SCO UnixWare 7.1.1, Progress 9.1a11 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] maximum execution time exceeded but !connection_timeout() ???
Hi, (PHP 4.0.3pl1 on Apache/1.3.14) I hope somebody can help me. I'm at my wit's end with this one. I need to use a shutdown function that does something only if it was called due to a connection timeout. I register a shutdown fuction and provoke a timeout; the function is called. But it sees connection_status() = 0 and connection_timeout() as false. (If I click the Stop button on the browser, my shutdown function sees connection_abort = true.) The wierd thing is that the shutdown function is not called if there is no timeout and no user abort. If I could rely on this behavior that would be fine. But that is not how PHP is meant to work so I'm not willing to rely on it. I see on the screen: Fatal error: Maximum execution time of 5 seconds exceeded But inspecting connection_status() shows it is 0 and connection_timeout() is false. Here's my test code. I made it write to a file because using sqrt() and sleep() it never timed out. ?php set_time_limit(5); ignore_user_abort(0); function done() { global $i, $fp; $u=connection_status(); fputs($fp,i reached $i, connection status = $u \n); if(connection_timeout()) fputs($fp,** the connection was timed out **\n); else fputs($fp,** not timed out **\n); if(connection_aborted()) fputs($fp,** the connection was aborted **\n); else fputs($fp,** not aborted **\n); fclose($fp); } register_shutdown_function(done); $fp = fopen(logfile.txt,w); $tempout = fopen(tempout,w); $tfile=tester.zip; for($i=0; $i40; $i++) { $temp_aray=file($tfile); while (list($key, $val) = each($temp_aray)) { fwrite($tempout,$key); fwrite($tempout,$val); } fputs($fp,i is $i\n); echo $ibr\n; } fputs($fp, main: i finishes as $i\n); fclose($tempout); fclose($fp); if(connection_timeout()) echo main ** the connection was timed out **br\n; else echo main ** not timed out **br\n; $u=connection_status(); echo connection_status = $u br\n; unlink(tempout); ? John Clements . . | \_/ [EMAIL PROTECTED] +44 (0) 20 8959-8213 29 Gibbs Green, Edgware, Middx., UK HA8 9RS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] maximum execution time exceeded but !connection_timeout() ???
Hi, (PHP 4.0.3pl1 on Apache/1.3.14) I hope somebody can help me. I'm at my wit's end with this one. I need to use a shutdown function that does something only if it was called due to a connection timeout. I register a shutdown fuction and provoke a timeout; the function is called. But it sees connection_status() = 0 and connection_timeout() as false. (If I click the Stop button on the browser, my shutdown function sees connection_abort = true.) The wierd thing is that the shutdown function is not called if there is no timeout and no user abort. If I could rely on this behavior that would be fine. But that is not how PHP is meant to work so I'm not willing to rely on it. I see on the screen: Fatal error: Maximum execution time of 5 seconds exceeded But inspecting connection_status() shows it is 0 and connection_timeout() is false. Here's my test code. I made it write to a file because using sqrt() and sleep() it never timed out. ?php set_time_limit(5); ignore_user_abort(0); function done() { global $i, $fp; $u=connection_status(); fputs($fp,i reached $i, connection status = $u \n); if(connection_timeout()) fputs($fp,** the connection was timed out **\n); else fputs($fp,** not timed out **\n); if(connection_aborted()) fputs($fp,** the connection was aborted **\n); else fputs($fp,** not aborted **\n); fclose($fp); } register_shutdown_function(done); $fp = fopen(logfile.txt,w); $tempout = fopen(tempout,w); $tfile=tester.zip; for($i=0; $i40; $i++) { $temp_aray=file($tfile); while (list($key, $val) = each($temp_aray)) { fwrite($tempout,$key); fwrite($tempout,$val); } fputs($fp,i is $i\n); echo $ibr\n; } fputs($fp, main: i finishes as $i\n); fclose($tempout); fclose($fp); if(connection_timeout()) echo main ** the connection was timed out **br\n; else echo main ** not timed out **br\n; $u=connection_status(); echo connection_status = $u br\n; unlink(tempout); ? John Clements . . | \_/ [EMAIL PROTECTED] +44 (0) 20 8959-8213 29 Gibbs Green, Edgware, Middx., UK HA8 9RS -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Maximum execution time of 30 seconds exceeded...
set_time_limit(n) where n is number of seconds (or 0 for no time limit) -Original Message- From: Jon Haworth [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 03, 2001 5:53 AM To: 'Kraa de Simon'; Php-General (E-mail) Subject: RE: [PHP] Maximum execution time of 30 seconds exceeded... Change the max_execution_time setting in your php.ini file. You can also do it on a per-script basis but I can't remember how OTOH - a search on the manual should find it though. HTH Jon -Original Message- From: Kraa de Simon [mailto:[EMAIL PROTECTED]] Sent: 03 May 2001 11:48 To: Php-General (E-mail) Subject: [PHP] Maximum execution time of 30 seconds exceeded... Hi, Any ideas how to get by the following error? Fatal error: Maximum execution time of 30 seconds exceeded in c:\program files\nusphere\apache\htdocs\test.php on line 8 ? for($i=1;$i=9;$i++) { $lines = join(, file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web kb.html?TAB=dspkbid=' . $i)); $fp = fopen ($DOCUMENT_ROOT . / . $i . .html, w); fwrite($fp, $lines, strlen($lines)); fclose($fp); } ? Met vriendelijke groet / With kind regards, Simon de Kraa ICL Logistic Systems mailto:[EMAIL PROTECTED] ** 'The information included in this Email is of a confidential nature and is intended only for the addressee. If you are not the intended addressee, any disclosure, copying or distribution by you is prohibited and may be unlawful. Disclosure to any party other than the addressee, whether inadvertent or otherwise is not intended to waive privilege or confidentiality' ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Maximum execution time of 30 seconds exceeded...
At 08:32 03.05.01 -0500, you wrote: set_time_limit(n) where n is number of seconds (or 0 for no time limit) but DO NOT SET 0 on production-servers, your ISP will, after he killed the processes, kill you :-) -Original Message- From: Jon Haworth [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 03, 2001 5:53 AM To: 'Kraa de Simon'; Php-General (E-mail) Subject: RE: [PHP] Maximum execution time of 30 seconds exceeded... Change the max_execution_time setting in your php.ini file. You can also do it on a per-script basis but I can't remember how OTOH - a search on the manual should find it though. HTH Jon -Original Message- From: Kraa de Simon [mailto:[EMAIL PROTECTED]] Sent: 03 May 2001 11:48 To: Php-General (E-mail) Subject: [PHP] Maximum execution time of 30 seconds exceeded... Hi, Any ideas how to get by the following error? Fatal error: Maximum execution time of 30 seconds exceeded in c:\program files\nusphere\apache\htdocs\test.php on line 8 ? for($i=1;$i=9;$i++) { $lines = join(, file('http://www.progress.com/services/support/cgi-bin/techweb-kbase.cgi/web kb.html?TAB=dspkbid=' . $i)); $fp = fopen ($DOCUMENT_ROOT . / . $i . .html, w); fwrite($fp, $lines, strlen($lines)); fclose($fp); } ? Met vriendelijke groet / With kind regards, Simon de Kraa ICL Logistic Systems mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Maximum execution time exceeded!
hi all, when i am trying to calculate the number of rows with a '0' in a particular column using the following code, it is giving the 'Maximum execution time exceeded' message, eventhough after i gave set_time_limit(60), it didn't worked, infact now it is even worse the browser is getting siezed. $result=mysql_query("select * from mytable"); while ($avgrow=mysql_fetch_array($result)) { $prescene2 = $avgrow["scene2"]; $prescene4 = $avgrow["scene4"]; $prescene5 = $avgrow["scene5"]; $prescene7 = $avgrow["scene7"]; $prescene8 = $avgrow["scene8"]; $prescene9 = $avgrow["scene9"]; $i = 1; while ($prescene2 == 0) { $i=$i+1; } } printf ("Number of zeros=%d",$i); Can any one please help me with this. TIA kalyan __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Maximum execution time exceeded!
Of course, you have this code: while ($prescene2 == 0) { $i=$i+1; } Where $prescnene2 is not modified, hence you get an endless loop. When you increase the timeout, that loop just gets longer to run. Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. - Original Message - From: "Chakravarthy K Sannedhi" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, January 29, 2001 2:37 PM Subject: [PHP] Maximum execution time exceeded! hi all, when i am trying to calculate the number of rows with a '0' in a particular column using the following code, it is giving the 'Maximum execution time exceeded' message, eventhough after i gave set_time_limit(60), it didn't worked, infact now it is even worse the browser is getting siezed. $result=mysql_query("select * from mytable"); while ($avgrow=mysql_fetch_array($result)) { $prescene2 = $avgrow["scene2"]; $prescene4 = $avgrow["scene4"]; $prescene5 = $avgrow["scene5"]; $prescene7 = $avgrow["scene7"]; $prescene8 = $avgrow["scene8"]; $prescene9 = $avgrow["scene9"]; $i = 1; while ($prescene2 == 0) { $i=$i+1; } } printf ("Number of zeros=%d",$i); Can any one please help me with this. TIA kalyan __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Maximum execution time exceeded!
That loop will never end. Generally, the loop body should manipulate some part of the loop ending condition. initialize $i before the loop replace the second loop with "if($prescene2==0){$i++;}" Chakravarthy K Sannedhi wrote: hi all, when i am trying to calculate the number of rows with a '0' in a particular column using the following code, it is giving the 'Maximum execution time exceeded' message, eventhough after i gave set_time_limit(60), it didn't worked, infact now it is even worse the browser is getting siezed. $result=mysql_query("select * from mytable"); while ($avgrow=mysql_fetch_array($result)) { $prescene2 = $avgrow["scene2"]; $prescene4 = $avgrow["scene4"]; $prescene5 = $avgrow["scene5"]; $prescene7 = $avgrow["scene7"]; $prescene8 = $avgrow["scene8"]; $prescene9 = $avgrow["scene9"]; $i = 1; while ($prescene2 == 0) { $i=$i+1; } } printf ("Number of zeros=%d",$i); Can any one please help me with this. TIA kalyan __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Maximum execution time
Can anyone tell me how to up the max. execution time in PHP? I know it's been said before, but I can't remember how it's done. Liam
Re: [PHP] Maximum execution time
On 23 Jan 2001 07:47:03 -0800, Liam Gibbs [EMAIL PROTECTED] wrote: Can anyone tell me how to up the max. execution time in PHP? I know it's = been said before, but I can't remember how it's done. You can change the value max_execution_time in php.ini, or your apache configuration files. If you only want to increase or disable the limit in a single script, try set_time_limit(). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Maximum execution time
put this line set_time_limit(500) ; at the beginning of your script if you want to enlarge execution time for 500 seconds. - Original Message - From: "Liam Gibbs" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 23, 2001 4:48 PM Subject: [PHP] Maximum execution time Can anyone tell me how to up the max. execution time in PHP? I know it's been said before, but I can't remember how it's done. Liam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]