-   Linux - Software (
-   -   Strange PHP problem (

kaoticsnow 10-26-2010 06:51 PM

Strange PHP problem
I'm migrating a mediawiki install to a new server, everything (files and database) have been moved over, however when bringing up the site I'm presented with an error that states the following


MediaWiki requires PHP 5.0.0 or higher. You are running PHP 4.3.9.

However from the command line I get


[bleon]$ php -v
PHP 5.1.6 (cli) (built: Jul 31 2008 00:08:07)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

Any ideas why mediawiki is still thinking I'm running php4?

frieza 10-26-2010 08:19 PM

hmm perhaps something to do with the .htaccess?

try adding something like this to the .htaccess file in mediwiki's directory

<FilesMatch .php>
AddHandler x-httpd-php5 .php
SetEnv PHP_VER 5

kaoticsnow 10-26-2010 08:39 PM

No change, I'm still getting an error about running PHP 4.3.9 from MediaWiki.

kaoticsnow 10-27-2010 04:51 AM

Is there a way for me to remove php4 entirely from the system and only leave php5?

michaelk 10-27-2010 04:58 AM

Look at the output of phpinfo() from web page. What version does it output?

kaoticsnow 10-27-2010 04:28 PM


Originally Posted by michaelk (Post 4140677)
Look at the output of phpinfo() from web page. What version does it output?

Its a machine at work, I'll be able to check it in an hour or so, although I'm fairly certain it will show up as 4.3.9 as it is to MediaWiki. I just need to tell apache to use php5 which is installed on the system.

kaoticsnow 10-27-2010 06:54 PM

Confirmed phpinfo(); returns v4.3.9

kaoticsnow 10-27-2010 07:06 PM

I am officially a moron... I forgot to reload apache after upgrading php to php5, quick reload fixed the problem...

eSelix 10-27-2010 07:07 PM


michaelk 10-27-2010 07:46 PM

Well done.

All times are GMT -5. The time now is 06:16 PM.