Bug #18243 Updated: set_error_handler doesn't work with maxtime error

From: Date: Wed, 10 Jul 2002 13:33:32 +0000
Subject: Bug #18243 Updated: set_error_handler doesn't work with maxtime error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-13732@lists.php.net to get a copy of this message
ID: 18243 Updated by: sander@php.net Reported By: guichi@club-internet.fr -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: WIN NT4 PHP Version: 4.2.1 New Comment: Sorry, but the bug system is not the appropriate forum for asking support questions. Your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php Thank you for your interest in PHP. You should not (ab)use max_time_limit() as a timeout for fopen & co. Use fsockopen and/or the cURL functions for this. Previous Comments: ------------------------------------------------------------------------ [2002-07-10 09:30:14] guichi@club-internet.fr Sorry, I can't solve a problem. I want to read a url, but sometimes the WEB server is sleeping. The fgets takes to many tiimes and I reach the maxtime_php. I want to take the hand to goes on the script, but I can't, what can I do? Is there a way to by pass this problem? regards Niorj function readAfile ($adr) { set_time_limit (60); $File = fopen($adr,"r"); $Buffer = ""; if($File) { while (!feof($File)) { $Buffer .= @fgets($File, 1000); } fclose($File); } return $Buffer; } ------------------------------------------------------------------------ [2002-07-09 19:58:07] sniper@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php ------------------------------------------------------------------------ [2002-07-09 10:15:52] guichi@club-internet.fr Hello set_error_handler doesn't with maxtime error(Fatal error: Maximum execution time of 1 second exceeded in E:\www\php\parse_inc.php on line 28 )Here the 1 sec was for the test. Is it normal? The code works with error like echo $test; // with test not initialized Regards Niorj ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18243&edit=1

« previous php.bugs (#13732) next »