Author |
Message |
dosstx
Joined: 18 Sep 2014
Posts: 6
Location: Moon
|
Posted: Tue Oct 21, 2014 6:59 pm |

|
Hi,
I had the following script code working on my old server, but when I apply that same code to the new server we are migrating to, it won't work. It seems there is an issue with the php include and absolute URLS on the new server, but I am not 100% sure.
[code]
$XMLFILE="http://www.myblogfeed.com/?feed=rss2";
$TEMPLATE="sample-template.html";
$MAXITEMS="1";
include('rss2html.php');
?>[/code]
ANy ideas on how to troubleshoot?
|
|
|
 |
 |
dosstx
Joined: 18 Sep 2014
Posts: 6
Location: Moon
|
Posted: Tue Oct 21, 2014 7:00 pm |

|
[quote="dosstx"]Hi,
I had the following script code working on my old server, but when I apply that same code to the new server we are migrating to, it won't work. It seems there is an issue with the php include and absolute URLS on the new server, but I am not 100% sure.
$XMLFILE="http://www.myblogfeed.com/?feed=rss2";
$TEMPLATE="sample-template.html";
$MAXITEMS="1";
include('rss2html.php');
?>
ANy ideas on how to troubleshoot?[/quote]
|
|
|
 |
 |
Tech Support
Joined: 27 Aug 2004
Posts: 2688
|
Posted: Wed Oct 22, 2014 8:45 am |

|
|
 |
 |
dosstx
Joined: 18 Sep 2014
Posts: 6
Location: Moon
|
Posted: Wed Oct 22, 2014 3:32 pm |

|
Tech Support wrote: |
Are you getting any specific errors when script tries to execute or is it just yielding blank results? |
I found out that my server has 'allow_url_fopen' to 'off'. This may be why it doesn't work since it won't pull in the RSS feed from a remote domain.
Since I can't control the server that the script is on (only ftp access), do you have any other ways I could make this script work? What about pulling the feed in as and using through JSONP? Curl? How would I write it?
Thanks!
|
|
|
 |
 |
Tech Support
Joined: 27 Aug 2004
Posts: 2688
|
Posted: Wed Oct 22, 2014 3:50 pm |

|
Look in your rss2html.php file at around line 20 for this:
// Set the following variable useFopenURL to one if you want/need to use
// fopen() instead of CURL or FeedForAll_fopen()
$useFopenURL = 0;
If the value is 0 (as shown), then CURL will be used to fetch the feed files. If the value is 1 then fopen will be used.
Hope that helps.
|
_________________
Create RSS Feeds
Audio Recording and Editing
|
|
 |
 |
dosstx
Joined: 18 Sep 2014
Posts: 6
Location: Moon
|
Posted: Wed Oct 22, 2014 4:16 pm |

|
[quote="Tech Support"]Look in your rss2html.php file at around line 20 for this:
// Set the following variable useFopenURL to one if you want/need to use
// fopen() instead of CURL or FeedForAll_fopen()
$useFopenURL = 0;
If the value is 0 (as shown), then CURL will be used to fetch the feed files. If the value is 1 then fopen will be used.
Hope that helps.[/quote]
Isn't that the default setting for the script? I haven't touched the rss2html.php file. Looks like it wasn't working on my server if it is set like that out-of-the-box. I do know that curl is on, though.
|
|
|
 |
 |
Tech Support
Joined: 27 Aug 2004
Posts: 2688
|
Posted: Thu Oct 23, 2014 9:25 am |

|
|
 |
 |
dosstx
Joined: 18 Sep 2014
Posts: 6
Location: Moon
|
Posted: Thu Oct 23, 2014 4:49 pm |

|
Ooops. I found out that it's actually "allow_url_include" that is set to "off". I'm trying to get my server admin to set it to "on", but due to security reasons, I don't know if that will be allowed. Lets hope they can turn it on....
|
|
|
 |
 |
|