Join the DZone community and get the full member experience.Join For Free
Jumpstart your Angular applications with Indigo.Design, a unified platform for visual design, UX prototyping, code generation, and app development.
Drop this little piece of code into a file and place it on your web server. What you SHOULD get back is a string describing your old include path. If you get false, you have hit the problem I hit last night. I went so far as to recompile 2 difference versions of Apache thinking (almost correctly) that it was something that had changed in my Apache config files.
Like most Apache installs, my development server has a single config file for each domain. (In my case they are all *.dev domains, I don't host any live domains on my cable modem) In each config file, I set not only Apache settings but some defaults for things like php's include path for that domain. Here's an example for my development are for calevans.com
ServerAlias www.calevans.dev calevans.dev
CustomLog logs/dummy-host.example.com-access_log common
php_value include_path /usr/local/lib/php:/home/phpinc/:/home/calevans.com/phpinc
As you can see, I use php_value to set the default include path. However, for some reason, I had started using php_admin_value to set it and other settings. After 4 long hours of banging my head on this, my friend Davey Shafik popped into #phpwomen (yes, I hang out there...its like taking "Home Economics" in high school, you do it because it's where all the girls are) and said:
[22:54] Davey: I know what it is ;)
[22:54] Davey: php_admin_value include_path
[22:54] Davey: you have that somewhere
[22:55] Davey: you *cannot* override php_admin_value settings
Son-of-a-gun if he wasn't right. For some reason I had started using php_admin_value instead of just php_value. php_value can be overridden in your code, however, php_admin_value tells PHP not to allow the value to be overridden.
Why is this important
If you are working with Zend Framework, then this is VERY important. Zend_Loader temporarily modifies the include_path when including things like Controllers. If it can't do so, your apps will fail in a most spectacular way.
Wife 1.24 (The lovely and talented Kathy) says that now I know how everyone else feels when I walk over and solve problems. (I have a tendency to do that and am usually pretty snarky about it when I do)
Originally Posted on Postcards From My Life. Used by permission.
Opinions expressed by DZone contributors are their own.