Welcome Guest, Not a member yet? Register   Sign In
Codeigniter 3.x
#1

I'm getting a 500 error in Heroku trying to launch a staging Codeigniter 3.x project (for the first time). I can't seem to get any better logs than that.

I am using the heroku-php-apache2 buildpack. PHP version is 5.6.x

However, through debugging I can see it is properly setting the root directory as public_html, it is loading the index.php in the root directory, it is loading the config.php and database.php, and it is loading the routes.php.

In my routes.php I have: $route['default_controller'] = "home";

When I go to the homepage, the root, I'm getting a 500 error and it is not loading the home/index controller method like it is supposed to. When I reference a css file, such as https://staging-app/css/grid.css, it does load that so I know the directories are being accessed properly.

In case needed, my .htaccess is

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /

  #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
  #RewriteCond %{REQUEST_URI} !business-loan-tips.*
  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>
Although, it seems to load the same with or without it.

My composer.json is empty except for '{}'

And my Procfile just has:

web: vendor/bin/heroku-php-apache2 public_html/
Any ideas on where I could be going wrong to get a 500 error or how I can track it down better?
Reply


Messages In This Thread
Codeigniter 3.x - by FilembarEliJeevan - 08-02-2022, 05:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB