<?php phpinfo();
Also, why in the world would anyone be "upgrading" to a PHP 5.2 release? PHP 5.2 is not supported at all any more (has not been for several years) and is no longer even considered for security fixes. In other words, PHP 5.2 is obsolete. The current versions of PHP are listed right on the PHP.net home page. PHP 5.5+ is current. I believe that MySQL 5.7+ is current.
Is it PHP or MySQL returning the syntax error? The "PHP instruction" you quoted is MySQL rather than PHP, though it may be code in PHP that it's trying to run through MySQL.