Support » Installing WordPress » [help] OS X, PHP & Heredoc Syntax

  • OK,

    I’m going out of my head here.

    I have my laptop, running OSX Panther Client with Marc Liyange’s PHP package of 4.3.10 installed.

    My wordpress test site works fine.

    I have an XServe, running OSX Panther /server/ with the /exact/ same PHP package of 4.3.10 installed.

    On the server, all instances of the heredoc syntax in WP produce an error.

    I have checked PHP.ini on both machines – they are identical (with the exception of display errors being off in the live server)

    I then tried a simple test, creating a simple php file containing only:


    echo <<<TEST
    This is my test to see if heredoc style syntax works
    This is another line


    And, while it works perfectly on my laptop, my server bizarrely gives the error:

    Parse Error: unexpeted $ in [path/to/file.php] on line 4

    How confusing is that? what ‘$’? Were?

    there are no stray entities in the file, line breaks are Unix, and there is no extra whitespace before or after the closing ‘TEST”

    I realise this is more of a PHP problem that a WordPress one, but I thought someone else here may have at least seen this happen – I’ve Googled for a couple of hours now, and can’t find anything!

    At the moment, I have to manually edit ever instance of heredoc syntax in the install to remove it…. its killing me!

    Any help would be wonderful. Feel free to mail me off the forum at ben at benjamieson dot com if you think it is more fitting to do so.

    Desperate Ben

  • The topic ‘[help] OS X, PHP & Heredoc Syntax’ is closed to new replies.