This blog is about C++, CakePHP, Linux, PEAR, PHP, Pyrus, Apache, and MySQL and related topics.

Tuesday, December 16, 2008

Use phpinfo() to find php.ini location and to check your PHP configuration settings

phpinfo() can be used to check your PHP configuration. For example,

(click image to enlarge)

When you run this script in your browser, (in my case it is http://localhost/phpinfo.php) you should get a response similar to the following:

(click image to enlarge)



As you can see a lot of info is displayed and you will have to scroll down quite a bit to read the whole page.

Notice the fifth item is the php.ini path. This tells you where you can find php.ini which is the php configuration file. The sixth item is the actual file itself. So now you know where to locate php.ini if you want to make any changes.



No comments:

Post a Comment

Followers