18Dec/110
How to find your php.ini file
Finding your php.ini is pretty straight forward task:
- open terminal or cmd
- execute php --ini if php is undefined you should add it to your PATH or just execute "/your/path/to/php --ini"
- php.ini has several modes (path is different sometimes...):
- using one file:
Configuration File (php.ini) Path: /etc/php5/cli
Loaded Configuration File: /etc/php5/cli/php.ini - using several different files (will help to maintain common settings between cli php.ini and httpd php.ini
Scan for additional .ini files in: /etc/php5/conf.d
Additional .ini files parsed: /etc/php5/conf.d/ctype.ini,
/etc/php5/conf.d/curl.ini,
/etc/php5/conf.d/dom.ini,
/etc/php5/conf.d/gd.ini,
/etc/php5/conf.d/hash.ini,
............more .ini files here............files content could be "extension=gd.so" (unix) or "extension=gd.dll" (windows)
- there are two more options to get your ini files:
- execute in cli mode: "php --i | grep .ini"
- write your own script and check via browser:
<?php phpinfo(); ?>
That's it, now you can just edit your php.ini with anything you think you will need for future PHP programming.
More about php.ini may be found at http://php.net/manual/en/ini.php