Riparian Posted July 21, 2012 Share Posted July 21, 2012 I have upgraded my PC and local server. I now get the fatal error below in one of my programs Parse error: syntax error, unexpected T_ELSE in C:\Apache\htdocs\xxDirxx\xxx.php on line 1143 The program has and is still running perfectly locally (old machine) and on the remote server (on the net). I have checked the syntax and can not find a problem. I have reinstalled my local server with apache php and mysql with the same result. Has anyone had a problem like this or have any suggestions Any help is greatly appreciated ! Quote Link to comment https://forums.phpfreaks.com/topic/266022-help-with-parse-error/ Share on other sites More sharing options...
PFMaBiSmAd Posted July 21, 2012 Share Posted July 21, 2012 This symptom is usually caused by using short-opening php tags <?, instead of full opening php tags <?php If you do have any short opening tags in your code, now would be a good time to change to full opening php tags, so that your php code will always be seen as being php code and you don't have this problem when moving between servers that have short tags turned off. Quote Link to comment https://forums.phpfreaks.com/topic/266022-help-with-parse-error/#findComment-1363195 Share on other sites More sharing options...
Riparian Posted July 21, 2012 Author Share Posted July 21, 2012 Thanks for the reply... I just checked and all are full opening <?php (actually changed over a few years ago ) Quote Link to comment https://forums.phpfreaks.com/topic/266022-help-with-parse-error/#findComment-1363197 Share on other sites More sharing options...
PFMaBiSmAd Posted July 21, 2012 Share Posted July 21, 2012 You would need to post about 10 lines of code prior to and including the line where the error is being reported for anyone here to have a chance at helping with the problem. Quote Link to comment https://forums.phpfreaks.com/topic/266022-help-with-parse-error/#findComment-1363199 Share on other sites More sharing options...
Riparian Posted July 21, 2012 Author Share Posted July 21, 2012 My Sincere apology and thank you for the help. You were 100% correct. There was one short tag hidden deep in a block of code Cheers and thanks Quote Link to comment https://forums.phpfreaks.com/topic/266022-help-with-parse-error/#findComment-1363202 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.