How to determine which PHP Handler is set on a server

Is there a PHP command I can execute through a browser that will return which PHP Handler my server is setup to use?

Related posts

Leave a Reply

3 comments

  1. Create a page with the following –

    <?php phpinfo(); ?>
    

    Load that into your browser and will show you everything that you need to know about PHP running on your server including all enabled modules. The handler is listed as “Server API” on that page.

    DSO on Apache

  2. create a page phpinfo.php with the following content

    <?php phpinfo(); ?>
    

    Try visting the page, it should display all settings associated with your PHP installation.

  3. On the command line you can you can use

    /path/to/your/bin/rebuild_phpconf --current
    

    You will get a list of available handlers including the current one like this

    DEFAULT PHP: 5
    PHP4 SAPI: none
    PHP5 SAPI: suphp
    SUEXEC: enabled
    RUID2: not installed