Error 403 for some URLs but works fine for others

Asked by Mardy

I've installed the latest version of the script at http://aloserve.com/ftf/

With certain feed URLs it works just fine. The sample buttons, for example, work as expected. So these URLs are good:

http://aloserve.com/ftf/makefulltextfeed.php?url=http%3A%2F%2Fwww.myantiwar.org%2Ffeeds%2Frss%2Fchannel_8.xml
http://aloserve.com/ftf/makefulltextfeed.php?url=http%3A%2F%2Fwww.schnews.org.uk%2Ffeed.xml

However, entering some other valid feed URLs, either into the box on the form or directly, results in a 403 error message every time. For example, entering this feed URL:

http://feeds.starpulse.com/CelebrityBirthdays

into the box gives the error 403. And requesting the corresponding direct URL:

http://aloserve.com/ftf/makefulltextfeed.php?url=http%3A%2F%2Ffeeds.starpulse.com%2FCelebrityBirthdays

gives the error 403 also. That same feed URL submits perfectly fine at the fivefilters.org site. This URL works great:

http://fivefilters.org/content-only/makefulltextfeed.php?url=http://feeds.starpulse.com/CelebrityBirthdays

But this doesn't:

http://aloserve.com/ftf/makefulltextfeed.php?url=http://feeds.starpulse.com/CelebrityBirthdays

It gets the same 403 error.

Server is running PHP 5.2.13. Full phpinfo() display is available here:

http://aloserve.com/ftf/info.php

Are there PHP options that need to be overridden to make my server configuration more equivalent to fivefilters.org?

Any help would be greatly appreciated. TIA.

Mardy

Question information

Language:
English Edit question
Status:
Answered
For:
Five Filters Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Keyvan (keyvan) said :
#1

Mardy, I don't know why you're getting that error - can you point to other URLs which cause the same problem?

I would try writing a simple PHP script with one line: echo file_get_contents('http://feeds.starpulse.com/CelebrityBirthdays'); and see if that works. If it doesn't, then it's a problem with your server/host and not the full-text RSS code.

It could also be that the URL is being blocked in some way. I tried making up a non-existent domain name with starpulse.com appearing and you get the same error: http://aloserve.com/ftf/makefulltextfeed.php?url=sdfsd.feekds.madeupnamestarpulse.com/

Revision history for this message
Mardy (mardyf) said :
#2

Thanks for replying, k1m. Here's what I've done in response to your troubleshooting suggestions.

1) Created the one-line script. It's at http://aloserve.com/ftf/testfeed.php and it works fine.

2) Found a feed URL on another domain that works correctly at http://fivefilters.org/content-only/ but not at http://aloserve.com/ftf/. It's http://feeds.feedburner.com/variety/news/tv and it elicits a different error condition when input at http://aloserve.com/ftf/. The form submission itself doesn't get an error (no 403) but the browser, when trying to display the result, reports 'invalid feed.' (Again, the same submission works perfectly well in the same browser at fivefilters.org.)

3) Made the one-line script to get the raw feed http://feeds.feedburner.com/variety/news/tv. It's at http://aloserve.com/ftf/testfeedburner.php and it works fine too.

4) Altered one of the one-line scripts to get and display a non-existent URL. It doesn't get error 403. It gets what look like reasonable error messages under the circumstances:

Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/aloserve/public_html/ftf/testfeed.php on line 2

Warning: file_get_contents(http://feeds.notreallyatstarpulse.com/CelebrityBirthdays) [function.file-get-contents]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/aloserve/public_html/ftf/testfeed.php on line 2

So it looks as if these tests have failed to uncover a root cause for the problem.

What now?

Revision history for this message
Keyvan (keyvan) said :
#3

Mardy, thanks for providing further information. I'm afraid I have no idea why it's behaving this way for you. I tried the URL you mentioned you were having a different problem with, but it works fine for me in Firefox 3 - I see no invalid feed error: http://aloserve.com/ftf/makefulltextfeed.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fvariety%2Fnews%2Ftv&key=&max=4

Revision history for this message
Jon Brown (info-centerofsavings) said :
#4

Had the same problem. Contacted my host. The script was violating a mod rule they set up against hackers. They whitelisted my script and nw everything works GREAT!

Can you help with this problem?

Provide an answer of your own, or ask Mardy for more information if necessary.

To post a message you must log in.