简体   繁体   English

实时服务器中的Codeigniter项目始终显示500内部服务器错误

[英]Codeigniter Project in live server always gives 500 Internal Server Error

I've trying to solve this issue for the past 24 hrs but nothing seems to work. 在过去的24小时内,我一直在尝试解决此问题,但似乎没有任何效果。 It works fine on my local with the following htaccess code. 使用以下htaccess代码在我的本地计算机上工作正常。

Options -Indexes
RewriteEngine On
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /ocr/index.php/$1 [L,QSA]

But when I copy my project into /ocr dir of public_html dir in the server with the same htaccess code it gives 500 Internal Server Error. 但是,当我使用相同的htaccess代码将项目复制到服务器中public_html dir的/ ocr dir中时,会出现500 Internal Server Error。 Can anyone help me fix this issue. 谁能帮我解决此问题。 Any help will be highly appreciated. 任何帮助将不胜感激。

PS to moderators. PS给主持人。 Please don't flag this as duplicate question as I tried almost all answers found here regarding this issue and none worked. 请不要将此问题标记为重复的问题,因为我尝试了有关此问题的几乎所有答案,但均无济于事。

Uff.. took the hell out of me to fix this issue. 乌夫..让我死了,解决了这个问题。 Spent more than 48 hrs trying random stuffs with .htaccess files. 尝试使用.htaccess文件随机花费48小时以上。 There were no error log files generated inside application/logs dir. 在application / logs目录中没有生成错误日志文件。 So, that gave me a massive headache. 因此,这让我非常头痛。

But finally from somewhere it hit my head that I should see the error log files from cpanel and it was where I found whats causing the issue. 但是最终从某个地方击中了我的头,我应该看到cpanel的错误日志文件,并且在这里我找到了引起问题的原因。 My project dir had 777 permission and that was the reason. 我的项目目录具有777权限,这就是原因。 Then it worked when I changed the dir permission to 755. 然后,当我将dir权限更改为755时,它起作用了。

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

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