PHP issues

Not sure what I’m doing wrong. I’m fairly new to PHP and the like so maybe I’m making a simple error or something, but I’m trying to implement a PHP comments script I have uploaded pnto my server onto my pages.

The script is working perfectly and when I post a “test” comment on the actual comments.php file, everything works ace. But when it comes to embedding it in a page, this is what I see in its place;

Warning: main(): URL file-access is disabled in the server configuration in /home/.fresh/shreddercfh/senatorspicy.com/dan/0001.php on line 4

Warning: main(http://www.senatorspicy.com/comments/comments.php): failed to open stream: no suitable wrapper could be found in /home/.fresh/shreddercfh/senatorspicy.com/dan/0001.php on line 4

Warning: main(): URL file-access is disabled in the server configuration in /home/.fresh/shreddercfh/senatorspicy.com/dan/0001.php on line 4

Warning: main(http://www.senatorspicy.com/comments/comments.php): failed to open stream: no suitable wrapper could be found in /home/.fresh/shreddercfh/senatorspicy.com/dan/0001.php on line 4

Fatal error: main(): Failed opening required ‘http://www.senatorspicy.com/comments/comments.php’ (include_path=’.:/usr/local/lib/php’) in /home/.fresh/shreddercfh/senatorspicy.com/dan/0001.php on line 4

senatorspicy.com/dan/0001.php” being the page I’m trying to test it on.

What is preventing me from being able to embed my comments.php into pages I would like it to appear on?

This is not nearly as bad as it looks, and is all the result of DreamHost disabling Allow url_fopen on the shared servers. This is for your own protection, as that is an easily abused “feature” of PHP.

The fix, in your case, is really easy. Take a look at the DreamHost Wiki Article on Allow url_fopen and all will probably be pretty clear. If not, post back and we will see if we can help you get it sorted.

–rlparker

You’re right, that ended up being a piece of cake. Thanks a ton, I appreciate it.