WebFaction
Community site: login faq

I've created a new Static/CGI/PHP-5.3 app, cloned an existing GitHub repo, and I'm wondering if I need to do something special to make the app use PHP 5.3. When I output phpinfo() it says that it's using 5.2.17.

Thanks in advance.

asked 24 Jan '12, 23:15

tdavis
1125
accept rate: 0%

Are you testing on the command-line or by making a page containing phpinfo() inside the app?

(24 Jan '12, 23:30) neeravk

Making a page containing phpinfo.

(25 Jan '12, 08:02) tdavis

The answer by timg did not work for me. What did work, was the following snippet (without any symlinks):

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

Here's more information about the PHP setup at Webfaction: http://blog.webfaction.com/2012/02/a-look-at-our-php-setup/

permanent link

answered 31 Jul '12, 14:41

dbrgn
111
accept rate: 0%

That worked perfectly. Thanks :)

(15 Sep '12, 04:04) yitwail

You can enable PHP 5.3 on your application by adding the following lines to your .htaccess file:

Action php53-cgi /php53.cgi   
AddHandler php53-cgi .php

Then you need to create a symbolic link in the application directory to the php53.cgi, here is how:

cd webapps/YOUR_APPLICATION  
ln -s /home/php-cgi/php53.cgi php53.cgi
permanent link

answered 25 Jan '12, 08:18

timg ♦♦
1.3k4
accept rate: 30%

edited 28 Jan '12, 19:54

seanf
12.2k42136

Great, thanks! It looks like it worked without creating the symbolic link. Why isn't this in the documentation somewhere?

(25 Jan '12, 20:00) tdavis

This should already have been done for you when you created a PHP 5.3 app from the panel. The instructions above are for updating a PHP 5.2 app to PHP 5.3 one on our older servers.

(25 Jan '12, 20:04) neeravk

Hmm, but this was a brand new 5.3 app that I created.

(25 Jan '12, 20:53) tdavis
1

Ah, i see what happened. When I cloned my existing repo, it overwrote the .htaccess file that was automatically generated with the PHP 5.3 fix in it. Thanks for the help everyone!

(25 Jan '12, 22:38) tdavis

I have a PHP5.2 app setup on my account, and would like to switch to PHP 5.3. I've used the directions above without success. Any pointers or additional steps required? I'm on web159.

(14 Feb '12, 15:35) Jonathan Head

These instructions were for an existing Static/CGI/PHP-5.3 application. If you have a Static/CGI/PHP-5.2 application which needs to run on PHP 5.3, there are two ways to do this:

First, you could add the following to your .htaccess file:

<FilesMatch \.php$> 
    SetHandler php53-fcgi
</FilesMatch>

(note that this will run the site as fastCGI)

Second (if you don't want fastCGI), you could simply create a new symlink-to-static/cgi/php53 application with the extra_info pointing at the ~/webapps/the_php52_app directory and then mount your site on this symlink application.

(15 Feb '12, 03:01) ryans ♦♦

Thanks, Ryan. Appreciate the info.

(15 Feb '12, 22:24) Jonathan Head
showing 5 of 7 show 2 more comments

I tried adding <filesmatch klzzwxh:0000php$=""> SetHandler php53-cgi </filesmatch> to my .htaccess file found in my Wordpress app folder /webapp/my_app but it doesn't work for me. Where exactly within my .htaccess file should I add it? After #Begin Wordpress, before it or after #End Wordpress or before it?

permanent link

answered 19 Nov '12, 10:50

Dhawal
2113
accept rate: 0%

FilesMatch uses a regular expression to match a filename. What type of filename are you trying to match with "klzzwxh:0000php$="""?

(19 Nov '12, 11:24) seanf

Just for completeness, another way to do this is to create a new "Symbolic Link to Static/CGI/PHP-5.3" application pointing (in the extra_info) to your original application, and then mount the Symbolic Link application on your website record in place of the original one.

Another method is the most straightforward: just create a new application of type "Static/CGI/PHP-5.3", copy all of the files to it, and then mount the new application on your website record in place of the original one.

Hope that helps!

permanent link

answered 08 Oct '13, 00:20

ryans ♦♦
5.0k93460
accept rate: 43%

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: 24 Jan '12, 23:15

question was seen: 13,550 times

last updated: 08 Oct '13, 00:20

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