13日发现
Bluehost虚拟主机上使用PHP5CGI的网站报500错误,而使用PHP5则没有问题,因为有些站流量较大为不影响用户访问,暂时将这些网站恢复使用PHP5,发现可以正常工作。
因为这些网站近期没有进行过升级和配置更新,判断有可能是Bluehost进行某些升级引起兼容问题。
登陆cPanel发现:
cPanel的为:11.23.3
PHP的为 5.2.6
未升级
而Apache的版本为 2.2.9 (Unix),原为 Apache:2.2.8 (Unix),估计是这个升级引起的问题。
报错网站中.htaccess的有关配置
# Use PHP5 as default
# AddHandler application/x-httpd-php5 .php
# Use PHP5CGI as default
AddHandler fcgid-script .php
FCGIWrapper /usr/local/cpanel/cgi-sys/fcgiwrapper .php
PHP_ConfigPath /home/myid/public_html/bluehost-cn.com
注释掉下面两句,恢复正常。
FCGIWrapper /usr/local/cpanel/cgi-sys/fcgiwrapper .php
PHP_ConfigPath /home/myid/public_html/bluehost-cn.com
修改后正确的配置为:
# Use PHP5 as default
# AddHandler application/x-httpd-php5 .php
# Use PHP5CGI as default
AddHandler fcgid-script .php
# FCGIWrapper /usr/local/cpanel/cgi-sys/fcgiwrapper .php
# PHP_ConfigPath /home/myid/public_html/bluehost-cn.com
有关PHP版本间切换,请参考:
初识Bluehost | 3-PHP版本轻松切换
-->点这里查看Bluehost支持的环境和产品详情列表。
作者:
wwww.bluehost-cn.com
原载:
Bluehost之家
本文链接:
Bluehost虚拟主机上使用PHP5CGI报错的问题
版权所有。本站原创作品转载时请以链接形式注明作者和原始出处及本声明。