I have just finished moving a WordPress site to a new server. Absolutely no changes have been made to the code, but when I try to view the site

mod_fcgid: stderr: PHP Parse error:  syntax error, unexpected '}' in /home/crandall/www/website.com/wp-content/plugins/auto-featured-image/auto-featured-image.php on line 353

I don't see any such issue in the code, which I've pastebin'd below for reference; I haven't been able to find any occurrence of this issue in Google. The only thing I can think of is some extremely esoteric issue relating to PHP versions, as the original server was running PHP 5.2 and the new one is running 5.3.


  • What happens if you execute the code on your workstation? Can you replicate it? If so, it's a code issue. If not, it's more likely a server/configuration issue. – growse Jan 25 '13 at 10:19

Is short tags turned off on the new server?

There's an <? endif; ?> block just above the error that will be getting missed by PHP if short tags is off.

  • This is exactly it. D'oh. Very well answered, sir. – Sudowned Jan 28 '13 at 22:42

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.