{"id":1762,"date":"2008-02-10T18:58:29","date_gmt":"2008-02-11T02:58:29","guid":{"rendered":"http:\/\/lee.org\/blog\/archives\/2008\/02\/10\/installed-php_fastcgi\/"},"modified":"2008-02-10T19:02:02","modified_gmt":"2008-02-11T03:02:02","slug":"installed-php_fastcgi","status":"publish","type":"post","link":"https:\/\/www.lee.org\/blog\/2008\/02\/10\/installed-php_fastcgi\/","title":{"rendered":"Installed PHP_FastCGI"},"content":{"rendered":"<p>While FastCGI has been running, calls to WordPress have gone from about 4 seconds to 2 seconds. Calls to Mediawiki have gone from 8 seconds to 5 seconds. :-)<\/p>\n<p>I installed PHP_FastCGI on the blog and the (private) Flaming Lotus Girls wiki. I had tried installing it <a href=\"http:\/\/lee.org\/blog\/2006\/11\/05\/installed-fastcgi\/\">a year ago<\/a> but it proved unstable. New instructions were put on the <a href=\"http:\/\/wiki.dreamhost.com\/PHP_FastCGI\">Dreamhost wiki<\/a> and it&#8217;s been running well for the last few days. Here&#8217;s how I installed it:<\/p>\n<p>in my root WordPress folder, I created a file called php5-wrapper.fcgi. In it, I wrote:<\/p>\n<blockquote><p> #!\/bin\/sh<br \/>\nexport PHP_FCGI_CHILDREN=2<br \/>\nexec \/usr\/local\/dh\/cgi-system\/php5.cgi<\/p><\/blockquote>\n<p>and then set the file to be executable like so<\/p>\n<blockquote><p> chmod u+x php5-wrapper.fcgi<\/p><\/blockquote>\n<p>Then I added the following to the .htaccess file:<\/p>\n<blockquote><p>AddHandler fastcgi-script fcg fcgi fpl<br \/>\nAddHandler php5-fastcgi .php<br \/>\nAction php5-fastcgi \/php5-wrapper.fcgi<\/p><\/blockquote>\n<p>Done!<\/p>\n<p>Now 3 PHP sessions stays active, waiting for people to call on my server instead of PHP starting up every time I get a hit. When I run &#8216;ps aux&#8217;, I see the processes just sitting there, waiting. Sometimes there&#8217;s up to 6 processes temporarily.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While FastCGI has been running, calls to WordPress have gone from about 4 seconds to 2 seconds. Calls to Mediawiki have gone from 8 seconds to 5 seconds. :-) I installed PHP_FastCGI on the blog and the (private) Flaming Lotus Girls wiki. I had tried installing it a year ago but it proved unstable. New [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-1762","post","type-post","status-publish","format-standard","hentry","category-wordpress"],"_links":{"self":[{"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/posts\/1762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/comments?post=1762"}],"version-history":[{"count":0,"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/posts\/1762\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/media?parent=1762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/categories?post=1762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/tags?post=1762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}