views:

75

answers:

4

My Environmental Variables (& I crosschecked every possible place in the Registry) show my PHP include path as: "C:\PHP\" --and PHP (5.2.9-2) works fine on the system, so that is correct. However, running

ini_get("include_path")

shows the path as "C:\PHP5\". This causes problems with PEAR, etc. I've searched the system (i.e. php.ini files, httpd.conf, & everywhere else I can think of--there are no .htaccess files) & can find nothing that points at PHP5. Where in the world is this coming from??

+1  A: 

Try searching for the literal PHP5 using a grep search tool (like windows grep http://www.wingrep.com/) it will take a while, but I think it's the best approach after you've checked all config files and environment variables.

Cheers

willvv
tried it: nothing!
Nat
A: 

Something could be setting it using ini_set.

Or, after running the aforementioned grep on the whole system, you can try these:

  • Debug PHP to see what causes this.
  • Use Filemon from Sysinternals to see what files PHP is accessing.
Gyuri
A: 

This isn't really an answer to your problem however if you install WAMP or XAMPP you can usually avoid all of these annoying configuration issues.

Not really. You often get issues that you wouldn't have with the original software, because these kind of packages add one more layer of complexity. For instance, php.ini is no longer in the default place or you even have several copies of the file.
Álvaro G. Vicario
I'm not sure, but I kinda think it was an installation of XAMPP -- since removed --that caused this.
Nat
+1  A: 

If you run a script with a call to phpinfo() PHP will tell you where the values come from:

<php

phpinfo();

?>

The top table will tell you what php.ini files it's reading and you'll find the value of the *include_path* directive in the Core table.

Álvaro G. Vicario
phpinfo() gives the same value as ini_get("include_path")
Nat
You asked where it comes from. The output of the command should provide the answer.
Álvaro G. Vicario