By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,949 Members | 946 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,949 IT Pros & Developers. It's quick & easy.

include() not working properly

P: n/a
I've been running a XAMPP server for some time now, but I just tried to add
an include, and it says:

Warning: include() [function.include]: URL file-access is disabled in the
server configuration in M:\Server\htdocs\desktop\search.php on line 12

Warning: include( [function.include]: failed to open
stream: no suitable wrapper could be found in
M:\Server\htdocs\desktop\search.php on line 12

Warning: include() [function.include]: Failed opening
'' for inclusion (include_path='.;M:\Server\php\pear\')
in M:\Server\htdocs\desktop\search.php on line 12

I have opened up php.ini, and set allow_url_include = On . allow_url_fopen
was already allowed. Yet whenever I run phpinfo(), it reports that
allow_url_include is Off both locally and in the master. I have already
changed php.ini, and restarted the server, but it does nothing. Any


May 19 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a
To answer your question literally, open up your phpinfo() file and
ensure that the php.ini file you are editing is indeed the one being
used by the interpreter (on Windows systems, its easy to get multiple
php.ini files lying around).

However, you should not be remotely including files: doing so is an
incredibly bad idea, both from a security and performance standpoint.
If you are scraping Google's front page, use fopen or curl to retrieve
the file, and then echo it to the user. include() will allow remote
code execution on your computer.

HTML Purifier <http://htmlpurifier.orgStandards-compliant filtering

May 19 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.