ID: 36751 Updated by: [EMAIL PROTECTED] Reported By: adamaflynn at thousandmonkeys dot net -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 5.1.2 New Comment:
There is no such error in the reproducing script you provided. You probably have a problem in your script above this snippet. Previous Comments: ------------------------------------------------------------------------ [2006-03-15 23:08:43] adamaflynn at thousandmonkeys dot net Description: ------------ I'm getting a weird error in PHP 5.1.2. When I run XMB Forum, I get a parse error saying unexpected T_ELSE when there is no reason that there should be an unexpected T_ELSE. I had the issue yesterday, and, after discovering that my php.ini wasn't in the right path and fixing that, it fixed itself. Now again today I'm running into the bug. So, I'm assuming the issue is with PHP and not the code I'm using. My ./configure line is: './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-config-file-path=/etc/' '--disable-short-tags' '--with-zlib' '--enable-bcmath' '--with-bz2' '--enable-calendar' '--with-curl' '--with-ftp' '--with-gd' '--with-mysql=/var/lib/mysql' '--with-mysqli' '--enable-sockets' '--without-sqlite' Reproduce code: --------------- if (!$db->error()) { $count = $db->num_fields($resource); if ($header) { ?><tr class="category" bgcolor="<?php echo $altbg2;?>" align="center"><?php for($i=0;$i<$count;$i++) { echo '<td align="left">'; echo '<strong><font color='.$cattext.'>'.$db->field_name($resource, $i).'</font></strong>'; echo '</td>'; } echo '</tr>'; } while($a = $db->fetch_array($resource, SQL_NUM)) { ?><tr bgcolor="<?php echo $altbg1;?>" class="ctrtablerow"><?php for($i=0;$i<$count;$i++) { echo '<td align="left">'; if (trim($a[$i]) == '') { echo ' '; }else{ echo nl2br($a[$i]); } echo '</td>'; } echo '</tr>'; } } else { error($db->error()); } Expected result: ---------------- I shouldn't get the unexpected T_ELSE error Actual result: -------------- I get the unexpected T_ELSE error. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36751&edit=1