no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | php_cgi [2014/10/10 22:32] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== PHP CGI ====== | ||
| + | * [[Apache]] | ||
| + | * [[Apache fcgid]] | ||
| + | * [[Apache suExec]] | ||
| + | * [[Apache Worker MPM PHP CGI Suexec Setup]] | ||
| + | * [[PHP]] | ||
| + | |||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | * [[http:// | ||
| + | |||
| + | === Gentoo === | ||
| + | |||
| + | Install apache with threads, mpm worker, plus mod_fcgid package and add -D FCGID to apache2 conf. | ||
| + | |||
| + | In the Directory configuration of every site, add this: | ||
| + | |||
| + | < | ||
| + | < | ||
| + | Options -Indexes FollowSymLinks +ExecCGI | ||
| + | AddType text/html .php .phps | ||
| + | AddHandler php-fastcgi .php .html .htm .js | ||
| + | Action php-fastcgi / | ||
| + | DirectoryIndex index.php index.html | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Add this so it is global: | ||
| + | |||
| + | < | ||
| + | ScriptAlias /cgi-bin/ / | ||
| + | < | ||
| + | Options +ExecCGI | ||
| + | Order allow,deny | ||
| + | Allow from all | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | The '' | ||
| + | |||
| + | < | ||
| + | #!/bin/bash | ||
| + | PHP_CGI=/ | ||
| + | PHP_FCGI_CHILDREN=4 | ||
| + | PHP_FCGI_MAX_REQUESTS=1000 | ||
| + | export PHP_FCGI_CHILDREN | ||
| + | export PHP_FCGI_MAX_REQUESTS | ||
| + | exec $PHP_CGI | ||
| + | </ | ||
| + | |||
| + | == Parsing .phps == | ||
| + | |||
| + | If you want to use .phps to parse the source file and display it in colored format, you need to update the Apache config file and create a new CGI shell script with slight differences. | ||
| + | |||
| + | < | ||
| + | AddHandler phps-fastcgi .phps | ||
| + | Action phps-fastcgi / | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | #!/bin/bash | ||
| + | PHP_CGI="/ | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | |||
| + | === Migration to PHP CGI === | ||
| + | |||
| + | There will be some things that need to change when migrating from a module to CGI. | ||
| + | |||
| + | == .htaccess PHP changes == | ||
| + | |||
| + | Things like php_value and php_flag must be put somewhere else. | ||
| + | |||
| + | If you are running a custom php.ini for the site, you can make them directly there. | ||
| + | ==== Debugging ==== | ||
| + | |||
| + | == No input file == | ||
| + | |||
| + | If you run into an issue where it says "No input file specified", | ||
| + | |||
| + | The most likely culprit is '' | ||