PHP Apocalypse ã¨ããåå¼·ä¼ã«åå ããæã«ä»¥ä¸ã®ãã¿ãè¦ã¦ãCAMP (Cygwin+Apache+MySQL+PHP) ã¨ããã®ããã£ã¦ãããããããªããã¨æã£ãã®ã§ãã£ã¦ã¿ãã
Apache, MySQL, PHP ã¯ãã¹ã¦ Cygwin Ports ãããã¦ã³ãã¼ãã§ãããããããã£ã¨å ¥ããã
ã¤ã³ã¹ãã¼ã«å¾ã« httpd ãèµ·åãããã¨ããããä½æ ãç¡è¨ã§ segmentation fault ãçºçããããã調æ»ããã®ãé¢åã ã£ããããä»ã® httpd ãæ¢ããã¨ã«ããã
Cygwin Ports ã§ä»ã«é å¸ããã¦ãããã®ã« lighttpd ããã£ãããããã¡ãã使ã£ã¦ã¿ãã
lighttpd ãã php ã使ãã«ã¯ FastCGI ãå¿ è¦ãããã¨ãããã¨ã§ããã追å ã§ã¤ã³ã¹ãã¼ã«ãã¦ããã
lighttpd ã®è¨å®ã¯ä»¥ä¸ã®ããã°ãåèã«ããã
å¤æ´ç¹ã¯ä»¥ä¸ã®ã¨ããã§ããã
- lighttpd.conf
--- lighttpd.conf.default 2012-01-09 00:28:05.000000000 +0900 +++ lighttpd.conf 2012-01-09 00:28:05.000000000 +0900 @@ -21,7 +21,7 @@ # "mod_auth", # "mod_status", # "mod_setenv", -# "mod_fastcgi", + "mod_fastcgi", # "mod_proxy", # "mod_simple_vhost", # "mod_evhost", @@ -212,14 +212,17 @@ #### fastcgi module ## read fastcgi.txt for more info ## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini -#fastcgi.server = ( ".php" => -# ( "localhost" => -# ( +fastcgi.server = ( ".php" => + ( "localhost" => + ( # "socket" => "/var/run/lighttpd/php-fastcgi.socket", -# "bin-path" => "/usr/local/bin/php-cgi" -# ) -# ) -# ) + "host" => "127.0.0.1", + "port" => 7743, + "docroot" => "/srv/www/htdocs", + "bin-path" => "/usr/bin/php-cgi.exe" + ) + ) + ) #### CGI module #cgi.assign = ( ".pl" => "/usr/bin/perl",
- php.ini ã® cgi.fix_pathinfo=1 ãè¨å®ããã(php_sockets.dll ã¯åå¨ããªãã®ã§è¨å®ããªãã¦ãè¯ãã¯ãã§ããã)
% /usr/bin/php-cgi.exe -b 127.0.0.1:7743
æºåãã§ããã localhost ã«ã¢ã¯ã»ã¹ãã¦ã¿ããä»å㯠/svr/www/htdocs é
ä¸ã« phpinfo.php (phpinfo ãå¼ã¶ã ãã®ã¹ã¯ãªãã) ãç½®ãã¦ã¿ãã
php ã® cygwin ãã¤ããªã FastCGI çµç±ã§èµ·åãã¦ãããã¨ããããã
ãã ããããã 㨠Apache ãããªããã CLMP ã«ãªã£ã¡ãããªã