PDA

View Full Version : PHP rss news feeds no longer working


Gudrun
03-12-2007, 04:55 PM
Hi,

I'm new to bluehost - just arrived today. I have moved my web pages over and they are loading mostly just fine - except for some embedded rss feeds which are handled by a php script. On my old webhost they were working fine. Here, I get blank pages. I know nothing about php. I have copied the php.ini to my add on domain. Also, I have taken the script and saved it to a file test.php loaded to my server and brought it up in a browser window - and there is my news! So I figure it has to be something with the php on/in the html page. I've tried apache handlers php -> html and/or html -> php and neither work.

The php scripts are on html pages. Here is one of the scripts:

<?php
$olderror_reporting =error_reporting(0);
include

("http://www.rssfeedreader.com/rss3/rss.php?url=http%3A%2F%2Fwww.itsab

ove.com%2Fcgi-bin%2Fviewer.cgi%3Ffs%3DSports%26rr%3D1&newpage=1&

chead=&atl=&desc=1&owncss=&eleminate=&auth=1&dts=1&width=430&max=

20&tlen=0&rnd=&bt=3&bs=Double&nmb=&ntb=&naf=&nst=&nwd=0&nht=0&dl

en=0&lstyle=-1&lc=Blue&bg=White&bc=Gray&spc=1&ims=&tc=&ts=11&tfont=

Verdana,+Arial,+Sans-serif&rf=".$HTTP_SERVER_VARS['SERVER_NAME'].$

HTTP_SERVER_VARS['PHP_SELF']."&phpout=1");
error_reporting($olderror_reporting);

Gudrun
03-13-2007, 07:04 PM
I had the answer all the time - so silly. I had fixed this on a previous webhost site and had forgotten entirely:

How do I use .html files to run php or SSI (Server Side Includes)?

Solution
Your Apache Handlers section in cPanel is what you would use to specify how to treat file types. By default, html will not run server side includes or php. To allow these you need to add a new handler for HTML:

To allow php set 'html' as 'application/x-httpd-php'
To allow ssi set 'html' as 'server-parsed'

This will tell the server to read the html files so that you may use these directives in them. Then, in your .html file, add this line:

<!-- #include file="file.html" -->
:eek: