WebFaction
Community site: login faq

Apologies -- I am new to WebFaction and this way of doing things. I set up an app earlier which uses PHP 5.3, but what do I need to do to change it to 5.4 for example? I didn't see a way to do this in the control panel without deleting the application (and its 2000 files) and recreating it.

I have seen things about adding a handler in the .htaccess file, but I am not sure whether that works considering it's configured to use 5.3 in the panel. I guess I am just looking for a simple answer without risking messing stuff up.

Thank you

asked 04 Mar '13, 01:14

JoshH99's gravatar image

JoshH99
2516
accept rate: 0%


Add this code to .htaccess to change the version,

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

answered 04 Mar '13, 01:17

johns's gravatar image

johns ♦♦
4.7k29
accept rate: 22%

Unfortunately this prevents the use of local php.ini (or .user.ini files)

(03 Sep '16, 09:59) alexanderhowell alexanderhowell's gravatar image

No, a php.ini can still be used even after adding the above to a .htaccess file.

(03 Sep '16, 11:11) aaront ♦♦ aaront's gravatar image

This fixed a Wordpress theme error for me. Thanks!

Is there a way to effect this change to all apps' (Wordpress, in my case) .htaccess files universally?

permanent link
This answer is marked "community wiki".

answered 31 Oct '13, 14:31

jffbrwn's gravatar image

jffbrwn
12
accept rate: 0%

edited 31 Oct '13, 14:32

Sure, just put the code in a .htaccess file in the root of your home directory, and make sure you don't have any conflicting code in .htaccess files below that.

(31 Oct '13, 14:34) seanf ♦♦ seanf's gravatar image

Perfect. Thanks!

(31 Oct '13, 14:48) jffbrwn jffbrwn's gravatar image

Somewhat related: i have created an app using Static /Php 5.5 , but this is breaking my app. (textpattern) the other apps that are using php 5.4 work fine. So how can i change the APP to use 5.4?

Why can't we do this via the Control Panel? That is in the CP edit the App and change it to use earlier versions of the php? In my case from 5.5 to 5.4

(28 Feb '14, 02:20) baba baba's gravatar image

This is just an unfortunate side-effect of the structure used for applications in the Control Panel; they don't support changes like this, but need to be deleted and re-created.

Of course, deleting an application deletes everything under ~/webapps/<app_name>, so you need to copy the data out, delete and re-create the application, and then copy it back in. The answer that John provided is a bit of a shortcut but not as elegant.

In the future we hope to redesign the application structure in the Control Panel to allow for modifications instead of setting the handler only at creation time. This is a known/pending feature request but we don't have any ETA at this time.

(28 Feb '14, 07:01) ryans ♦♦ ryans's gravatar image

"In the future we hope to redesign the application structure in the Control Panel to allow for modifications instead of setting the handler only at creation time. This is a known/pending feature request but we don't have any ETA at this time."

Php 7.0 is quickly looming. any updates on when we may be able to elegantly update our Php versions in the CP?

(17 Apr, 17:28) baba baba's gravatar image
1

@baba sorry no update at this time.

(17 Apr, 18:16) seanf ♦♦ seanf's gravatar image

ok, thanks.

(17 Apr, 18:53) baba baba's gravatar image
showing 5 of 7 show 2 more comments
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:

×247
×9
×9

question asked: 04 Mar '13, 01:14

question was seen: 6,456 times

last updated: 17 Apr, 18:53

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 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