Php 500上传到主机后出现内部服务器错误
我在这个论坛上搜索了一整天,发现了和我一样的问题,尝试了所有的答案,但都不起作用 在我的locahost中,一切都很好,但后来当我决定将其上传到一个实时网络服务器时,它开始显示 服务器遇到内部错误或配置错误,无法正常运行 无法完成您的请求 请与服务器管理员联系, webmaster@reportingsystem.cnnpa.com告诉他们时间 发生了错误,您可能已执行的任何操作都可能 导致错误的原因 有关此错误的详细信息,请参阅服务器错误 日志 此外,在运行时遇到500内部服务器错误 正在尝试使用ErrorDocument来处理请求 在我的错误日志中,我看到了以下内容:Php 500上传到主机后出现内部服务器错误,php,.htaccess,codeigniter,url,mod-rewrite,Php,.htaccess,Codeigniter,Url,Mod Rewrite,我在这个论坛上搜索了一整天,发现了和我一样的问题,尝试了所有的答案,但都不起作用 在我的locahost中,一切都很好,但后来当我决定将其上传到一个实时网络服务器时,它开始显示 服务器遇到内部错误或配置错误,无法正常运行 无法完成您的请求 请与服务器管理员联系, webmaster@reportingsystem.cnnpa.com告诉他们时间 发生了错误,您可能已执行的任何操作都可能 导致错误的原因 有关此错误的详细信息,请参阅服务器错误 日志 此外,在运行时遇到500内部服务器错误 正在尝试
[Tue Jan 29 22:05:53 2013] [error] [client 112.198.77.50] File does not exist: /home/cnnpa/crs/404.shtml
[Tue Jan 29 22:05:53 2013] [error] [client 112.198.77.50] File does not exist: /home/cnnpa/crs/crimeindex
我认为这与.htaccess和基于阅读类似问题的mod_重写有关。当我删除.htaccess时,它似乎可以工作,但我不想要这个解决方案,因为首先我使用.htaccess是为了有一个更干净的URL(通过删除index.php)
这是我当前的.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /crs/
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
ErrorDocument 404 /index.php
</IfModule>
我的第一个疑点是htaccess文件中的值
查看config.php,您似乎是从DocumentRoot为应用程序提供服务。如果是这种情况,重写库应该写如下
RewriteBase /
我认为您的文件和目录权限存在问题。服务器上存在文件
404.shtml
文件?您试图上载的文件有多大?@KalpeshMehta,我的所有文件夹权限都设置为755,所有文件都设置为644@YogeshSuthar,我不知道为什么它会给我关于丢失文件的错误。我很确定我没有这样的文件。这些文件甚至不在codeigniter默认包中。这很有效!关于rewrite base,我知道的是包含网站文件的文件夹的名称
RewriteBase /crs/
RewriteBase /