PHP phpinfo() on the fly

On November 14, 2008, in Linux, by Chris Carey

Here is a little trick to get phpinfo() information on the fly.

You need php-cli installed (sometimes its called php4-cli or php5-cli)


echo "<?php phpinfo(); ?>" | php4
echo "<?php phpinfo(); ?>" | php5
echo "<?php phpinfo(); ?>" | php5-cli

etc

You can also tack on a | grep at the end if you want to filter for certain words.

 

2 Responses to PHP phpinfo() on the fly

  1. ryan says:

    Even better:

    php -i
    php4 -i
    php5 -i
    php5-cli -i

  2. Nice info. I’ve never known that there are variations in displaying this phpinfo. Gonna try these out. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>