ID: 31604 Updated by: [EMAIL PROTECTED] Reported By: johnjawed at gmail dot com -Status: Open +Status: Bogus Bug Type: Reproducible crash Operating System: Fedora/Windows XP PHP Version: 5.0.3 New Comment:
You have an infinite recursuion here where clsWhatever::CheckBug() is calling itself all the time. This causes PHP to die because of stack starvation. Fix your code! Previous Comments: ------------------------------------------------------------------------ [2005-01-19 04:58:37] johnjawed at gmail dot com Expected result should be phpout stream sending string: "Bugged" Actual result is nothing is sent. ------------------------------------------------------------------------ [2005-01-19 04:49:19] johnjawed at gmail dot com Description: ------------ The following code should print "Bugged". It does not. Furthermore, it seems the phpout stream stops completely because any further text after the function will not be outputted...whether it's printed via one of PHP's functions or just in regular text. To me, it seemed like a fatal error occured but without any sort of message (discounting the "This document contains no data" message from Firefox). The behavior is identical on both my Fedora and Windows XP box with Apache2 and Apache 1.3. I did a little experiment with it on my Windows box. I uncommented this: ;extension=php_mysql.dll As I did not need to use this before (MySQLi is better 8) ). However, I dropped the libmysql.dll from the system altogether to make PHP complain about "Entry point missing for php_mysql.dll", which is a warning but will still load PHP just fine (minus MySQL of course). I went back to the bugged script, and as I was hoping, it complained "Entry point missing for php_mysql.dll". I believe that this bug actually causes PHP to reload it's extensions. My setup (identical across both systems): PHP5.0.3 w/ MySQLi PostgreSQL cURL gd2 Apache2 (2.5.2) alternatively Apache 1.3 Reproduce code: --------------- <?PHP class clsWhatever { public function CheckBug() { if(clsWhatever::CheckBug()) return true; else return true; } } class clsSecondClass { public function invokeBug() { if(clsWhatever::CheckBug()) { print("Bugged"); } } } clsSecondClass::invokeBug(); ?> Expected result: ---------------- Nothing, that's the problem. 8p Actual result: -------------- No backtrace available, debugger won't pickup file since nothing is ever sent to the browser to begin with. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31604&edit=1