From: valentiny510 at yahoo dot es Operating system: Windows XP PHP version: 5.4.7 Package: Streams related Bug Type: Bug Bug description:get_headers( ) loops on localhost
Description: ------------ First I want to say I have an offer of 2x1 bugs. I will start with a bit of history.. (for some reason) I have a test server added to my system32/drivers/etc/hosts. Ex: 127.0.0.1 testserver.com and I thought the problem can be the name of something like that, and deletind the line doesn't solve the problem, and then I realized that the problem is the function inself with the localhost. Is almost understandable becouse it try to get the self headers over and over again. Almost like: function get($headers){return get($headers);} The subsequent problem is that is bypassing the time limit of the script, 30 seconds (or whatever time limit is) and the script when reach the limit, the limit is restarted and run again for few minutes 'till the browser stop it. The error.log will have thousands of line with the error limit.. The documentation doesn't say nothing about localhost. Speaking of error log, here come the second bug. NOTE: only happens with the bug above ! That why I put together. Ok.. lets see.. For production (like almost everybody, i guess) I use: ini_set('log_errors', false); ini_set('display_errors', false); Ok.. When I try to see the error returned by the above bug with "display_error true", nothing is showed, and ONLY when "log_errors are true" it show me the error "Time limit 30 seconds etc...", also it show me the error with "display_errors false" too ! Something strange there.. Maybe is becouse the script running foreaver, when the browser it stop it, the php does have nothing "prepared" to show.. and must get something from the error.log to display something to the browser To finish, maybe the second is the subsequent of the first bug (almost sure it is), so dont give to mush importance to that, and fix just the first one. Test script: --------------- <?php var_dump(get_headers('http://localhost')); Expected result: ---------------- The list of all headers.. or some error like "The php can not get the headers from localhohst" :D Actual result: -------------- The script run forever and ever.. (what a happy ending) ..'till the browser dies.. (what a sad ending) -- Edit bug report at https://bugs.php.net/bug.php?id=63106&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=63106&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=63106&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=63106&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=63106&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=63106&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=63106&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=63106&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=63106&r=needscript Try newer version: https://bugs.php.net/fix.php?id=63106&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=63106&r=support Expected behavior: https://bugs.php.net/fix.php?id=63106&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=63106&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=63106&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=63106&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63106&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=63106&r=dst IIS Stability: https://bugs.php.net/fix.php?id=63106&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=63106&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=63106&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=63106&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=63106&r=mysqlcfg