Talk:PHP FastCGI

From DreamHost

Jump to: navigation, search

There are user comments in the article. Please limit user conversation and opinion to talk pages. -- Scjessey 16:30, 16 Jul 2006 (PDT)

User Comment
  1. "/dh/" is an alias for "/usr/local/dh" (at least on my login server, cupcake)
  2. When I left this as "/dh/cgi-system/php5.cgi" my MediaWiki site broke.
  3. When I changed the above path to "/usr/local/dh/cgi-system/php5.cgi" it worked fine - and sped up appreciably. YMMV though, "/dh/" might link to a different place on your server
Also, something (apache? CGI?) seemed to have some trouble with the blank lines (I got error messages for Lines 2 and 4 exactly as entered above), so I'd recommend using the following for your php5-wrapper.fcgi (exactly as entered):
#!/bin/sh
export PHP_FCGI_CHILDREN=3
exec /usr/local/dh/cgi-system/php5.cgi
End User CommentFungiblename 05:59, 18 Jul 2006 (PDT)

I actually found that using the above caused about four php5.cgi instances to spawn on every request and they would stay active for about an hour or so - each new request on my wiki would spawn a new instance and slow things down, which is exactly what this is supposed to avoid. I just deleted the "Children", and got a single persistent process:

#!/bin/sh
exec /usr/local/dh/cgi-system/php5.cgi

Then things sped up quite nicely. 12:39, 7 Aug 2006 (PDT)


Make sure there are no CRLFs in php5-wrapper.fcgi!

I was getting "comm with (dynamic) server abort" error when there were CRLFs in php5-wrapper.fcgi followed by the infamous "incomplete headers" error.

--Darren996 01:12, 26 Jan 2007 (PST)

Account may be disabled when using FastCGI with a custom php.ini

Use a custom php.ini is allowed. But if it hurts the server, that's not good and your account will be disabled. Jcisio 09:40, 27 June 2007 (PDT)

Uhmm.. no? That's completely wrong and unfounded information. Why do you say it "hurts" the server? In most cases it does the complete opposite. I'd say the only reason an account would be disabled for using fcgi and a custom php.ini, is when the user attempts to increase the maximum execution time for a script, essentially consuming well beyond the CPU cycles they should be. Memory limits are not an issue, as we're limited to 100megs anyways. Neither of which however "hurts" the server, but they do (or could) ultimately affect other users on it. Perhaps that's what you meant?
Personal tools