[pmwiki-users] remote fopen versus curl get?

marc gmane at auxbuss.com
Tue Jan 30 06:01:20 CST 2007


Russ Fink said...
> Russ Fink wrote:
> Hello,
> 
> I have a problem on your site with my wiki.  The RSS feeds don't work on the 
> following page:
> 
> http://finalscoretrivia.com/Main/DailyTrivia
> 
> Further, the map links don't work on this page:
> 
> http://finalscoretrivia.com/MD/Locations
> 
> In both cases, my wiki software is trying to go out and fetch data from the 
> web and populate the form.  Is there some security feature that is set that 
> is disabling this access?  What is the workaround?
> 
> Thanks,
> Russ Fink
>
> ----
> Russ,
> 
> Remote fopen is denied in PHP, if that is what the wiki is using. This 
> prevents almost all of the typical 'hacks' that script kiddies use against 
> people's php-based software / forums / etc.
> 
> Is there a different way that the wiki can fetch that data? If they use a 
> curl get, it'd work fine. There may be a way to configure it to not use 
> remote fopen (if that is how it is doing it).
> ----
>
> Does anyone know what this guy is talking about?  New hosting provider...

Best not to top post when the thread needs to be followed.

What he's saying is that, in their setup, the PHP fopen() function 
cannot be used to access remote sites. This technique is often used for 
'scraping' a site for data. This is actually a very useful thing to be 
able to do, but I think it is common for shared services to block it, 
which is daft, imo. (It saves them effort, but shifts the problem to the 
honest user.)

If you take a look at phpinfo() for your site, you will see that 
allow_url_fopen is set off. 

If you are using fopen() in the cases you mention, then your host is 
saying that it isn't going to work, because they've blocked it.

He then suggests an alternative technique to do the same thing. This 
begs the obvious question of why block fopen()! 

-- 
Cheers,
Marc




More information about the pmwiki-users mailing list