PHP 4.0 Bug #3436: script does not produce anything, parsing error?

From: Date: Wed, 09 Feb 2000 14:37:35 +0000
Subject: PHP 4.0 Bug #3436: script does not produce anything, parsing error?
Groups: php.dev 
Request: Send a blank email to php-dev+get-15329@lists.php.net to get a copy of this message
From: jl543@hotmail.com Operating system: redhat 6.0 PHP version: 4.0 Latest CVS (09/02/2000) PHP Bug Type: Scripting Engine problem Bug description: script does not produce anything, parsing error? Hi all: Another few hours, finally I am able to isolate my problem to the small script attached. On beta3 (with redhat + apache), I see a "hello"; With php4-200002042045, I get nothing. It no longer depends on whether the "variable_orders" have 'S'. (My actual app still break only when variable_orders have 'S', even after I removed 'B'.) Because I get NOTHING when this error occurs (in a large app with session, cookie, GET/POST and lots of includes), it was very difficult to track down. Anyone could give me a hint on how could I have done better? What's your favorite debug mechanism for php4? Thanks for your attention. \Jay test script : test.php Hello! <?php get_pageInfo("this"); function get_pageInfo($siteTemplate) { $b["a1"]["displayName"] = "Title"; $b["a2"]["displayName"] = "Name"; $b["a3"]["displayName"] = "Author"; $b["a4"]["displayName"] = "Summary"; $b["a5"]["displayName"] = "displayed"; $b["a6"]["displayName"] = "Link Menu"; $a["item"] = $b; unset ($b); $b["a1"]["displayName"] = "Title"; $b["a3"]["displayName"] = "Name"; $b["a4"]["displayName"] = "Slogan"; $b["a5"]["displayName"] = "Description"; $b["a6"]["displayName"] = "Link Menu"; $a["textFile"] = $b; unset ($b); $b["a1"]["displayName"] = "Title"; $b["a2"]["displayName"] = "Name"; $b["a3"]["displayName"] = "Slogan"; $b["a4"]["displayName"] = "Description"; $b["a5"]["displayName"] = "Link Menu"; $a["text"] = $b; unset ($b); while (list($page, $element) = each($a)) { while (list($key, $value) = each($element)) { if(ereg("TABLE1",$key)) $element["type"] = "a111"; #### THE SCRIPT WORKS IF ONE OF THE TWO FOLLOWING LINES # ARE COMMENTED OUT else if (ereg ("TABLE2", $key)) $element["type"] = "b122"; else if (ereg ("TABLE", $key)) $element["type"] = "a123"; ############# } $c[$page] = $element; unset ($element); } return $c; } ?>

« previous php.dev (#15329) next »