PDA

Click to See Complete Forum and Search --> : Widget - URL file-access is disabled Error


StrangerInBeijing
Jan 16th, 2008, 02:11 AM
I am playing around with widgets and using code generated by widgetmate (http://www.widgetmate.com) (feel free to suggest me something better!)

I'm still working on my local machine, but when I paste in the auto generated code into my page I get an error that say:Warning: include() [function.include]: URL file-access is disabled in the server configuration in D:\www\dummysite\include\home_left.php on line 30

I looked around but the only advice I got was to set allow_url_fopen = On in my php.ini, and that was already set to on.

heres the code i pasted in:
<?php
include("http://www.widgetmate.com/news/news_feeder.php?keyword=studypath%2C+e-learning&type=HID&height=270&width=185&border=1&bordercolor=%23000000&textcolor=%23000000&backgroundcolor=%23FFFFFF&linkcolor=%23DD9B7A&scroll=1&scrollspeed=2&fontfamily=Arial%2C+Helvetica%2C+sans-serif&fontsize=12&v=1.0&rhost=$_SERVER[HTTP_HOST]$_SERVER[SCRIPT_NAME]");
?>

visualAd
Jan 16th, 2008, 07:53 AM
Do a call to phpinfo(); and look for the directive, it should say off in there. This could have been configured in your web server configuration. A call to ini_get should fix the problem.

ini_set('allow_url_fopen', '1');

visualAd
Jan 16th, 2008, 09:34 AM
I recommend you don't take my advice though. Doenload the source code bacuse URL fopen is dangerous. Assume someone hijacks the server an replaces the code, or conducts a man in the middle attack.

If you do need to use it I would suggest you get the SHA1 hash of the code and store / compare it when the document is downloaded.