WebFaction
Community site: login faq

I've just created a website, using a PHP5.4 app, but phpinfo() says it's serving PHP5.2.17. Any ideas?

Edit: for reference, the app is at http://acini.cromotion.net/info.php

asked 22 May '12, 08:44

Berislav Lopac
9137
accept rate: 0%

edited 22 May '12, 09:51


On older servers (those less than web120), php5.3 and php5.4 have to be handled differently than php5.2, and on these servers when creating a new PHP-5.4 application, two files are created in that application automatically:

  • php54.cgi, which is a symbolic link to /home/php-cgi/php54.cgi
  • a .htaccess file

The .htaccess file contains the following:

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

The most common problem is that the .htaccess file is overwritten with another, and these two directives are lost (or else the necessary symbolic link is removed). This will cause your application to be a PHP-5.2 application even though it shows in the Control Panel as PHP-5.4. Simply add back the directives and/or symbolic link and it should again become a PHP-5.4 application.

Hope that helps!

permanent link

answered 22 May '12, 19:16

ryans ♦♦
5.0k103460
accept rate: 43%

Indeed it helps, thanks a lot. I have been planning to move to a newer server for a while, just can't find the time. :-(

(24 May '12, 04:58) Berislav Lopac
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

question asked: 22 May '12, 08:44

question was seen: 12,030 times

last updated: 24 May '12, 04:58

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