CodeIgniter 500 内部服务器错误

编程入门 行业动态 更新时间:2024-10-28 08:20:25
本文介绍了CodeIgniter 500 内部服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我下载了一个使用 CodeIgniter 编写的 PHP 脚本.当我从 localhost 运行它时,转到 admin 文件夹,它再次显示 localhost.此外,当从我的 Web 主机运行时,它显示 500 内部服务器错误.

I downloaded a PHP script written using CodeIgniter. when I run it from the localhost, on going to the admin folder, it shows localhost again. Also when running from my web host, it shows a 500 Internal Server Error.

我从 localhost/myproj 运行该站点 它有效.然后,当我尝试转到位于 localhost/myproj/administrator 的管理页面时,它给出了 500 内部服务器错误.

I run the site from localhost/myproj It works. Then when I try to go to the admin page which is at localhost/myproj/administrator, it gives a 500 Internal Server Error.

我在这里读到这可能是由于 .htaccess 文件中的错误代码造成的.这是我现在的 .htaccess 文件

I read here that this might be due to a wrong code in the .htaccess file. This is my present .htaccess file

RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)/$ $1 [L,R=301] RewriteCond %{REQUEST_URI} ^system.* RewriteRule ^(.*)$ /index.php/$1 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L]

# Without mod_rewrite, route 404's to the front controller ErrorDocument 404 /index.php

请帮帮我.我知道这可能是一个很小的问题,但我无法找到错误.

Please help me. I know it might be a very small problem, but I'm unable to find the error.

推荐答案

500错误的问题(使用CodeIgniter),不同apache设置,PHP配置出错时显示500错误.

The problem with 500 errors (with CodeIgniter), with different apache settings, it displays 500 error when there's an error with PHP configuration.

以下是它如何使用 CodeIgniter 触发 500 错误:

Here's how it can trigger 500 error with CodeIgniter:

  • 脚本错误(PHP 配置错误、缺少包等...)
  • PHP致命错误"
  • 请检查您的 apache 错误日志,那里应该有一些有趣的信息.

    Please check your apache error logs, there should be some interesting information in there.

    更多推荐

    CodeIgniter 500 内部服务器错误

    本文发布于:2023-11-01 07:31:22,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1548671.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:错误   服务器   CodeIgniter

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!