Not sure what to do?


#1

I’m opening a file in my PHP code to search for in my searching code… I tested it and got this error:

Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /home/.petalwing/tbmain/tbmain.com/popup.php on line 109

What do I edit to get it to work?

Thanks for this great hosting thus far.


#2

DreamHost has disabled the PHP option allow_url_fopen for various security reasons. This means the functions such as file_get_contents() can only be used for local files, not files referenced by a full URL.

Fortunately, there are methods to overcome this limitation. One such option is to modify the relevant section of PHP code to use CURL, the wiki article below has more information on this.

http://www.wiki.dreamhost.com/CURL

Mark


Save [color=#CC0000]$50[/color] on DreamHost plans using [color=#CC0000]PRICESLASH[/color] promo code (Click for DreamHost promo code details)


#3

Aww, ok I see. Thank you. I didn’t realize I had full urls being searched. Hehe, simple problem. Thanks. :smiley: