Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 12-16-2008, 11:35 AM RSS Feed Problem
Novice Talker

Posts: 6
Name: Patricia
Trades: 0
We are trying to add an RSS feed to our site and are at a dead-end. We have tried plugging different PHP scripts into .html pages and nothing ever shows up. Our .htaccess file includes the line: AddHandler application/x-httpd-php .html. I have verified our PHP.ini file has allow_url_include and allow_url_fopen enabled. We have also tried plugging PHP feed reader scripts into a blank PHP document, using various scripts – nothing shows up. Also tried server side include, putting script into its own PHP file with SSI command in html… nothing. We are using PHP 5, enabled by our web host, and even tried adding a 5 to the .htaccess code above: AddHandler application/x-httpd-php5 .html.
With the above bases covered, this SHOULD be as easy as putting a free news reader PHP script into our .html code where we want the feed to show up. These same web pages already make use of a PHP script for a feedback form that works. We’re not even talking formatting the feed at this point, just getting the feed to show up. Feed Reader support staff and several higher technicians at our web host have all looked at this problem and seem to be stumped at this point.
Can’t really be a syntax problem with doc type if the feed isn’t even showing up in a blank PHP doc (even with different scripts). Is there possibly some other crucial PHP setting I don’t know about with my host? If this were a problem with the urls I’m using for the feeds, wouldn’t some kind of gibberish still show up at least? Each time we try something different, the area is just blank.
Anyone out there had an experience like this, any ideas what the problem might be? Any web resources or phone numbers for PHP experts who would know?

Pat & Mark

Last edited by chrishirst; 12-16-2008 at 02:42 PM.. Reason: formatting removed
mellody is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-16-2008, 02:43 PM Re: RSS Feed Problem
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
can you run <?php phpInfo() ?> in a .html page?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-16-2008, 06:01 PM Re: RSS Feed Problem
Novice Talker

Posts: 6
Name: Patricia
Trades: 0
Thanks Chris...

Not exactly sure if your question is rhetorical or not. I understand you CAN run php info in an html if you have the right command accepted by your server added to an .htaccess file (ours is: AddHandler application/x-httpd-php .html). This tells the server there is php script to be interpreted within the html doc. But again, we have tried using the same script within a blank PHP doc and still have no feed visibility.

The syntax for the script we are using is a slight bit different than your code above. Specifically, the following code is what we have within our html doc. With the .htaccess command above, and PHP.ini directives enabled, this "should" be working:

<?php
$olderror_reporting =error_reporting(0);
include ("http://rssfeedreader.com/rss3/rss.ph...1&nst=&nwd=600 x 550&nht=0&dlen=0&lstyle=-1&lc=Blue&bg=White&bc=Gray&spc=&ims=&tc=&ts=11&tfo nt=Verdana,+Arial,+Sans-serif&rf=".$HTTP_SERVER_VARS['SERVER_NAME'].$HTTP_SERVER_VARS['PHP_SELF']."&phpout=1");
error_reporting($olderror_reporting);
?>

I wonder if using "phpInfo" in place of "include" (more of an SSI command) would make any difference? Otherwise stumped.
mellody is offline
Reply With Quote
View Public Profile
 
Old 12-16-2008, 06:20 PM Re: RSS Feed Problem
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
I wonder if using "phpInfo" in place of "include"
Nope, different animals entirely, phpInfo displays the configuration details of how PHP is set up and what module and extensions are installed.

Quote:
Not exactly sure if your question is rhetorical or not
It's just to make sure that the .htaccess setting is working. Some hosts often disable certain features.
If phpInfo runs and gives you the PHP config info page at least you have eliminated one possible problem.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-16-2008, 07:05 PM Re: RSS Feed Problem
Novice Talker

Posts: 6
Name: Patricia
Trades: 0
In order to run phpInfo, where would I put that code in the html, and what if anything would I put between the ()?

Should I just insert that into a blank html page in the code and see if it pulls up the config info page once posted?
mellody is offline
Reply With Quote
View Public Profile
 
Old 12-16-2008, 07:09 PM Re: RSS Feed Problem
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
just a blank page and just as I coded it in post #2

http://www.php.net/phpinfo
You can add parameters depending what you want to show in the page.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-16-2008, 11:54 PM Re: RSS Feed Problem
Novice Talker

Posts: 6
Name: Patricia
Trades: 0
Chris -

I put your code into a blank .html doc between the body tags, nothing showed up. What does this mean? Why does it seem my server is not reading any php code if my .htaccess is right?
mellody is offline
Reply With Quote
View Public Profile
 
Old 12-17-2008, 03:37 AM Re: RSS Feed Problem
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
What does this mean
It means the .htaccess code isn't right or .htaccess overrides are disabled by the host.

re-reading your post use
Code:
AddType application/x-httpd-php .htm .html
instead of AddHandler

Have you checked that PHP is actually running on your site? It won't be the first time a hosting support tech has said one thing and not actually done it.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-17-2008, 11:27 AM Re: RSS Feed Problem
Novice Talker

Posts: 6
Name: Patricia
Trades: 0
Getting closer Chris -

I went back to drawing board all the way. I regenerated feed reader script using one simple preset feed url instead of 4 very convoluted keyword-based feed urls. Then I switched over to parent domain and created a php doc and planted the code. That works. I also ran phpInfo from a PHP doc and it worked. But when I tried doing the same with .html doc, feed does not display and I was not able to run phpInfo.

To be sure this is not a domain issue, I switched back to domain being worked on, where we need the feeds. I created PHP doc with the same newly-generated script and it worked. But planted the same script in the .html and it did not work.

I tried the .htaccess line you gave me, AND the line my host gave me, verifying each time that the domain was set for PHP5 (defaults back to php4 whenever .htaccess is changed, but php4 does not have a setting for allow-url-include which I need for the feed). Neither .htaccess line, apparently, is sufficient for enabling php within an html doc.

Conclusions:

1. Apparently nothing showed up before when I tried code in a PHP doc because the feed url's I was using weren't working. That is the only thing I changed this time.
2. This does not appear to be a domain issue, since the PHP doc with new feed url works on different domains.
3. Since I cannot run phpInfo in an html doc on either domain, that would lead me to believe, now that I know a PHP doc will work, that the problem truly lies with the .htaccess command.

So now I guess the issue is really finding the right .htaccess command that works for my server, and I'll probably need their help to do that (since they are obligated there).

In the end though, at least I know now that I can get a feed to show up in a PHP doc, so worst case, I could rename any web pages with feeds to .php and do a 301 redirect from the old .html doc -- then if something doesn't show up, I would know that it is probably the specific feed url's I'm using.

Thoughts on the .htaccess line?

Thank you so much for your help and patience. I'm so glad to know about the phpInfo now, and you've really helped me narrow this down.
mellody is offline
Reply With Quote
View Public Profile
 
Old 12-17-2008, 02:30 PM Re: RSS Feed Problem
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
I would suspect that the hosting company have turned FileInfo overrides off

http://httpd.apache.org/docs/1.3/mod...#allowoverride
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-17-2008, 05:57 PM Re: RSS Feed Problem
Novice Talker

Posts: 6
Name: Patricia
Trades: 0
Thanks again Chris! I just sent this to our host and will be calling to follow up with them:


I'm starting to get fed up. Just spent 1/2 hour compiling documentation into a message and ajax timed out and lost what I had done. Now I'm doing it over. Very frustrating.

The news feed visibility issue is NOT resolved.

I went back to drawing board all the way. I regenerated feed reader script using one simple preset feed url instead of 4 very convoluted keyword-based feed urls. Then I switched over to parent domain (tvproductchannel.com) and created a php doc and planted the code. That works. I also ran <?php phpInfo() ?> from a PHP doc and it worked (pulled up all the PHP5 documentation). But when I created a new .htaccess file on this domain with the "add handler" command, then tried doing the same as above with .html doc, feed does not display and I was not able to run phpInfo.

To be sure this is not a domain issue, I switched back to domain being worked on, where we need the feeds (directresponseacademy.com). I created PHP doc with the same newly-generated script and it worked. But planted the same script in the .html and it did not work.

I tried the .htaccess line you gave me and many others:
AddHandler application/x-httpd-php .html
AddHandler application/x-httpd-php5 .html
AddType application/x-httpd-php .htm .html
Addhandler application/x-httpd-php .html .php
etc. etc.

Each time I verified that the domain was set for PHP5 (defaults back to php4 whenever .htaccess is changed, but php4 does not have a setting for allow-url-include which I need for the feed). No.htaccess command so far is apparently sufficient for enabling php within an html doc.

Conclusions:

1. Apparently nothing showed up before when I tried code in a PHP doc because the feed url's I was using weren't working. That is the only thing I changed this time.
2. This does not appear to be a domain issue, since the PHP doc with new feed url works on different domains.
3. Since I cannot run phpInfo in an html doc on either domain, that would lead me to believe, now that I know a PHP doc will work, that the problem truly lies with the .htaccess command, or with the Apache directives for the .htaccess file itself.

So now I guess the issue is really finding the right .htaccess command that works for my server, and we all believe this should be your area of support, since it is obviously something specific to your server, whether the command syntax or the .htaccess file itself.

So I ask again, what is it about my .htaccess file or the command that is preventing php from being parsed within an .html doc, when the very same code works (produces a feed) within a PHP doc????

The last advice I received from a forum moderator might shed some light:

"I would suspect that the hosting company have turned FileInfo overrides off. See:
mellody is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to RSS Feed Problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.52296 seconds with 12 queries