Now Place:2uzhan.com » include_path problems in php.ini and .htaccess file

include_path problems in php.ini and .htaccess file

PHP @ May 6, 2003   Views:0

Hi all,

I am having a nightmare of trying to figure this out. My brother and I are working on a PHP application and we want to set the include_path, preferably in a .htaccess file for the project.

I have edited my main php.ini file so include_path is /sources/cvs/site and when I do a phpinfo() it shows that the Master include_path is set correctly to /sources/cvs/site, but the the Local include_path is set to '.' (current directory).

I have also created a .htaccess file with the following:

php_value session.save_handler user
php_value include_path /sources/cvs/core

And although the session.save_handler does work and the Local is 'user' and the Master 'files' which indicates that the .htaccess file is load. The problem is that the Local include_path still says '.'.

Any idea what is wrong with this?


OS: Debian Linux (testing)
PHP: 4.1.2
Apache: 1.3.27




The user-contrib notes on ini_set() mention that you can't override a value in php.ini with one in .htaccess. I imagine you've already read that? Seems strange, but might be true? EDIT: No, it doesn't ... what a fool I am... it says "httpd.conf", not "php.ini" ... oh, well, you still might try the following workaround...

What about setting both strings in the path in php.ini?


; UNIX: "/path1:/path2"
include_path = "./:/usr/local/lib/php/:/sources/cvs/core:/somedir/blah"
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
© 2018 2uzhan.com Contact