简体   繁体   中英

my codeigniter is not working on centos (internal server error 500)

I'm kinda stuck right now. I just got a clean centos server with LAMP.

mysql is working AND httpd is working, but my codeigniter project is not.

I'm getting 500 Internal Server Error so I'm pretty sure it has something to do with my .htaccess file but I can't figure out what.

Normally I'm just using the following (and that always does the trick)

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>

However this time it doesn't:

  • my mod_rewrite is enabled
  • just a simple php page with a echo is working so php running fine
  • my mysql is up and running

Its just as soon as I put my codeigniter project on the server nothing happens

My access log says:

[24/Sep/2014:10:01:50 +0800] "GET / HTTP/1.1" 500 - "-" "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0"

my error log doesnt say anything

I know there are alot of simular topics but so far i havent found the solution for my problem normally the answer is in the .htaccess file and its exactly like I have it

so Im totally lost atm and some help is appreciated.

okay i fixed it turned out that my problem was NOT in the routing but that the correct DB drivers where not installed. and because the database library was already loaded in codeigniter just displayed blank pages with the 500 error

How do I configure php to enable pdo and include mysqli on CentOS?

this was my exact problem and the answer was just install the drivers and its working now. :)

did you already check the folder permission of the codeigniter folder?

if not then just use

chmod -R 777 codeigniter_folder

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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