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
[Back to original message]
|