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

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 :)


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

There are two options:

  1. Create a info.php file and see what “Server API” says:
<?php phpinfo(); ?>
  1. 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