PDA

View Full Version : RSS displaybox shows PHP path



mharrsch
01-24-2007, 01:31 PM
1) Script Title: RSSdisplaybox

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex18/rssdisplaybox/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.

ddadmin
01-24-2007, 10:38 PM
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)?

mharrsch
01-27-2007, 07:04 PM
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.

mharrsch
01-27-2007, 08:11 PM
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!

ddadmin
01-27-2007, 10:36 PM
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.