Checking your PHP settings with phpinfo.php

A phpinfo.php file is invaluable for confirming that your PHP installation is working, and for viewing its configuration. …

Place the following script, named phpinfo.php, in Apache's document root. On a local installation this might be /var/www/html; on a remote shared hosting account, it might be /usr/www/users/USER.

// Show all information

In a web browser, view the script. On a local installation, the URL might be http://localhost/phpinfo.php; on a remote host it might be of the form If PHP is working you will see a report of its current configuration.

If you wish to confirm that you have successfully changed a configuration variable, simply refresh the browser. Beware, of course, browser caching issues.

When finished, remove phpinfo.php from world accessible servers when you are done with it. Otherwise your setup and potential vulnerabilities will be in the hands of every 14 year old cracker who knows how to Google. On local servers not accessible from the Internet, I usually leave it in place for future use.


About Warren Post

So far: Customer support guy, jungle guide, IT consultant, beach bum, entrepreneur, teacher, diplomat, over-enthusiastic cyclist. Tomorrow: who knows?
This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.

2 Responses to Checking your PHP settings with phpinfo.php

  1. Pingback: Installing and configuring PHP | A maze of twisty little passages

  2. Pingback: Diagnosing LAMP application problems | A maze of twisty little passages

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s