WebFaction
Community site: login faq

When I create a new PHP 5.4 app through the control panel, a file php54.cgi is created and my .htaccess file has:

Action php54-cgi /php54.cgi
AddHandler php54-cgi .php

However your blog article, PHP-5.4 is here says:

If you want to switch an existing PHP app to PHP-5.4 you can do so by putting this in a .htaccess file:

<FilesMatch \.php$>
    SetHandler php54-cgi
</FilesMatch>

So does this mean php54.cgi is not needed? What is the difference between the two methods? Do they both work? Which method should I use to convert an existing PHP 5.2 app to PHP 5.4?

asked 19 Nov '12, 02:53

user
471219
accept rate: 0%


The directions in the blog post target our newer servers. You're on one of our older servers, so it configures the PHP 5.4 apps a bit differently.

The FilesMatch + SetHandler method is actually more secure, so here's what I recommend if you want to convert an existing app:

Action php54-cgi /php54.cgi
<FilesMatch \.php$>
    SetHandler php54-cgi
</FilesMatch>

You'll also need to copy the php54.cgi symlink from an existing PHP 5.4 app into your PHP 5.2 app.

permanent link

answered 19 Nov '12, 12:14

seanf
12.2k41836
accept rate: 37%

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
×9

question asked: 19 Nov '12, 02:53

question was seen: 6,320 times

last updated: 19 Nov '12, 12:14

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