PDA

View Full Version : Pausing RSS scroller: Death on my web



sig
04-30-2006, 01:59 AM
Script: Pausing RSS scroller
http://www.dynamicdrive.com/dynamicindex17/rsspausescroller/index.htm
Author: Dynamic Drive ( Hey, That's you!)

So, the script worked great :) for days on my site... then I did some installs on my site (including phpMyadmin for sql...) and now the script does not work.

1. I did not change any *.htm *.php or *js files as it relates to rss scroller...

2. The sever (omnis.com) seems to be the problem, because I own a couple domains on the same server, and when I upload the script to other sites it still does not work. see:
site 1 (standard): http://www.awig.org/rss
site 2: http://www.bcacricket.org/test/index_use.htm

So the big question is: what php.ini settings can I change in my default settings file for my domain? And what other reasons this dreadful death could of been cause? :confused:


ps:
I have read and done all at this thread: http://www.dynamicdrive.com/forums/showthread.php?t=8672 Nothing worked!

ddadmin
04-30-2006, 04:52 AM
Is your server even configured to run php scripts? One of the first things to do when you're trying to debug the RSS scripts, whether Pausing RSS scroller or RSS ticker, is to try and run the scrollerbridge.php script directly with an appropriate parameter. In your case, if I run:

http://www.awig.org/rss/lastrss/scrollerbridge.php?id=cnn

The browser prompts me to download the file instead of output something on the screen, a sign that your server isn't configured to run PHP files.

Have you asked your web host about any changes to PHP lately?

sig
04-30-2006, 01:39 PM
Well, considering that all my other PHP scripts are working, and the fact that it (rss scroller) worked for days and days, then just stoped. It tells me that I do have php support. I have a php search on the site, it works. I have phpbb it works. I have a poll app in php, and that works too.... so I think you are right in the sense that the configuration of the php "changed" recently.

I can't contact them (web host) until tomorrow to ask about their changes but my (domain) server allows me to config my own php settings, via php.ini in my root /etc folder.

Not being any kind of expert on php... I can oly assume that because phpBB and other php apps work, it must be a setting I mess up... but not in your script because I did not modify the "core" script code.

see: http://www.bcacricket.org/test/index_use.htm

It has the rss about midway down..... and this is the site where other php works (phpBB)....

I know we can solve this!!!! :cool:

ddadmin
05-01-2006, 04:47 AM
Ok, if you're sure PHP is working on your server, the next likely problem is that your server somehow cannot handle JavaScript (.js) mine types. This is relevant to scrollerbridge.php by way of this line inside it:


Header("content-type: application/x-javascript");

To test this theory, edit the above line to something like:


header("Content-type: text/plain");

If by changing this then visiting http://www.awig.org/rss/lastrss/scrollerbridge.php?id=cnn inside your browser displays some text, then that confirms the issue. Talk to your host about enabling .JS mine types, either inside httpd.conf or elsewhere.

sig
05-01-2006, 10:22 PM
Got it solved. Web server reboot and the Zend Optimizer upgrade did the trick... thanks so much.

Now: can RSS Scroller get a back and forward button! :)

ddadmin
05-02-2006, 12:39 AM
Glad to hear.


Now: can RSS Scroller get a back and forward button!

Now that's a feature request, and there's quite a line up with that line. :) I do have plans to create a manual RSS viewer soon, where the user can manually go back and forth between RSS items.

dynamiczed
05-27-2006, 05:34 PM
Hi!

I have a similar problem to Sig - take a look at the page in question: http://zappsinc.awardspace.com/demo.htm

I am pretty (99%) sure my server supports php, and I've followed the instructions on the Dynamic Drive page (http://www.dynamicdrive.com/dynamici...ller/index.htm) to the letter... yet when the scroller loads, it returns a "Sorry: It's not possible to reach RSS file http://rss.cnn.com/rss/cnn_topstories.rss" error.

I tried your trick, ddadmin, of going to http://zappsinc.awardspace.com/lastrss/scrollerbridge.php?id=cnn, and although I don't get prompted to download the file, I do get that same error string.

Have you got any ideas what might be wrong? It's probably something really obvious, knowing my luck!

Thanks in advance!
DZ

nelsontimken
05-27-2006, 09:18 PM
I couldnt get it to work at ALL on my site. THEN I found out that they do NOT permit the "FOPEN" and similar PDP commands on my webhosting server.

My only hope is that someone can MODIFY this script using cURL commands instead, but no one has yet.

Nelson

ddadmin
05-27-2006, 09:21 PM
Hi DZ:
It's hard to say exactly what the problem could be based just on the error:

"Sorry: It's not possible to reach RSS file http://rss.cnn.com/rss/cnn_topstories.rss"

though it does indicate the problem is on the server side. The most obvious thing to check first is that the path to your "cache" directory inside scrollerbridge.php is correct:


$rss->cache_dir = 'cache'; //path to cache directory on your server relative to scrollerbridge.php. Chmod 777!

This assumes that the "cache" directory is directly beneath where "scrollerbridge.php" is, and that it's chmodded to 777 to allow read/write. Look inside this directory via FTP to make sure the script has deposited some "cache" files into it, indicating it has read/write permissions.

dynamiczed
05-28-2006, 01:16 PM
Hi ddadmin!

Thanks for your speedy response! I have checked the scrollerbridge.php file, and the link to the cache directory is correct: the cache folder is on the same level as the php file (http://www.zappia.co.uk/zappsinc/stuff/cache-folder.jpg), so the reference sould be simply "cache". That's right isn't it?

The cache has 777 permissions, and there are cache files inside it (eg: "rsscache_4a557f2f685dba25493c4f53092d421c") - so that bit is surely working.

What else could be wrong, do you think?

Thanks!
DZ

ps: sorry about the double post - won't do it again. :o

ddadmin
05-28-2006, 05:25 PM
Hmmm the URL http://zappsinc.awardspace.com/lastrss/scrollerbridge.php?id=cnn now correctly returns a JavaScript array of RSS contents in Firefox, and for demo.htm, at least the first scroller now displays the feeds. In IE though, viewing scrollerbridge.php causes the browser to prompt that it doesn't recongnize the file type being returned (should be JavaScript).

Without more info I'm not sure what else to suggest, though it seems to be the problem is with your server configuration, either not running PHP in a stable fashion, or configured to recongize the JavaScript minetype correctly...

nelsontimken
05-28-2006, 06:05 PM
I had the same problem, and as I said before, the problem was that certain comments in the lastRSS PHP file, namely fopen's were disabled.

dynamiczed
05-28-2006, 11:45 PM
Ahhh... so the server's capabilities are at fault then? It's a free one, so I wouldn't be surprised if their php support is a little sketchey.

Nelson, how did you solve your problem? When you say the 'fopen' comments were 'disabled' - who disabled them; an error in the php file, or something to do with the server?

Thanks, both of you!

ddadmin
05-28-2006, 11:57 PM
Well, fopen (http://ca.php.net/manual/en/function.fopen.php) is just a PHP function, though if your server's PHP is running under Safe Mode, it may not allow fopen to fetch external pages (from outside domains). So in a way, if that's in fact the problem, your web host has limited the ability of PHP's fopen.

dynamiczed
05-29-2006, 10:43 AM
Ahhh right.

I've had a look in my server's settings, and under the PHP specifics, it says "allow_url_fopen = On" along with lots of other settings. So, I expect that means that the fopen command is allowed?

Is there anything else that could be wrong?

nelsontimken
05-30-2006, 03:12 PM
When fopen and similar commands that fetch URLs from outside sources are disabled by your web host, which is done, so they say, for security reasons, fopen and get commands do not function.

My server, Dreamhost, has these commands disabled. Apparently, the only way around it is for someone to rewrite the PHP script lastRSS, using cURL commands, which I, being a noob, have no idea how to do.

Dreamhost also says that using the allow_url_fopen=on command will NOT override their security patch.

You will have to ask your webhost for specifics.

In the meantime, DDadmin, can anyone out there re-write this script using cURL commands so us newbies can have this nice RSS feed script on our sites?

Nelson

dynamiczed
05-30-2006, 04:44 PM
Ooh yes please... this is such an amazing script, and if someone could rewrite part of it to make it work on our annoying hosts, then we'd bestow you with bucketfulls of good karma.

Also, can anyone reccomend a good (free?) host which supports php well?

Thanks!
DZ

ddadmin
05-30-2006, 10:37 PM
I probably won't be rewriting LastRSS itself, as it just complicates things when it comes to supporting this script. However, I have been thinking of using MaggieRSS (http://magpierss.sourceforge.net/) as the backend for the next RSS related DHTML script. I haven't looked into whether MaggieRSS uses cURL, though it might even support both methods of URL retrival.

nelsontimken
05-31-2006, 01:25 PM
DDadmin:

Magie RSS may work - one of the features I note is:

"Does not use fopen(), work even if allow_url_fopen is disabled."

This may allow those of us on servers with fopen disabled to use RSS feeds. I look forward to this edition of the RSS scroller.


Nelson