WebFaction
Community site: login faq

I am interested in trying out PHP over FastCGI for some possible performance increases. I added the .htaccess directive

AddHandler php52-fcgi .php

to a test site, just to see. A few questions:

  • How do I know it's running? I was told running FastCGI would count against my account's memory, but I don't see a process under my user or anything.
  • Does removing the .htaccess directive seamlessly switch back to not using FastCGI?
  • If I run under FastCGI, are the php.ini files I have still respected?

asked 12 Feb '12, 13:13

SethKinast
258211
accept rate: 54%


The example that is currently up in our blog is not correct. The correct directive is:

<FilesMatch \.php$>
    SetHandler php52-fcgi6
</FilesMatch>

Once you've set that, you'll know it's working after you access your site and see the php52.fcgi processes running.

Removing the directive does switch you back to regular PHP-CGI, but your FastCGI processes might persist for a while. You can kill them if you want to with the following command: pkill -u $USER php52.fcgi

Your php.ini files will still be respected under FastCGI.

Sorry for the confusion re the blog post - we'll have that corrected ASAP.

permanent link

answered 12 Feb '12, 14:00

seanf
12.2k41836
accept rate: 37%

edited 05 Nov '12, 02:00

ryans ♦♦
5.0k93360

Thanks much :) makes sense now why I didn't see any new processes showing up!

(12 Feb '12, 15:07) SethKinast

This is now covered in our PHP Documentation. Note that a php.ini file will not work - it should be named .user.ini instead. Hope that helps!

(29 Jun '12, 19:24) ryans ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×262
×11

question asked: 12 Feb '12, 13:13

question was seen: 5,872 times

last updated: 05 Nov '12, 02:00

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM