You are here: Re: PHP parse error after upgrade « PHP Programming Language « IT news, forums, messages
Re: PHP parse error after upgrade

Posted by Tom on 12/20/07 19:20

On Thu, 20 Dec 2007 18:50:58 +0000 (UTC), Jim McCullars wrote...
>
>Greetings!
>
> While doing a web server upgrade, I also decided to upgrade PHP from
>4.4.4 to 5.2.5. After putting the new server in a test environment (actually
>just listening on a different port and using the same DocumentRoot), one
>PHP script fails with a message like this:
>
>PHP Parse error: syntax error, unexpected ';' in
>/apps/httpd/data/admissions/pagemaker.php on line 48
>
>Here is a snippet of the script that failed:
>
> <?
> if ($navtable == 'about'){
> echo ?> <? include("./aboutnavtable.inc"); ?> <?
> }elseif ($navtable == 'student'){
> echo ?> <? include("./studentnavtable.inc"); ?> <?
> }elseif ($navtable == 'staff'){
> echo ?> <? include("./staffnavtable.inc"); ?> <?
> }elseif ($navtable == 'visit'){
> echo ?> <? include("./visitnavtable.inc"); ?> <?
> }elseif ($navtable == 'apply'){
> echo ?> <? include("./applynavtable.inc"); ?> <?
> }elseif ($navtable == 'links'){
> echo ?> <? include("./linksnavtable.inc"); ?> <?
> }elseif ($navtable == 'recruit'){
> echo ?> <? include("./recruitnavtable.inc"); ?> <?
>
> }elseif ($navtable == 'international'){
> echo ?> <? include("./internationalnavtable.inc"); ?> <?
> }else{
> echo 'Please call 827-6414 to report a problem on this page';
> }
> ?>
>
>Line 48 is the one that says
>echo ?> <? include("./aboutnavtable.inc"); ?> <?
>
> This script does not generate any errors under 4.4.4. I did look at the
>4 to 5 compatibility guide on the php.net site but I didn't see anything
>that would explain this. Can someone give me a hint as to why this no longer
>work under version 5? Thanks!
>
>Jim McCullars
>University of Alabama in Huntsville
>


Maybe the "?><?" type code is creating a problem. Since you don't have any
non-PHP code between the "><", then you might be able clean that out. Maybe
running the echo from within the includes file might clean up more of the code.


Tom
--
NewsGuy Accounts Go Jumbo!
NewsGuy Express increased from 30 to 50 GB of download capacity
http://newsguy.com/overview.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация