ID: 22297 Updated by: [EMAIL PROTECTED] Reported By: sp at m-me dot dk Status: Feedback Bug Type: Filesystem function related Operating System: Windows -PHP Version: 4.3.1 +PHP Version: 4.3.2-dev New Comment:
Forget getting newer snapshot, just try adjusting that php.ini directive.. Previous Comments: ------------------------------------------------------------------------ [2003-02-19 19:02:48] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip And check that your php.ini has this setting: default_socket_timeout = 60 If not, add it and try again.. ------------------------------------------------------------------------ [2003-02-19 17:29:03] sp at m-me dot dk I've tried the latest stable windows release (4.3.2-dev) on System 1, but with the same results. By the way. I must have been a little tired when writing about the symtoms from system 1 and 2. They are instead like this: No matter what the maximum PHP execution time is set to, the script is running in 2 minutes before it stops and writes: Fatal error: Maximum execution time of 5 seconds exceeded in C:\wwwroot\test\readfile\read.php on line 3 In this example the max PHP execution time is set to 5 sec, but first after 2 min the script stops. The Apache timeout is set to 300 sec (5 min). For some reason I found that it is not always that the webservers error log contain any information about the event. But when it does it looks like this: [Wed Feb 19 16:14:31 2003] [error] [client 127.0.0.1] Premature end of script headers: php.exe With Apache 2.0.43 and Windows I've tested this on the following PHP versions: 4.2.3 No output to the browser, Internal Server Error 4.3.0 Error message outputted to browser after 2 min 4.3.1 Error message outputted to browser after 2 min 4.3.2-dev Error message outputted to browser after 2 min /watson ------------------------------------------------------------------------ [2003-02-19 09:13:25] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip There was a fix for a problem in the HTTP reader that went into CVS last night; please try a stable snapshot and let us know if this problem is fixed for you. ------------------------------------------------------------------------ [2003-02-19 09:10:04] sp at m-me dot dk When using the function file() or file_get_contents() added in PHP 4.3.0 I have a problem when I try to read a URL instead of reading directly from the filesystem. This works fine: file("test.txt"); This creates an "Internal Server Error" the webserver: file("http://localhost/test.txt"); I've testet this on 3 different systems: System 1: ---------------------------------------- Windows XP Pro sp1 Apache 2.0.43 PHP 4.3.1 System 2: ---------------------------------------- Windows 2000 Server (build 5002195) sp3 Apache 2.0.43 PHP 4.3.0 System 3: ---------------------------------------- Linux 2.4.20 Apache 1.3.27 PHP 4.3.1 This is what happend on the 3 systems: System 1: ---------------------------------------- The browser is loading for about 5 minutes (more than the the maximum PHP execution time!?) then displays an "Internal Server Error" and writes this in the webserver error log: [Wed Feb 19 14:54:40 2003] [error] [client 127.0.0.1] Premature end of script headers: php.exe, referer: http://localhost/test/readfile/ System 2: ---------------------------------------- The browser is loading for 30 sec. (the maximum PHP execution time) and then displays this in the browser: Fatal error: Maximum execution time of 30 seconds exceeded in C:\data\htdocs\fil1.php on line 3 and this in the webserver error log: [Wed Feb 19 15:32:41 2003] [error] [client 127.0.0.1] Premature end of script headers: php.exe, referer: http://localhost/ System 3: ---------------------------------------- On the this system (the Linux system) both examples worked without any errors. Besides the operating system the biggest difference between the other systems and this one is the Apache version. Could it be Apache 2.x vs. PHP 4.3.x that was the problem? /watson ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22297&edit=1