1

I set up include_path in php.ini.

Then I call phpinfo()

And include_path differs from that I specified in php.ini.

What can cause this?

I modified the same php.ini as specified in "Loaded Configuration File" in phpinfo() call. php is called via apache module, I restarted apache - this also does not help.

I use Windows Vista, Apache/2.2.14 (Win32) PHP/5.3.1

I calls set_include_path("...") in the beginning of my php file, but this is good for temporary workaround only.

2
  • I was having this problem with a WAMP installation. It turns out that wamp\bin\php\phpX.X.X>php.ini, which I was manually editing, does not seem to be the one Apache reads from and the one it uses is wamp\bin\apache\Apache2.2.17\bin>php.ini Drove me absolutely crazy until I clicked on WAMP and went to PHP>PHP.ini and edited it from there, but you can access it directly in the directory above. Commented Sep 3, 2011 at 18:54
  • I am encountering exactly the same issue, but with PHP version 5.3.13. I am also running on windows. It seems that PHP is totally ignoring the include_path setting in php.ini. I have confirmed that the correct ini file is being read by changing other settings and they all change correctly. But no matter what I put in include_path, the include path is always set to ".;C:\php\pear". Commented Mar 12, 2013 at 0:30

3 Answers 3

1

One possibility is that there's a .htaccess file somewhere that is getting in your way. You can override php.ini settings in .htaccess files. E.g, in your .htaccess:

php_value include_path <path>
Sign up to request clarification or add additional context in comments.

Comments

0

Paste your include_path= entry from your php.ini. I know php.ini entries have to be on one line and you need to have your directories separated by colons, but otherwise theres no trick to it.

4 Comments

I run it windows platform. Colons are used to separate drive letter
Try changing other settings in php.ini and rechecking phpinfo(). Do those stay or change? Perhaps your php.ini can't be read by apache/php_mod due to security issues.
when I change php.ini in other places it is reflected on phpinfo() output
More than one include_path= setting in php.ini? Otherwise, I'm stumped.
0

you need to make sure that your include_path starts with ".:" .

1 Comment

yes, it starts with '.;' (semicolons instead of colons, because I use Windows)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.