我们在服务器上运行PHP 5.4。服务器的操作系统是CentOS。不幸的是,对于我们想要安装的CMS(Magento 2),我们需要更高版本。
所以我根据http://devdocs.magento.com/guides/v2.0/install-gde/prereq/php-centos.html#php-centos-7的步骤安装了PHP 7。 (在我将sudo
放在其前面的一些命令中,在步骤3中我添加了--skip-broken
,因为没有它就无法工作。)
安装的结束是这样的:
Installing : php70u-common-7.0.8-1.ius.centos6.x86_64 1/15
Installing : php70u-cli-7.0.8-1.ius.centos6.x86_64 2/15
Installing : php70u-pdo-7.0.8-1.ius.centos6.x86_64 3/15
Installing : libwebp-0.4.3-3.el6.x86_64 4/15
Installing : libicu-4.2.1-14.el6.x86_64 5/15
Installing : php70u-intl-7.0.8-1.ius.centos6.x86_64 6/15
Installing : php70u-gd-7.0.8-1.ius.centos6.x86_64 7/15
Installing : php70u-mysqlnd-7.0.8-1.ius.centos6.x86_64 8/15
Installing : php70u-devel-7.0.8-1.ius.centos6.x86_64 9/15
Installing : php70u-xml-7.0.8-1.ius.centos6.x86_64 10/15
Installing : php70u-opcache-7.0.8-1.ius.centos6.x86_64 11/15
Installing : php70u-bcmath-7.0.8-1.ius.centos6.x86_64 12/15
Installing : php70u-json-7.0.8-1.ius.centos6.x86_64 13/15
Installing : php70u-mbstring-7.0.8-1.ius.centos6.x86_64 14/15
Installing : php70u-mcrypt-7.0.8-1.ius.centos6.x86_64 15/15
Verifying : php70u-xml-7.0.8-1.ius.centos6.x86_64 1/15
Verifying : php70u-cli-7.0.8-1.ius.centos6.x86_64 2/15
Verifying : php70u-opcache-7.0.8-1.ius.centos6.x86_64 3/15
Verifying : libicu-4.2.1-14.el6.x86_64 4/15
Verifying : libwebp-0.4.3-3.el6.x86_64 5/15
Verifying : php70u-bcmath-7.0.8-1.ius.centos6.x86_64 6/15
Verifying : php70u-json-7.0.8-1.ius.centos6.x86_64 7/15
Verifying : php70u-devel-7.0.8-1.ius.centos6.x86_64 8/15
Verifying : php70u-gd-7.0.8-1.ius.centos6.x86_64 9/15
Verifying : php70u-common-7.0.8-1.ius.centos6.x86_64 10/15
Verifying : php70u-mbstring-7.0.8-1.ius.centos6.x86_64 11/15
Verifying : php70u-mysqlnd-7.0.8-1.ius.centos6.x86_64 12/15
Verifying : php70u-mcrypt-7.0.8-1.ius.centos6.x86_64 13/15
Verifying : php70u-pdo-7.0.8-1.ius.centos6.x86_64 14/15
Verifying : php70u-intl-7.0.8-1.ius.centos6.x86_64 15/15
Installed:
php70u-bcmath.x86_64 0:7.0.8-1.ius.centos6
php70u-common.x86_64 0:7.0.8-1.ius.centos6
php70u-devel.x86_64 0:7.0.8-1.ius.centos6
php70u-gd.x86_64 0:7.0.8-1.ius.centos6
php70u-intl.x86_64 0:7.0.8-1.ius.centos6
php70u-json.x86_64 0:7.0.8-1.ius.centos6
php70u-mbstring.x86_64 0:7.0.8-1.ius.centos6
php70u-mcrypt.x86_64 0:7.0.8-1.ius.centos6
php70u-mysqlnd.x86_64 0:7.0.8-1.ius.centos6
php70u-opcache.x86_64 0:7.0.8-1.ius.centos6
php70u-pdo.x86_64 0:7.0.8-1.ius.centos6
php70u-xml.x86_64 0:7.0.8-1.ius.centos6
Dependency Installed:
libicu.x86_64 0:4.2.1-14.el6 libwebp.x86_64 0:0.4.3-3.el6
php70u-cli.x86_64 0:7.0.8-1.ius.centos6
Skipped (dependency problems):
mod_php70u.x86_64 0:7.0.8-1.ius.centos6
Complete!
但是当我再次访问该网站时,我唯一得到的是:
在错误日志中显示:
[Tue Jul 05 15:09:46 2016] [error] [client 145.132.179.108] File does not exist: /home/trade4deals/public_html/500.shtml
当我输入命令php -v
时,它仍然说它使用的是PHP 5.4.42:
PHP 5.4.42 (cli) (built: Jun 29 2015 18:08:03)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
我该怎么办?非常感谢提前。