Results 1 to 3 of 3

Thread: Widget - URL file-access is disabled Error

  1. #1

    Thread Starter
    Frenzied Member StrangerInBeijing's Avatar
    Join Date
    Mar 2005
    Location
    Not in Beijing
    Posts
    1,666

    Widget - URL file-access is disabled Error

    I am playing around with widgets and using code generated by widgetmate (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:
    Code:
    <?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]");				
    ?>

  2. #2
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Widget - URL file-access is disabled Error

    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.
    PHP Code:
    ini_set('allow_url_fopen''1'); 
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  3. #3
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Widget - URL file-access is disabled Error

    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.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width