将php版本从5.2升级到5.3 Joomla

时间:2014-12-08 03:33:22

标签: php-5.3

我们在Joomla 3中的新网站至少需要PHP v5.3来运行Akeeba Next Generation Installer。我的任何服务器都运行PHP 5.2。我试过添加行

AddHandler application / x-httpd-php53 .php

在我的.htaccess上,但它下载了index.php文件..提供的主机是Doteasy。我们如何升级PHP?

非常感谢任何帮助。谢谢。

1 个答案:

答案 0 :(得分:0)

这不会起作用。您需要安装php到该版本。你有SSH访问服务器?如果你做什么平台呢?大多数Web服务器都在Linux上运行,如果是这样的话,您需要在Linux服务器上升级php。在Windows上,您需要 卸载并安装php到最新版本。

一个,  如果它是centos或fedora,你需要启用正确的repo,你需要发出

要安装,首先必须将与CentOS / RHEL版本对应的Webtatic EL yum存储库信息添加到yum:

CentOS / RHEL 7.x:

rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
CentOS/RHEL 6.x:

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
CentOS/RHEL 5.x:

rpm -Uvh https://mirror.webtatic.com/yum/el5/latest.rpm
Now you can install php by doing:

yum install php54w
If you would like to upgrade php to this version it is recommended that you check that your system will support the upgrade, e.g. making sure any CPanel-like software can run after the upgrade.

Unless you know what you are doing, it is risky upgrading an existing system. It’s much safer to do this by provisioning a separate server to perform the upgrade as a fresh install instead.

If you know what you are doing, you can upgrade PHP by:

yum install yum-plugin-replace

yum replace php-common --replace-with=php54w-common
It will likely give you a message “WARNING: Unable to resolve all providers …”. This is normal, and you can continue by tying “y“. You will be given a chance to see what packages will be installed and removed before again being given a chance to confirm.

如果它是debian ubuntu linux dist你需要发出

*this will be the easiest option. For PHP 5.4.x run the command:*

sudo add-apt-repository ppa:ondrej/php5-oldstable
or for PHP 5.5.x run:

sudo add-apt-repository ppa:ondrej/php5
And then update your packages:

sudo apt-get update
sudo apt-get upgrade