How can I find what kind of php handler my LAMP stack is running on?

June 10, 2015 1.3k views
PHP Apache Server Optimization Caching Ubuntu

I am configuring my just freshly created LAMP Droplet. A lot things have changed since last time I've been poking around with servers.. So it's a bit some learning curve for me. And I am having hard time to figure out what php handler is my server running on. Is it FastCGI, suPHP or DSO? Looks like DSO.. But cant confirm that yet.
Im sure there are some terminal commands or other ways to find out this.
I'd like to know that to choose appropriate OpCache.. Such as APC, APCu, OPcache or something else..

Any ideas?
Thank you in advance :)

1 Answer

There are two options:

1) Create a info.php file and see what "Server API" says:

<?php phpinfo(); ?>

2) Go to your command line and execute:

user@machine:/$ /path/to/your/bin/rebuild_phpconf --current
PHP4 SAPI: none
PHP5 SAPI: suphp
SUEXEC: enabled
RUID2: not installed
  • Hi @23r01nf1n17y ,
    Thank you for stopping by..

    And thanks for the "Server API", a quick search on info page showed me I have Apache 2.0 Handler.

    I have found on internet about rebuild_phpconf command.. But I haven't found it on my machine.,.

Have another answer? Share your knowledge.