---
title: "Viewing PHP settings"
date: "2015-01-04"
category: "php"
slug: "viewing-php-settings"
---

PHP settings can be viewed using [phpinfo()](http://php.net/phpinfo) for a full environment dump, or [ini\_get()](http://php.net/ini_get) for individual values.

## Viewing Default Environment Settings

Create a file named `phpinfo.php` in your [[where-is-site-content-served-from]] with the following content:

<?php phpinfo(); ?>

Access it via your browser (e.g., `http://example.com/phpinfo.php`).

![Example phpinfo() response](kb-image:phpinfo-example.png)
*Example phpinfo() response*

## Viewing Application-Specific Settings

Web applications like WordPress, Drupal, and Joomla! automatically adjust PHP settings at runtime (e.g., `error_reporting`, `display_errors`, `upload_max_filesize`). A standalone `phpinfo.php` file only shows the server defaults, not the values your application uses.

To view the effective settings for a running application, use `ini_get()` or `phpinfo()` at the end of the application's main script (usually `index.php`):

/\*\* some application code ... \*/
$page->init();
?>

<?php print "memory\_limit setting: "; ini\_get('memory\_limit'); ?>

<?php phpinfo(); ?>

If the end of the script is HTML rather than PHP, insert the code before the closing `</body>` tag:

<!--- some html ... -->
<span>Thanks for coming!</span>
<?php print "memory\_limit setting: "; ini\_get('memory\_limit'); ?>
<?php phpinfo(); ?>
</body>
</html>

**Note:** The `memory_limit` setting can only be changed via a support ticket in the [[logging-into-the-control-panel]].

## See Also

- [[changing-php-settings]]
