Call PHP from virtual/custom “web server”

Invoking a CGI script is pretty simple. PHP has a few peculiarities, but you basically only need to setup a list of environment variables, then call the PHP-CGI binary: setenv GATEWAY_INTERFACE=”CGI/1.1″ setenv SCRIPT_FILENAME=/path/to/script.php setenv QUERY_STRING=”id=123&name=title&parm=333″ setenv REQUEST_METHOD=”GET” … exec /usr/bin/php-cgi Most of them are boilerplate. SCRIPT_FILENAME is how you pass the actual php filename to … Read more