Welcome Guest, Not a member yet? Register   Sign In
How to configure error reporting in CodeIgniter 4?
#1

After installing and configuring CI 4 I can see the home controller and the debug bar as normal (I'm in development mode).

There is a problem with error reporting. If I try to deliberately write some wrong PHP code, CodeIgniter overrides the normal PHP behaviour and hides the errors (in development mode!!).

Here's an example of deliberately adding a PHP error to the home controller:

<?php namespace App\Controllers;

class Home extends BaseController
{
    public function index()
    {
        this is an error!! ()
        return view('welcome_message');
    }

}
Here's the output (which is not helpful with real errors):

No direct script access allowed
How can I set CodeIgniter 4 to show PHP errors? (the error is not even logged anywhere inside the server)
Reply
#2

app/Config/Logger.php thats were you setup CodeIgniters Error Log filing.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB