所有 php 页面都会出现内部服务器错误

发布于 2024-10-04 20:02:53 字数 1113 浏览 0 评论 0原文

因为是星期五,所以我不能向我的主机询问此事,但显然,我网站上的所有 .php 页面都给出了“内部服务器错误”...这刚刚开始,我不在我的管理员 cp 上,我今天对我的网站进行了 0 次更改,事实上,大约一周以来我没有进行任何更改。

我主持了几个论坛,刚刚被一些正在浏览的用户提醒,突然发生了这种情况。

有问题的网站: cudamine.com

错误:

内部服务器错误

服务器遇到内部问题 错误或配置错误,并且是 无法完成您的请求。

请联系服务器 管理员,[电子邮件受保护] 和 告知他们错误发生的时间 发生了,以及你可能遇到的任何事情 这样做可能会导致错误。

有关此错误的更多信息可能会 可在服务器错误日志中找到。

此外,还有 404 Not Found 错误 尝试使用时遇到 ErrorDocument 来处理请求。

我使用 cPanel X。

我应该担心这个吗?某种攻击还是什么?所有 HTML 页面都工作正常,只是 .php 似乎存在此问题,这是我的主机端的问题吗?或者我可以在周一之前对此采取任何措施吗?谢谢大家,如果问错地方了,抱歉。只是我不想整个周末都没有网站......

在网上阅读了类似情况后,我在 .htaccess 文件上找到了一些信息,我找到了该文件,这就是其中的内容:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^cudamine.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.cudamine.com$
RewriteRule ^santa\-maria\/forum\/?(.*)$ "http\:\/\/cudamine\.com\/santa\-maria\/\?page_id\=7\/$1" [R=301,L]

这两个 RewriteCond 是我使用 php 的两个链接...我尝试删除这个文件,但没有任何改变。

Since it's a friday, I can't ask my host about this, but apparently, all the .php pages on my websites are giving out the "Internal Server Error"... this started just now, I was not on my admin cp, I did 0 changes to my website today, in fact, I changed nothing for about a week now.

I host a few forums and got alerted by some users just now who were browsing and suddenly this happens.

The website in question:
cudamine.com

The error:

Internal Server Error

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

Please contact the server
administrator, [email protected] and
inform them of the time the error
occurred, and anything you might have
done that may have caused the error.

More information about this error may
be available in the server error log.

Additionally, a 404 Not Found error
was encountered while trying to use an
ErrorDocument to handle the request.

I use cPanel X.

Should I be worried about this? Some sort of attack or something? All HTML pages work fine, it's just .php that seems to have this issue, is this a problem on my hosts end, or can I do anything about this before monday? Thanks guys, and sorry if this is the wrong place to ask. It's just that I don't want to have no site for the whole weekend...

After reading up on the web about similar situations, I found some info on the .htaccess file, I found the file and this is what's in it:

RewriteEngine on

RewriteCond %{HTTP_HOST} ^cudamine.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.cudamine.com$
RewriteRule ^santa\-maria\/forum\/?(.*)$ "http\:\/\/cudamine\.com\/santa\-maria\/\?page_id\=7\/$1" [R=301,L]

Those two RewriteCond are 2 of my links that use php... I tried deleting this file, nothing changed though.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

似梦非梦 2024-10-11 20:02:53

务必检查错误日志(应该在 CPanel 中可用)。

我看到的一种常见情况是,当主机启用 SuPHP(PHP 脚本的 suexec)并且您有组可写脚本或包含脚本的目录时。

如果您的错误日志显示类似“Apache SoftException”的内容,那么这是最可能的原因。您需要更改脚本和目录的文件系统权限以删除组“写入”位。

另一个可能的原因是您的主机禁用了 mod_rewrite 或删除了相应的 覆盖 (FileInfo) 以使用Rewrite* 指令。

Definitely check the error log (should be available in CPanel).

One common occurrence I see is when a host enables SuPHP (suexec for PHP scripts) and you have group writable scripts or directories containing scripts.

If your error log shows anything like "Apache SoftException", then this is the most likely cause. You need to change the filesystem permissions on your scripts and directories to remove the group "write" bit.

Another possible cause is your host has disabled mod_rewrite or removed the appropriate overrides (FileInfo) to use the Rewrite* directives.

往事风中埋 2024-10-11 20:02:53

PHP 可能会将其错误日志写入标准 Apache error_log 之外的其他位置。您可以使用 ini_get('error_log') 检索日志的位置。如果该值不是“syslog”,则 PHP 会将其错误写入同名的文件中。

PHP may be writing its error log elsewhere than the standard Apache error_log. You can retrieve the log's location with ini_get('error_log'). If the value's something other than "syslog", PHP is writing its errors to a file of the same name.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文