LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-26-2010, 05:51 PM   #1
kaoticsnow
Member
 
Registered: Apr 2010
Posts: 35

Rep: Reputation: 0
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?
 
Old 10-26-2010, 07:19 PM   #2
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,104

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
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>
 
Old 10-26-2010, 07:39 PM   #3
kaoticsnow
Member
 
Registered: Apr 2010
Posts: 35

Original Poster
Rep: Reputation: 0
No change, I'm still getting an error about running PHP 4.3.9 from MediaWiki.
 
Old 10-27-2010, 03:51 AM   #4
kaoticsnow
Member
 
Registered: Apr 2010
Posts: 35

Original Poster
Rep: Reputation: 0
Is there a way for me to remove php4 entirely from the system and only leave php5?
 
Old 10-27-2010, 03:58 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,969

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
Look at the output of phpinfo() from web page. What version does it output?
 
Old 10-27-2010, 03:28 PM   #6
kaoticsnow
Member
 
Registered: Apr 2010
Posts: 35

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by michaelk View Post
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.
 
Old 10-27-2010, 05:54 PM   #7
kaoticsnow
Member
 
Registered: Apr 2010
Posts: 35

Original Poster
Rep: Reputation: 0
Confirmed phpinfo(); returns v4.3.9
 
Old 10-27-2010, 06:06 PM   #8
kaoticsnow
Member
 
Registered: Apr 2010
Posts: 35

Original Poster
Rep: Reputation: 0
I am officially a moron... I forgot to reload apache after upgrading php to php5, quick reload fixed the problem...
 
Old 10-27-2010, 06:07 PM   #9
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,221

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
Deleted

Last edited by eSelix; 10-27-2010 at 06:09 PM. Reason: Problem already solved
 
Old 10-27-2010, 06:46 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,969

Rep: Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752Reputation: 752
Well done.
 
  


Reply

Tags
mediawiki, mysql, php


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange PHP/SQLite problem RattleSn@ke *BSD 1 06-25-2009 04:51 PM
strange php problem frieza Programming 3 03-04-2009 05:38 PM
strange apache php problem lbharti Linux - Software 3 05-20-2005 10:39 AM
Strange PHP problem!!! Birgi Programming 3 03-08-2005 12:07 PM
strange php problem dsiguy Linux - Software 2 02-18-2003 05:07 PM


All times are GMT -5. The time now is 07:27 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration