PHP as Apache Module vs PHP as CGI Binary

Its a very important to know the differences between PHP as an Apache Module and PHP as a CGI Binary.

PHP installed as Apache Module

  • Inherits Apache’s Permissions
  • Considered feature rich
  • Plethora of options
  • Most servers support php as server module
  • Security issues might need some handling ( i am ok with it )

PHP as CGI Binary

  • Considered the worst possible way to deploy PHP
  • Slower compilation times as compared to Module
  • All php requests pass through the CGI (considered secure but dunno why ?)


Published by

Varun Krish

Varun Krish has been dabbling with computers and websites for almost 2 decades. He has traveled to over 30 countries and hopes to visit every country on earth one day. He is currently the Editor-in-Chief of and also advises startups and product companies on how to build better products. You can follow him on @varunkrish

Leave a Reply

Your email address will not be published.