简体   繁体   English

Cpanel php 版本!= .htaccess 文件

[英]Cpanel php version != .htaccess file

The company where we have been renting webspace from for years stops its activities.我们多年来一直租用网络空间的公司停止了活动。 The website was automatically transferred to a company that takes over the existing customers.该网站被自动转移到接管现有客户的公司。

The new company does not offer multiphp via cpanel for shared hosting.新公司不通过 cpanel 提供用于共享主机的 multiphp。 1 of the subdomains gives the following problem: 1 个子域会出现以下问题:

Composer detected issues in your platform: Your Composer dependencies require a PHP version "> = 7.3.0". Composer 在您的平台中检测到问题:您的 Composer 依赖项需要 PHP 版本 "> = 7.3.0"。

I changed the PHP version for the full site to 7.3 via cpanel, but the problem remains.我通过 cpanel 将整个站点的 PHP 版本更改为 7.3,但问题仍然存在。 I checked via phpinfo () and the php version turns out to be 7.2.34.我通过 phpinfo() 检查了 php 版本是 7.2.34。

In .htaccess it says:在 .htaccess 中它说:

# php - BEGIN cPanel-generated handler, do not edit
# Set the “ea-php72” package as the default “PHP” programming language.
<IfModule mime_module>
   AddHandler application / x-httpd-ea-php72 .php .php7 .phtml
</IfModule>
# php - END cPanel-generated handler, do not edit "

I guess the problem is there?我想问题出在哪里? Can I manually edit in .htaccess?我可以在 .htaccess 中手动编辑吗? And what exactly should be there?究竟应该有什么?

If your host supports php7.3 then you can update your htaccess as follows如果您的主机支持 php7.3,那么您可以按如下方式更新您的 htaccess

# php - BEGIN cPanel-generated handler, do not edit
# Set the “ea-php72” package as the default “PHP” programming language.
<IfModule mime_module>
   AddHandler application / x-httpd-ea-php73 .php .php7 .phtml
</IfModule>
# php - END cPanel-generated handler, do not edit "

If that gives you a white screen error, then you'll need to contact the hosting provider.如果这给您一个白屏错误,那么您需要联系托管服务提供商。

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

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