473,320 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

set_time_limit + mysql

hello,

here comes a script which behaves differently with php 4.2.0 + mysql
3.23.49 and php 4.3.3 (or 4.2.3) + mysql 4.0.15.

the oldest version gives the "good" result (with a tiny problem : no
"Fatal error : Maximum execution time of 1 second exceeded in..."
appears... ) : the execution time of the script does not exceed 1 second.

the newest one does not care of the set_time_limit(1) function and the
script is normally executed.

--> why? how can I get the "good" result with php 4.3.3 + mysql 4.0.15?
thanks,

sylvain

please, try this script (do not forget to set host, user and password) :

<?php

set_time_limit(1);

$t_start = array_sum(explode(' ', microtime()));

$link = mysql_connect("localhost", "", "");
if ( !is_resource($link) ){ exit(mysql_error()); }

$query = "SELECT BENCHMARK(10000000, ENCODE('hello', 'world')) ;";
@mysql_query($query, $link);
if ( mysql_error() != "" ){ exit(mysql_error()); }

@mysql_close($link);

$exec_time = array_sum(explode(' ', microtime())) - $t_start;
echo "Execution time is $exec_time seconds.";

?>

Jul 17 '05 #1
0 1667

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: mikey | last post by:
Hi all, I'm having great problems trying to install the latest MySQl RPM package onto my Red Hat Linux OS. There is already MySQL v 3.0 pre-installed with the RH Linux distribution disk but I...
0
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest...
2
by: trihanhcie | last post by:
I m currently working on a Unix server with a fedora 3 as an os My current version of mysql is 3.23.58. I'd like to upgrade the version to 5.0.18. After downloading from MYSQL.COM the package on...
1
by: manish deshpande | last post by:
Hi, When i'm installing MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm by the following command: rpm -i MySQL-server-standard-5.0.24a-0.rhel3.i386.rpm the following error is being shown: ...
6
by: muthumeena | last post by:
how to set time to live for a script in php? i have tried with set_time_limit(); my code was <?php set_time_limit(20); ?> this is not working for me... can anybody please help me out in...
0
by: adamalton | last post by:
I'm trying to investigate the way PHP behaves in relation to timeouts and included scripts. PHP seems to do very strange things when scripts that include other scripts timeout, or when the included...
3
by: menzies | last post by:
Hi, I"m new to this forum, but I have been trying all day to install DBD::mysql onto my Intel MacBook. I've read lots of forums pages and none have gotten me to a successful 'make test' or a...
1
by: FFMG | last post by:
Hi, In safe mode, (http://www.php.net/manual/en/features.safe-mode.php#ini.safe-mode), set_time_limit(...) cannot be used. http://www.php.net/set_time_limit Is there a simple way around...
3
by: pedalpete | last post by:
I've got some strange behavior happening on my server. I have a php page which runs a few processes to keep my db up to date and optomized. The process can take about 40 minutes to run. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.