php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18243 set_error_handler doesn't work with maxtime error
Submitted: 2002-07-09 10:15 UTC Modified: 2002-07-10 09:33 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: guichi at club-internet dot fr Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.2.1 OS: WIN NT4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: guichi at club-internet dot fr
New email:
PHP Version: OS:

 

 [2002-07-09 10:15 UTC] guichi at club-internet dot 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-07-09 19:58 UTC] 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-10 09:30 UTC] guichi at club-internet dot 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-10 09:33 UTC] sander@php.net
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.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 17 05:01:34 2025 UTC