记一次解决网站打开出现"Internal Server Error"错误排查

昨天晚上一个网友求助老蒋,他的网站程序在根据说明文档安装后打开主页出现"Internal Server Error"的问题,希望得到解决帮助。这里老蒋也有打开他的网站确实有出现问题,这是我看到的全部的错误提示。

记一次解决网站打开出现"Internal Server Error"错误排查

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@example.com to inform them of the time this error occurred, and the actions you performed just before this error.

从报错上看,应该是伪静态规则出现问题。于是我检查他的网站根目录是有一个.htaccess规则,而这个违规可能是其他默认自带的,并非他的网站程序的,可能这个问题导致,于是我删除 .htaccess 。删除之后,再看看,还是报错。

看到 preg_replace() 错误,这个我就清楚的,以前是我有多次这类问题,这个是PHP版本的问题。

1、解决ECSHOP出现"Deprecated: preg_replace()"报错提示问题

2、解决DedeCMS织梦程序出现"ereg_replace() is deprecated in"问题

以前在其他程序中老蒋就有遇到类似,所以这个问题很好解决。

查看这个同学使用的是PHP5.6,这里估摸着这个程序需要PHP5.3版本,于是我安装PHP5.3,然后切换。

这样,我们就解决了这个问题。

本文出处:老蒋部落 » 记一次解决网站打开出现"Internal Server Error"错误排查 | 欢迎分享( 公众号:老蒋朋友圈 )

公众号 「老蒋朋友圈」获取站长新知 / 加QQ群 【1012423279】获取商家优惠推送