XAMPP - PHP Configuration

Problems with the Linux version of XAMPP, questions, comments, and anything related.

XAMPP - PHP Configuration

Postby Gamzarme » 31. December 2006 20:48

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
Gamzarme
 
Posts: 9
Joined: 30. December 2006 08:51
Location: Small-Town-Texas, United States.

Postby Wiedmann » 31. December 2006 21:35

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.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Gamzarme » 31. December 2006 22:39

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
Gamzarme
 
Posts: 9
Joined: 30. December 2006 08:51
Location: Small-Town-Texas, United States.

Postby Wiedmann » 31. December 2006 23:28

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
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Success!

Postby Gamzarme » 01. January 2007 00:47

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
Gamzarme
 
Posts: 9
Joined: 30. December 2006 08:51
Location: Small-Town-Texas, United States.


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 55 guests