LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Strange PHP problem (https://www.linuxquestions.org/questions/linux-software-2/strange-php-problem-840621/)

kaoticsnow 10-26-2010 05: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

Code:

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

However from the command line I get

Code:

[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 07:19 PM

hmm perhaps something to do with the .htaccess?

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

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


kaoticsnow 10-26-2010 07:39 PM

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

kaoticsnow 10-27-2010 03:51 AM

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

michaelk 10-27-2010 03:58 AM

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

kaoticsnow 10-27-2010 03:28 PM

Quote:

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 05:54 PM

Confirmed phpinfo(); returns v4.3.9

kaoticsnow 10-27-2010 06: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 06:07 PM

Deleted

michaelk 10-27-2010 06:46 PM

Well done.


All times are GMT -5. The time now is 04:47 AM.