PHP Parse Error: syntax error, unexpected $end on wordpress

You might encounter this error

Parse error: syntax error, unexpected $end in C:\Program Files\Apache Group\Apache2\htdocs\wordpress\wp-content\themes\hemingway\functions.php on line 647

when installing new themes for WordPress. I did encounter this when i have

  • Apache 2.0.63
  • PHP 5.2.6

running on my server.

The error may caused by a missing curly bracket in PHP script coding. Beside, it may also caused by error in PHP coding in class definition, as in PHP, a class definition cannot be broke up and distributed into multiple files, or into multiple PHP blocks, unless the break is within a method declaration.

To solve it. Open PHP.ini and change the variable below
short_open_tag = Off

change to

short_open_tag = On

~ by pakcikkantin on May 8, 2008.

One Response to “PHP Parse Error: syntax error, unexpected $end on wordpress”

  1. thank you very much on this one. I was always confused why hemingway doesn’t work in my local apache.

Leave a Reply