Page 1 of 1

XAMPP - PHP Configuration

PostPosted: 31. December 2006 20:48
by Gamzarme
How do I configure the PHP options that I find when I call a file with "phpinfo()" inside it?

I'm wondering this because I have just uploaded my website onto my new server and it has some problems with the PHP code:

Code: Select all
Warning: include() [function.include]: URL file-access is disabled in the server configuration in /opt/lampp/htdocs/php/sidebar.php on line 41

Warning: include(http://192.168.1.100/php/sites.php) [function.include]: failed to open stream: no suitable wrapper could be found in /opt/lampp/htdocs/php/sidebar.php on line 41


I'm guessing that the second error is caused by the first due to a setting being wrong (as is displaying in the output).

Any chance of this being resolved?

-Patrick

PostPosted: 31. December 2006 21:35
by Wiedmann
Maybe allow_url_include (or allow_url_fopen) is set to "off".

BTW:
Normaly it make no sense to use a URL in the include statement.

PostPosted: 31. December 2006 22:39
by Gamzarme
Wiedmann wrote:Maybe allow_url_include (or allow_url_fopen) is set to "off".

BTW:
Normaly it make no sense to use a URL in the include statement.


How does one set that configuration? I am quite new at the PHP config. business.

Also, what is normally in an include statement? Can you give me an example of how you would use it?

-Patrick

PostPosted: 31. December 2006 23:28
by Wiedmann
How does one set that configuration?

In the file "php.ini".

Also, what is normally in an include statement?

A normal filesystem path.

Can you give me an example of how you would use it?

http://de.php.net/manual/en/function.include.php

Success!

PostPosted: 01. January 2007 00:47
by Gamzarme
Thanks, Wiedmann.

I had to add an entry in the php.ini file that was "allow_url_include" and set it to "On" as it didn't have that entry (though PHP 5.20 is supposed to, eh?).

But now it works, reading up a bit more on it on the Internet seems to reveal that the including and requiring functions are quite prone to attacks from hackers. That's a bit disturbing. Think it matters much or has PHP improved in security since those warnings were issued?

-Patrick