500内部服务器错误 [英] 500 Internal Server Error

查看:442
本文介绍了500内部服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

内部服务器错误

  

服务器遇到一个内部错误或配置错误,   无法完成您的请求。

     

请与服务器管理员联系,管理员@本地和通知   他们错误发生的时间,任何你可能会做   这可能造成的错误。

     

这个错误的详细信息,可在服务器错误可用   登录。

为什么要告诉我这些?

的.htaccess:

  RewriteEngine叙述上

的RewriteBase / ci_series /

的RewriteCond%{} REQUEST_FILENAME!-f

的RewriteCond%{} REQUEST_FILENAME!-d

重写规则^(。*)$ /index.php/$1 [L]
 

问题:

页不希望显示这个简单的功能:

 < PHP
类MYCAL扩展是CI_Controller {

    功能显示(){

        $这个 - >负载>库('历');

        回声$这个 - > calendar->产生();
    }
}
 

我使用的框架codeIgniter

错误日志:

  [周一8月1日17时10分45秒2011] [警惕] [客户127.0.0.1] C:/wamp/www/ci_series/.htaccess:无效的命令RewriteEngine叙述,也许拼错或定义由不包括在服务器结构的模块,引用者:HTTP://本地主机/
[周一8月1日17点10分52秒2011] [警惕] [客户127.0.0.1] C:/wamp/www/ci_series/.htaccess:无效的命令RewriteEngine叙述,也许是拼写错误或者不包含在服务器中的模块定义组态
 

解决方案

检查是否已经启用了重写模块?(大多数情况下,这将是真正的原因)

有关WAMP去httpd.conf文件并取消

 的LoadModule rewrite_module模块/ mod_rewrite.so
 

如果您尝试使用未加载的模块,你会得到500内部服务器错误。

  

检查模块在.htaccess文件中使用,并检查是否httpd.conf中加载使用的模块

Internal Server Error

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

Please contact the server administrator, admin@localhost 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.

Why is it telling me this?

.htaccess:

RewriteEngine On

RewriteBase /ci_series/

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /index.php/$1 [L]

Problem:

Page does not want to display this simple function:

<?php
class Mycal extends CI_Controller {

    function display() {

        $this->load->library('calendar');

        echo $this->calendar->generate();
    }
}

I am using the framework codeIgniter

Error log:

[Mon Aug 01 17:10:45 2011] [alert] [client 127.0.0.1] C:/wamp/www/ci_series/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration, referer: http://localhost/
[Mon Aug 01 17:10:52 2011] [alert] [client 127.0.0.1] C:/wamp/www/ci_series/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

解决方案

Check whether you have Rewrite module enabled?(most of the this will be the reason)

for Wamp go to httpd.conf and uncomment

LoadModule rewrite_module modules/mod_rewrite.so

If you try to use module which is not loaded you will get 500 internal server error.

Check your modules used in .htaccess file and check httpd.conf whether used modules are loaded

这篇关于500内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆