Quote Originally Posted by Pannonian View Post
I was naively thinking that the php interpreter could be a relatively lightweight application, self-contained in the php installer, that could read a webpage request, send the appropriate instructions to a given database, process the data, and return the filtered data.
No what the installer will give you is a PHP interpreter + frontends (called SAPIs in PHP land). Here is roughly how the round trip works:

You: request http://localhost/script.php
Server + module: .php extension -> mime type -> configs -> must run this file and send its output instead
PHP interpreter: runs the script.php file -> sends output back to HTTP server
HTTP server: checks returned HTTP headers, depending on those sends the output (or redirect or whatever)
You: receive result from server.