NYCPHP Meetup

NYPHP.org

[nycphp-talk] "mod PHP" vs. PHP

Chris Shiflett shiflett at php.net
Thu Jun 3 12:21:25 EDT 2004


> I have a somewhat stupid question: what's the difference between
> "mod PHP" and PHP?

That's a good question. In general, mod_php is specific - it indicates an
Apache module (like mod_* typically does). However, no one I know ever
really uses this term.

Contrast with Perl for a moment. In the beginning, there was Perl, the
language. It was a typical scripting language, complete with interpreter.
Years later, an Apache module called mod_perl was written, and this
allowed Perl programmers to do the same sort of things we do with PHP
(technically, it was an attempt to implement the entire Apache API in
Perl, so it's more flexible in some ways than PHP). So, in the Perl world,
it's pretty clear:

Perl = Regular interpreter
mod_perl = Web interpreter

With PHP, things are a bit different. We use:

PHP = Web interpreter
PHP CLI = Regular interpreter

The use of mod_php is also restricted to Apache (I don't think any other
SAPIs are called mod_php; correct me if I'm wrong), and unlike Perl, PHP
supports additional Web servers. So, we can't really use only the terms
PHP and mod_php to distinguish these uses anyway.

I'm not sure if that clarifies anything, but that's my view of history.

Chris

=====
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
     Coming Fall 2004
HTTP Developer's Handbook - Sams
     http://httphandbook.org/
PHP Community Site
     http://phpcommunity.org/



More information about the talk mailing list