as angellll said, its a permission problem to do with URL include http://....
Where is your script located? if it is located in the root directory of localhost why not try below:
Main Topics
Browse All TopicsI just noticed my website shows only white page, I have the following php code the link functions
<?php
// Links functions for all pages
$go = $_GET['go'];
switch ($go) {
case 'sitemap' : include_once 'http://localhost/info.php
break;
case 'help' : include_once 'http://localhost/contactu
break;
case 'beta' : include_once 'http://localhost/beta.php
break;
case '' : include "http://localhost/index.ht
break;
}
?>
I just upgraded my PHP to version 5 and it was working on version 4.
I didn't get any error, threrfore I installed XAMPP on my computer to see if the problem from my server or the code I have,
and the good thing in XAMPP is I can switch between PHP 4 and 5 with one click, so on PHP 4 it worked fine but on PHP5 I get the following error:
Warning: include() [function.include]: URL file-access is disabled in the server configuration in D:\xampp\htdocs\index.php on line 62
Warning: include(http://localhost/i
Warning: include() [function.include]: Failed opening 'http://localhost/index.ht
I checked Experts Exchange and Google for a solution for this error and the only thing I got from php.net is I have to enable allow_url_include in php.ini
but I done that and nothing changed still getting that same error message.!!
anyone got accross the problem before? could help me out.
Thank you,
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
as angellll said, its a permission problem to do with URL include http://....
Where is your script located? if it is located in the root directory of localhost why not try below:
Warning: require() [function.require]: URL file-access is disabled in the server configuration in D:\xampp\htdocs\index.php on line 62
Warning: require(http://localhost/i
Fatal error: require() [function.require]: Failed opening required 'http://localhost/index.ht
As angelIII said above allow_url_include needs to be on.
make a new file and put in the following code
<? phpinfo(); ?>
and check if allow_url_include is set to on.
Check also the path to the php.ini to make sure you are editing the correct one.
For any changes in php.ini to take effect you need to restart the server.
try the require without the http://? it is best to include/require your files without the http:// anyway as then the path is relative and only has to be in the same directory as the script. otherwise in the future when you upload your script to another server you will encounter problems with these include/require paths.
Can you try and change your code to:
case 'sitemap' : include_once 'info.php';
break;
case 'help' : include_once 'contactus.php';
break;
case 'beta' : include_once 'beta.php';
break;
case '' : readfile("index.htm");
break;
As mentioned, it is inefficient en unnecessairy to use include_once 'http://localhost/....'
Kind regards
-r-
ok, I tried everything you said and nothing changed,!!
but what I noticed the line allow_url_include is not showing in the PHP info page, even when i went to the file I see it set to "on" and I used the same php.ini file to edit that is listed under Configuration File (php.ini) Path : /usr/local/Zend/etc/php.in
Ok something is wrong here ....
Warning: require(http://localhost/i
D:\xampp\htdocs\index.php === Windows machine
Path : /usr/local/Zend/etc/php.in
???
Business Accounts
Answer for Membership
by: angelIIIPosted on 2007-11-18 at 21:49:18ID: 20310474
include_once, by default in php5, does not allow http references:
Warning: include() [function.include]: URL file-access is disabled in the server configuration
>the only thing I got from php.net is I have to enable allow_url_include in php.ini
yes, that is correct.
now, did you modify the correct php.ini? by default, it is the one in windows folder...
please clarify