FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Warning: include() [function.include]:





DanielXP
I keep getting this error.

Quote:
Warning: include() [function.include]: URL file-access is disabled in the server configuration in C:\Program Files\xampp\htdocs\PN3\index.php on line 6

Warning: include(http://62.136.231.54/PN3/modules/login.php) [function.include]: failed to open stream: no suitable wrapper could be found in C:\Program Files\xampp\htdocs\PN3\index.php on line 6

Warning: include() [function.include]: Failed opening 'http://62.136.231.54/PN3/modules/login.php' for inclusion (include_path='.;C:\Program Files\xampp\php\pear\') in C:\Program Files\xampp\htdocs\PN3\index.php on line 6


with this code.

Code:
<?
$siteurl = "http://62.136.231.54/PN3";
include($siteurl."/modules/login.php");
?>


I have to include the sites URL other wise i can not send variables to the login page.

Please help!

Thanks,
DanielXP
MrBlueSky
You have to set allow_url_fopen to true in php.ini to include remote files using an url.

http://nl2.php.net/manual/en/ref.filesystem.php#ini.allow-url-fopen

On Windows this works only on PHP 4.3.0 and higher.
DanielXP
So this would work fine on the internet just not on my localhost?
MrBlueSky
DanielXP wrote:
So this would work fine on the internet just not on my localhost?


It will also work on your localhost. Just edit php.ini and restart PHP.

-- EDIT --

If your local Apache only accepts connections from 127.0.0.1 you have to use 127.0.0.1 instead of 62.xx... Then change this, if necessary, when you upload your file to your host.
DanielXP
OK.

Thanks mate.

Ps. I uploaded it onto my site for quickness.
Related topics
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.