#29742 [NEW]: Parse error when using a script for displaying contents by url querys

From: Date: Wed, 18 Aug 2004 17:59:05 +0000
Subject: #29742 [NEW]: Parse error when using a script for displaying contents by url querys
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-64872@lists.php.net to get a copy of this message
From: cheetah-z at web dot de Operating system: FreeBSD PHP version: 4.3.8 PHP Bug Type: Unknown/Other Function Bug description: Parse error when using a script for displaying contents by url querys Description: ------------ I wanted to build a website with an structure as easy as possible. So i decided to use a php script displaying different contents on the same site by using querys. BTW: Sorry for my english, it may be a bit lame, but I am German so just try to understand my special germenglish. Reproduce code: --------------- <?php if ($site == "home") { echo "<h2>Willkommen auf der Webseite von TM-Servers <br>Diese Webseite wurde zum Zweck der Information... ...tm-server.de.vu ging heute online."; if ($site == "server") { echo "Serverdaten folgen in K&uuml;rze!"; } if ($site == "members") { echo "Mitgliederliste folgt in K&uuml;rze!"; } if ($site == "links") { echo "Hier werden demn&auml;chst sehenswerte Links gesammelt!"; } if ($site == "partner") { echo "Demnächst werden hier alle Partner und Sponsoren von TM-Serversaufgef&uuml;hrt!"; } ?> Expected result: ---------------- I expected my website to open regularly and when clicking a link containing a query (for example: "index.php?site=members" to display the content defined by the echo function (for example: "Mitgliederliste folgt in Kürze!") Actual result: -------------- Parse error: parse error, unexpected $ in /home/export/www/vhosts/funnetwork/hosting/cheetah7/index.php on line 97 an important information is, that line 97 is the very end of index.php and just contains: "</html>" The php tag was already closed many lines before! -- Edit bug report at http://bugs.php.net/?id=29742&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29742&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29742&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29742&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29742&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29742&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29742&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29742&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29742&r=support Expected behavior: http://bugs.php.net/fix.php?id=29742&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29742&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29742&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29742&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29742&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29742&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29742&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29742&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29742&r=float

« previous php.bugs (#64872) next »