Topic on Project:Support desk

Problem Upgrading PHP

6
Amstuzmarco (talkcontribs)

Hello

I'm a Debian-beginner. I have a running debian server with mediawiki 1.11 and php 5.2. Now i'd like to upgrade to MediaWiki 1.23, so i started with upgrading php to 5.4 I did this simly with apt-get install php5

But when I try to upgrade the wiki now on the browser, it still stands "MediaWiki 1.23 requires at least PHP version 5.3.2, you are using PHP 5.2.17." When I ask php -v I get 5.4 as answer, but if I look at my Wikis Version-Page, there is still 5.2.17

What can I do? What is the problem?

Thanks for your help!

Marco

88.130.78.92 (talkcontribs)

Hi!

Accessing your webserver with a browser and with a shell are two different things. When you access your webserver with a browser, you can see one PHP version, while on the shell you see another one.

In your case the command "php" executes PHP 5.4, which is fine. However, you also must make sure that the webserver runs that version as well, when asked to deliver a page for a webbrowser. (No, I don't know what to change, but I guess that you have to reference the correct = the new PHP version somewhere in the Apache configuration. Maybe you only have not restarted the server and it already would work correctly, if you did?)

Amstuzmarco (talkcontribs)

Thanks for your answer. I have restarted the server already, yes. But it didn't help. But i see your point, it makes sense. Does anybody know what I have to change?

Ciencia Al Poder (talkcontribs)

You probably need to apt-get install libapache2-mod-php5.

84.74.152.184 (talkcontribs)

Didnt worked, I still get the same error. But thanks!! Any other Ideas?

Ciencia Al Poder (talkcontribs)

You may need to uninstall the previous PHP version. Or look how to set which PHP version to use with your webserver. For example:

Reply to "Problem Upgrading PHP"