PHP.ini, include error problems, (SOLUTION)

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

PHP.ini, include error problems, (SOLUTION)

Postby Haxot » 17. December 2003 19:26

Hello,
I'm new here.
I ran into a problem getting files to include in my PHP programs.

.htaccess php_value directives are not compatible with XAMPP apache.
So you need to add the include directory to the php.ini file

First, I'm assuming you haev a more or less standard install of a LINUX style POSIX operating system

First figure out the directory for the include files.
For this example, I'm installing PHPOpenChat 3.xx

The include path for that is:
/opt/lampp/htdocs/phpopenchat-3.0.0b6/include

Now, change to the directory:
/opt/lampp/etc

run the command:
# grep -in 'include_path' php.ini

you should get an output similar to:

370:;include_path = ".:"
373:;include_path = ".;c:\php\includes"

the first part, the number, is a line number reference.


With the FIRST linenumber as linenumber, run the command:
# vi +linenumber php.ini

You'll be in the VI editor, editing PHP.ini, at the specified line number
type 'i' to go into insert mode.

;include_path = ".:"

remove the comment mark, the semicolon
include_path = ".:"

the path listed is erroneus, you need to change it to include the current directory first:
include_path = "./"

If you have a special include directory, add a ':' next
include_path = "./:"

Next, add in your extra directory
include_path = "./:/opt/lampp/htdocs/phpopenchat-3.0.0b6/includes"

if you ever need to add another directory in, you put another colon in, then the new include directory

When you are done editing:
hit the ESCape key, then :wq to write, quit, and go back to the command line.

When that's settled, restart lampp

Hope this helps someone.

Haxot
Haxot
 
Posts: 1
Joined: 17. December 2003 06:52

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 19 guests