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

Posted by Jim McCullars on 12/20/07 18:50

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

 

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

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