Results 1 to 3 of 3

Thread: PHP WordPress Parse Error: syntax error, unexpected $end in

  1. #1
    Join Date
    Feb 2009
    Posts
    56

    PHP WordPress Parse Error: syntax error, unexpected $end in

    I had received the following error while working with the PHP WordPress -

    " Parse Error: syntax error, unexpected $end in ….. scripts.php on line … "

    I want to know what is the cause of this error and how/why does this error occured ?

  2. #2
    Join Date
    Apr 2008
    Posts
    2,005

    Re: PHP WordPress Parse Error: syntax error, unexpected $end in

    unexpected $end indicates that you have probably missed to close a conditional - } in your php script. check your php script keenly and put the required conditional - } at the proper location.

  3. #3
    Join Date
    Feb 2008
    Posts
    1,852

    Re: PHP WordPress Parse Error: syntax error, unexpected $end in

    The php wordpress error which you have mentioned may occur due to many reasons -

    • It may be a cause of missing curly bracket ( } ) in PHP script coding.

    • It may be also caused due to class definition error in PHP coding.
      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.

    • But more commonly, the error is caused by the use of Short Open tags in PHP,
      To use short open tags, it must be enabled in PHP.INI. Search for short_open_tag in PHP.INI, and change the value to On, like
      short_open_tag = On

Similar Threads

  1. JScript compilation error syntax error
    By B.Prajapati in forum Technology & Internet
    Replies: 4
    Last Post: 14-02-2011, 03:24 AM
  2. Replies: 5
    Last Post: 14-11-2010, 12:05 AM
  3. PHP Parse error: parse error unexpected $ in main.php on line 12
    By ΘN-TH3-ЯΘCKZ in forum Software Development
    Replies: 3
    Last Post: 20-08-2009, 06:07 PM
  4. Batch syntax - parse registry key for info
    By alfalyte in forum Operating Systems
    Replies: 1
    Last Post: 23-07-2009, 06:47 PM
  5. Replies: 2
    Last Post: 04-08-2008, 07:30 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,900,126.17331 seconds with 17 queries