Dreamhost has disabled PHP's allow_url_fopen

"PHP's allow_url_fopen NOW Disabled (Action Required)

Posted: Apr 20th, 2005 - 03:43:34 PM PST (2 days 23 hours ago)

As previously announced on March 18, 2005, the allow_url_fopen PHP configuration has now
been turned off on all servers.
If you are currently using this functionality in your PHP code, there is a more powerful and
flexible option available. PHP provides excellent support for curl library and its associated
functions.
One of our own users has written a short article describing how it is used and that can be found
here:
http://blog.unitedheroes.net/archives/p/1630/
The official PHP documentation for it is here:
http://us2.php.net/manual/en/ref.curl.php

This change will significantly improve the security of PHP-based applications running on our
servers so we can spend more time giving you more features!

Happy DreamHost PHP Security Team"

I started getting weird wrapper errors on my site:
Warning: main(): URL file-access is disabled in the server configuration in /home/.balboa/starrysky/starry-sky.com/blends/entries/category.php on line 21

Warning: main(http://www.starry-sky.com/blends/header.inc): failed to open stream: no suitable wrapper could be found in /home/.balboa/starrysky/starry-sky.com/blends/entries/category.php on line 21

Warning: main(): Failed opening 'http://www.starry-sky.com/blends/header.inc' for inclusion (include_path='.:/usr/local/lib/php') in /home/.balboa/starrysky/starry-sky.com/blends/entries/category.php on line 21

and found out it was because they disabled the feature

<?php include('http://example.com'); ?>


So now any file like that has to be replaced with:

<?php <br>// create a new CURL resource <br>$ch = curl_init(); <br>// set URL and other appropriate options <br>curl_setopt($ch, CURLOPT_URL, "http://starry-sky.com/example/header.inc"); <br>curl_setopt($ch, CURLOPT_HEADER, false); <br>// grab URL and pass it to the browser <br>curl_exec($ch); <br>// close CURL resource, and free up system resources <br>curl_close($ch); <br>?>

and

<?php <br>// create a new CURL resource <br>$ch = curl_init(); <br>// set URL and other appropriate options <br>curl_setopt($ch, CURLOPT_URL, "http://starry-sky.com/example/footer.inc"); <br>curl_setopt($ch, CURLOPT_HEADER, false); <br>// grab URL and pass it to the browser curl_exec($ch); <br>// close CURL resource, and free up system resources <br>curl_close($ch); <br>?>

... So if you do get a strange wrapper error then you will have to change you php files with that code. If you don't get any errors then just ignore this email. It only messed up the header and footer of my sites, everything else seemed to work fine (like flinx, and phpfanbase)

If you have any questions, or problems please email me.

~Stephy