WebFaction
Community site: login faq

Hi, I updated dokuwiki code on my website and I'm now getting an error apparently because the code needs a newer php version. From the command prompt in my home directory I can see:

$ php --version

PHP 5.2.17 (cli) (built: Feb 27 2015 15:01:08)

I'm on web232

Following the post at: https://community.webfaction.com/questions/12617/changing-an-applications-php-version I edited .htaccess in home directory to contain

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

There are no conflicting .htaccess files in subdirectories but I still get the same error and PHP 5.2.17

Please can someone advise on this?

Thanks, stegzzz

asked 12 Sep '15, 20:44

stegzzz
17614
accept rate: 66%

edited 12 Sep '15, 20:52


Changing the .htaccess file in the application directory worked. I thought changing .htaccess in home would work too (as suggested in post 12617 above). However, according to webfaction support, only the webapps directories, not the home directory, are scanned for php configuration information.

permanent link

answered 13 Sep '15, 14:06

stegzzz
17614
accept rate: 66%

edited 13 Sep '15, 18:05

What is happening here is that you are checking the default PHP version on the server. Your '.htaccess' will not influence that in any way. Create a 'phpinfo.php' file in the same directory then load it in a browser to see what version is being interpreted. See:

http://php.net/manual/en/function.phpinfo.php

To change the version that you call in the command line, you would need to create an alias in your '.bash_profile' file. Eg. For PHP5.5, you'd add a line that looks like this:

alias php="/usr/local/bin/php55"

Hope this helps. If you have further issues, please feel free to open a ticket.

permanent link

answered 12 Sep '15, 21:48

NickR ♦♦
4415
accept rate: 19%

Thanks, I get version 5.2.17 from phpinfo()

If I add to .bash_profile

alias php="/usr/local/bin/php55"

I get PHP 5.5.28 from the command php --version but accessing via the web I'm still seeing 5.2.17

My goal is to change the php version used by my dokuwiki web pages.

(13 Sep '15, 12:46) stegzzz
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
×25
×21

question asked: 12 Sep '15, 20:44

question was seen: 5,750 times

last updated: 13 Sep '15, 18:05

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