MEM MEM - 3 months ago 64
PHP Question

phpinfo - an easy way for seeing it?

Each time I want to see the

I have to:

create a info.php file;
in it.
go to the browser and type my ""

I'm on Ubuntu and my question is..
Isn't there a more practical way to see phpinfo on the browser ?



From your command line you can run..

php -i

I know it's not the browser window, but you can't see the phpinfo(); contents without making the function call. Obviously, the best approach would be to have a phpinfo script in the root of your apache directory, that way you have access to it at all times via http://localhost/info.php or something similar.

EDIT: As mentioned by binaryLV, its quite common to have two versions of a php.ini per installation. One for the command line interface (CLI) and the other for the apache interface. Make sure you either symlink the CLI version to the apache one, or are only using one ini.