So I followed the other posts and have the following PHP settings -- displayed using phpinfo()
allow_url_fopen On On
register_globals On On
safe_mode Off Off
I've placed the MagicPaser code and received this error: "could not open....{url here}"
Where {url here} is whatever .xml url I put (BBC, etc.)
I've got everything else working just fine; the MagicParser test file and so forth.
I feel like I'm missing something very small here. My host gave me access to a PHP.INI file that I can do whatever with. What am I missing?
Any help much appreciated. Thanks.
--Ariel
I've opened a ticket with our host, Aplus.net, the tech on the phone mentioned their firewall blocks connections of this nature. So even though fopen() is active, the data is being halted at the firewall. Interesting note for new users, would be a list of compatible hosts. Thanks for the help.
Hi Ariel,
The vast majority of hosts do not block fopen() of URLs, and also many people do not need to use this feature of Magic Parser so a list of hosts may confuse the issue.
Customers should also remember that I offer a full money back guarantee, so if it ever transpires that you are simply not able to use Magic Parser for any reason at all you can just let me know and I will refund your money.
All the best,
David.
Turns out it was 100% a firewall issue. I asked my host to allow access to the 1 site I'm pulling xml data from; they did; and now it works just fine. Thanks for all the help.
-ariel
Hello Ariel,
It is possible that although your host has given you control over some elements of php.ini, they may still have URL wrappers disabled. Magic Parser just uses fopen() to open whatever filename or URL you provide as the $url parameter, so you can test this outside of Magic Parser as follows:
<?php
$url = "http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/front_page/rss.xml";
$f = fopen($url,"r");
if (!$f)
{
print "Cannot fopen() URL - check config...";
}
else
{
print "OK!";
}
?>
Cheers,
David.