Results 1 to 4 of 4

Thread: PHP not working

  1. #1
    Join Date
    Feb 2007
    Posts
    55

    Default PHP not working

    I have exactly one file, written in PHP. This file works fine outside of OR. It's just a "tell a friend" form. I cut & paste it into the page editor (editor set to "none"), and then looked at the page produced. It rendered the HTML correctly, but failed to execute the PHP code.

    Remembering something someone wrote in the forums, I went to the site configurator and set "execute PHP" to "yes".

    I then got the following error:


    Parse error: syntax error, unexpected T_STRING in /home/xxx/public_html/open-realty/include/page_display.inc.php(112) : eval()'d code on line 14

    Remember, this works fine outside of OR.

  2. #2
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    49
    Posts
    9,796

    Default Re: PHP not working

    Did you use the correct 'tags' to indicate the php code? <?PHP and ?> will not work. See the page editor section of the OR docs.

  3. #3
    Join Date
    Feb 2007
    Posts
    55

    Default Re: PHP not working

    Quote Originally Posted by pbflash View Post
    Did you use the correct 'tags' to indicate the php code? <?PHP and ?> will not work. See the page editor section of the OR docs.

    Thank you for the pointer. It apparently says I'm supposed to put HTML comments around the PHP start and end tags. I've now tried that. No change in the error message.

    This whole application (OR) is written in PHP. Isn't there a simple way I can use my PHP file directly without modification?

    Thank you

  4. #4
    Join Date
    May 2004
    Location
    Long Island, NY
    Age
    49
    Posts
    9,796

    Default Re: PHP not working

    Isn't there a simple way I can use my PHP file directly without modification?
    The easiest way is to create an addon.

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
  •