aaah, PHP has a “per user” config file, and for web applications it’s not ~/php.ini

  • http://www.linuxspy.com/1141/how-to-enable-custom-php-ini-for-php-fcgi/ – where I found it described, once I knew, how it’s called
  • http://HOST.com/MY_PATH/info.php – has a row named “Loaded Configuration File”, and it says $HOME/public_html/cgi-bin/php.ini, if that file exists
  • $ php -i # this command line also has a row named “Loaded Configuration File”, and it says $HOME/php.ini, if that file exists
  • but you can let your PHP (command line) call know, which php.ini you want it to use:
  • $ php -c ~/php.ini …
  • and it can sit anywhere, e.g.
  • $ php -c ~/a/b/c/php.ini …

This lesson cost me quite some hours of lifetime. But it’s apparently a rather common PHP approach to have $HOME/public_html/cgi-bin/php.ini – even if you don’t use $HOME/public_html/cgi-bin or $HOME/public_html for anything else.

Why I did not find that php.ini myself? Well, I had no name for it.

Why did I not ask my web-space provider’s staff? Well, I did, but the right man only was in the office another 2 days later. And it was him, who explained me that.


Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.