WebFaction
Community site: login faq

I have installed a new Static/CGI/PHP-5.4 app for use with MediaWIki, but some scripts refuse to run, giving the error:

You are using PHP version 5.2.17 but MediaWiki 1.21 needs PHP 5.3.2 or higher. ABORTING.

I am on a 'newer' server (web308). I know that on older servers, this problem was caused by missing .htaccess files and symlinks (as detailed in this previous question: "A PHP 5.4 app serves PHP 5.2").

But I am on a newer server and have just created a fresh Static/CGI/PHP-5.4 app. When I run php -v I get:

PHP 5.2.17 (cli) (built: Aug  3 2013 09:14:11)

Why is the app reverting to 5.2 when I've created a 5.4 app?

asked 20 Sep '13, 12:11

inkandbamboo
2613
accept rate: 100%


OK, I sovled the problem. Turns out that the scripts were running other scripts via the command line and were using

 php script.php

which apparently is the older version of PHP. Changing this to:

php54 script.php

solved the problem.

permanent link

answered 20 Sep '13, 13:02

inkandbamboo
2613
accept rate: 100%

MediaWiki is running scripts via the command line? Can you elaborate on this? Do you know which scripts it was trying to run via the command line? That seems odd.

(20 Sep '13, 18:52) HittingSmoke

It is a maintenance script for database maintenance of a wiki farm created using the SimpleFarm extension. The extension includes a script which cycles through each of the members of the wiki farm and then runs the standard MediaWIki maintenance script on that member. I guess I was a bit imprecise in my original answer. It is in fact me running the initial script from the command line, and that script in turn runs the update script which I have specified an argument:

php maintainFarm.php "php ../../../maintenance/update.php --quick"

(20 Sep '13, 22:12) inkandbamboo

Ahh, yes that explains it much better. PHP from the command line is completely different than PHP run through the CGI handler and they largely cannot interact. That's why I was confused.

(20 Sep '13, 22:54) HittingSmoke
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: 20 Sep '13, 12:11

question was seen: 3,529 times

last updated: 20 Sep '13, 22:54

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