cancel
Showing results for 
Search instead for 
Did you mean: 

[PAYH] - URL file-access is disabled in the server - Safe mode the culpit?

Tony_W
Grafter
Posts: 745
Registered: 11-08-2007

[PAYH] - URL file-access is disabled in the server - Safe mode the culpit?

Hi,
I am trying to do a PHP include:
<?php
include('http://www.username.f9.co.uk/filename.php');
?>

I am getting;
Warning: include() [function.include]: URL file-access is disabled in the server configuration in /var/www/vhosts/username.plushost.co.uk/httpdocs/php/filename.php on line 2
Warning: include(http://www.username.f9.co.uk/filename.php) [function.include]: failed to open stream: no suitable wrapper could be found in /var/www/vhosts/username.plushost.co.uk/httpdocs/php/filename.php on line 2
Warning: include() [function.include]: Failed opening 'http://www.username.f9.co.uk/filename.php' for inclusion (include_path='.:/opt/php52/share/pear:/usr/share/pear') in /var/www/vhosts/username.plushost.co.uk/httpdocs/php/filename.php on line 2

It works fine in ccgi and has done for years.
Is this again a problem with safe mode that means going through all of my pages (103 files affected) copying included material into the main file?
Tony
1 REPLY
Community Veteran
Posts: 767
Registered: 29-10-2008

Re: [PAYH] - URL file-access is disabled in the server - Safe mode the culpit?

Not safe mode this time. allow_url_include is off. It's a security feature that came in with 5.2. IMHO, it's a useful security feature on a shared platform. allow_url_fopen is still on, if that's any use  Sad
edit: rather than copy the the included material, you could move the files to PAYH and use a local path.
Gabe