0

A simple and maybe stupid question:

Can I use the exact same PHP code no matter whether PHP is installed as a module or as a cgi binary? I understand that the processing is different in these two cases but does Apache take care of it for me altogether (provided I have made the right settings in httpd.conf) or does it have to be reflected in the actual PHP code somehow? Could I port code from a mod_php solution to a cgi-bin solution without changing it?

fast-reflexes
  • 4,891
  • 4
  • 31
  • 44
  • There are a few odd things like [the apache extension](http://www.php.net/manual/en/intro.apache.php) which require the module, but generally it will work in both places. (I can't actually think of another besides the linked apache extension) – Michael Berkowski Apr 13 '13 at 13:46
  • Interesting.. thanks! – fast-reflexes Apr 13 '13 at 14:02

1 Answers1

0

Unless the PHP version itself is different (5.4, 5.3, etc), the same block of code will run the same regardless of the webserver software installed.

Madara's Ghost
  • 172,118
  • 50
  • 264
  • 308