Okay, I just set up my first dedicated server and moved some existing sites over to it. Everything is running fine, except a script that I have in one of my blocks that calls a file on another server. When I try to view the site, I get the following error

Failed opening required 'http://www.example.com/somefile.txt' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /
home/example/public_html/includes/common.inc(1201) : eval()'d code on line 43

The code that's throwing the error is:

$fp = @fsockopen("www.example.com", "80",$errno, $errstr,
$timeout="5"); if($fp) { require ''http://www.example.com/act/partner/
inclusion.php"; }

And for what it's worth I changed require to include and it then
threw:

URL file-access is disabled in the server configuration

Now, I've checked and made sure that allow_url_fopen is on and
safe_mode is off. But I still get an error so I'm missing something
somewhere.

Anyone have any ideas what other settings I should be looking at?

Thanks,
Jeremy

Comments

jweiss’s picture

added allow_url_include = On to the php.ini file and all is well now.