简体   繁体   English

CodeIgniter HTTP 错误 500

[英]CodeIgniter HTTP Error 500

When I try to access the website I get this error:当我尝试访问该网站时,出现此错误:

HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request HTTP 错误 500(内部服务器错误):服务器尝试完成请求时遇到意外情况

even after removing the htaccess file completely the website is still not working.即使在完全删除 htaccess 文件后,网站仍然无法正常工作。 NOTE: on localhost it's working fine.注意:在本地主机上它工作正常。

Edit after comments:评论后编辑:

I think I wasn't clear enough here's my problem in details: I have a website written with PHP5 no framework or cms or anything and it work fine.我想我还不够清楚,这里是我的问题的细节:我有一个用 PHP5 编写的网站,没有框架或 cms 或任何东西,它工作正常。 Then I start the admin section so I used CodeIgniter and rewrite the site.然后我开始管理部分,所以我使用了 CodeIgniter 并重写了站点。 Now I almost done with the programming so I uploaded a test version to the server in a subfolder to test it but the 500 error mentioned above appeared, my first thoughts were that it's a htaccess file problem so I try other htaccess files and finally removed it from the server, but the problem still there.现在我几乎完成了编程,所以我在子文件夹中将测试版本上传到服务器进行测试,但是出现了上面提到的500错误,我的第一个想法是这是一个htaccess文件问题,所以我尝试了其他htaccess文件并最终将其删除从服务器,但问题仍然存在。 Now the only difference between my local server and the remote server is that locally i'm running PHP 5.3.5 and remotely it's PHP 5.2.14.现在我的本地服务器和远程服务器之间的唯一区别是我在本地运行 PHP 5.3.5,而远程运行的是 PHP 5.2.14。 That's all the information that I can think of now.目前能想到的信息就这么多。

Thanx in advance.提前谢谢。

You likey have a missing PHP/Apache module hence the 500 error.您可能缺少 PHP/Apache 模块,因此出现 500 错误。

1: Check your logs within the root and the dir your running script in, else the directory above root/logs. 1:检查根目录中的日志和运行脚本所在的目录,否则检查根目录/日志上方的目录。

2: Create a file called phpinfo.php, in it put: 2:创建一个名为phpinfo.php的文件,在里面放:

<?php phpinfo(); ?>

and run it.并运行它。

3: Then compare the list of installed extensions shown in the output with the list of installed modules you have locally. 3:然后将输出中显示的已安装扩展列表与本地已安装模块列表进行比较。

If your using WAMP, you click the tray icon, goto PHP->extentions and you can see all that are installed.如果您使用 WAMP,则单击托盘图标,转到 PHP->extensions,您可以看到已安装的所有内容。 Same for Apache.对阿帕奇也是如此。

boff关闭

additionally:此外:

A good start would to to make sure CURL and MBSTRING is on, however I don't use CAKE PHP....一个好的开始是确保 CURL 和 MBSTRING 处于开启状态,但是我不使用 CAKE PHP ....

I got same problem and added this line on top我遇到了同样的问题并在顶部添加了这一行

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM