I am having trouble using php.ini. I have an include statement in one of my php files that fails to locate the include file. I am trying to use php.ini to set the include path using the “include_path” directive in the section titled:
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
Is there a way to specify the root web directory for a Windows server (the top level dir as seen by visitors to the site)? Is this the right way to do this?
The original problem was that the site was set up on a windows machine, but the code was set to use .htaccess. I requested a php.ini, as suggested by other posts on the jodo forums, and a php.ini was provided. I have been trying to use it, but it seems to be DOA. No matter how I set the include path, the resulting include path seems to point to: include_path=‘.;c:\php4\pear’
I have been able to use the ini_set function in a single file. But, I have only been successful in getting a relative path to work. I can’t seem to be able to access the home directory.
[ul]
[li]Works: ini_set(“include_path”, “../../../library”);
[/li][li]Doesn’t work: ini_set(“include_path”, “/library”);
[/li][/ul]
I also set up a linux version of the site and, in .htaccess, used the absolute path that was provided from the CP of the account. This worked! So, it would seem that I have the option to transfer the site to the linux machine. Probably, I will do that.
But, it still should be possible to use this code on a Windows machine. Is there someone out there who knows how to specify the home directory for a Windows account in the include_path directive? And also knows why php.ini would fail to work?