简体   繁体   English

用PHP.ini文件覆盖服务器上的PHP版本

[英]Overide Php Version on Server with PHP.ini file

I uploaded a Joomla 3.3 website on an Apache server but it showed me a Your host needs to use PHP 5.3.10 or higher to run this version of Joomla! 我在Apache服务器上上传了一个Joomla 3.3网站,但它向我显示了您的主机需要使用PHP 5.3.10或更高版本才能运行此版本的Joomla! error message. 错误信息。 I read that i can change the php version on cPanel -> Software and Services -> PHP configuration. 我读到我可以在cPanel-> Software and Services-> PHP configuration上更改php版本。 I opened the PHP configuration and it just shows values. 我打开了PHP配置,它仅显示值。 So i contacted my Hosting provider, they said the php version is the latest version and that i need to override the php settings using a php.ini file. 所以我联系了我的托管服务提供商,他们说php版本是最新版本,我需要使用php.ini文件覆盖php设置。

1st, if the system is updated as they say it is, should i be seeing that message. 第一,如果系统按照他们所说的进行了更新,我是否应该看到该消息。 2nd, how can i change the php version to accommodate my joomla website. 2,如何更改php版本以适应我的joomla网站。

Your hosting provider are not using PHP 5.3.10 or higher version of php and due to that you are getting this issues. 您的托管服务提供商未使用PHP 5.3.10或更高版本的php,因此您遇到了此问题。

You can check your php version by creating the php info page on your site. 您可以通过在网站上创建php信息页面来检查php版本。

Also you can suggest your hosting provider to install multiple php version on your server so that you can use any php version which you want. 您也可以建议您的托管服务提供商在您的服务器上安装多个php版本,以便您可以使用所需的任何php版本。 They can install it with the ntPHPselector plugins, It's free plugins and it's working good. 他们可以使用ntPHPselector插件进行安装。它是免费的插件,并且运行良好。

If they really have the latest version of php then you can try to use AddHandler in your .htaccess file to choose php version. 如果他们确实拥有最新版本的php,则可以尝试在.htaccess文件中使用AddHandler选择php版本。

For example: 例如:

AddHandler application/x-httpd-php54 .php

or 要么

AddHandler x-mapp-php6 .php

Depends on hosting configuration. 取决于主机配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM