|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-03-16 00:59 UTC] rasmus@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat May 16 18:00:01 2026 UTC |
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.