Results 1 to 5 of 5

Thread: RSS displaybox shows PHP path

  1. #1
    Join Date
    Jan 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default RSS displaybox shows PHP path

    1) Script Title: RSSdisplaybox

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ybox/index.htm

    3) Describe problem: On our university server, php is installed to run as a cgi script. Therefore I must put the path to it (#!usr/local/bin/php) at the beginning of every php file that I use. I put this line in all the php files included with the RSSdisplaybox zip file and everything works well with the exception that the display box begins with the output line #!usr/local/bin/php. I was told that this behavior normally results from a php file being output as html but I've studied the .js scripts and .php scripts and can't seem to find where I can change the output file type.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Well if your PHP is being output as HTML, that means your server isn't even interpreting the PHP file, just treating it like normal HTML. That doesn't make sense here, as you said everything works with the script with the exception of this path being output.

    Do you have an online example of the problem you can post (url)?

  3. #3
    Join Date
    Jan 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Use of RSSdisplaybox on server with Php configured as cgi

    The page that contains the output box is:

    http://uoregon.edu/~mharrsch/romanwonders.php

    A friend here suggested I rename the outputbody.php to outputbody.inc and change all the file references to it since it is only referenced by another php file not called directly. Then I could remove the shebang statement at the beginning of it. He also said to create a new outputbody.php containing only the shebang and the statement:
    <? require_once "outputbody.inc"; ?>

    I'm going to give it a try and see if it works.

  4. #4
    Join Date
    Jan 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Renaming the outputbody.php to outputbody.inc and removing the shebang then creating a new outputbody.php with only the shebang statement and the require_once statement then referencing the outputbody.inc in the main.php file did the trick!

  5. #5
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Great, glad to see you've worked it out. I may just do the same for outputbody.php (rename it) in the zip file the next time the script is updated.

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
  •