Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] - CI4 show errors not clearly
#1
Lightbulb 
(This post was last modified: 09-28-2020, 07:24 PM by nc03061981.)

Dear,
I see CI4 show errors not clearly
• CI3 show errors clearly (error in file and in line, so clearly)

Any method to see errors clearly
??
Thanks for help

Learning CI4 from my works, from errors and how to fix bugs in the community

Love CI & Thanks CI Teams

Reply
#2

(This post was last modified: 09-27-2020, 04:36 AM by captain-sensible. Edit Reason: forgot image )

i'm not sure if anybody understands what you mean by not clear

i'm playing with "honeypot" and purposely triggering it (see image)

I got :
Code:
SYSTEMPATH/Honeypot/Exceptions/HoneypotException.php at line 25

Which shows a Honeypot exception triggered meaning basically i mimicked a bot so , it triggered .

To get that output i put in index.php which is is public the following line :


Code:
$_SERVER['CI_ENVIRONMENT'] = 'development';


i don't bother with .env since that just confuses me

What error code are you getting that are not clear ? give an example please
Reply
#3

Example:
I am playing DashboardModel, if have errors:
- CI3 show: in file DashboardModel.php, error info, in line 1235
- CI4 show: not same CI3
Thanks captain-sensible for reply

Learning CI4 from my works, from errors and how to fix bugs in the community

Love CI & Thanks CI Teams

Reply
#4

in your app/Config/Log file, change the logThreshold to 4 instead of 3. Then check your logs again.
Reply
#5

You can do these steps to see the errors on CI4:

1- Config - Boot - Production,
 init_set('display_errors', '0'); Make the "0" -> "1".

2- Copy env file and rename .env
    (Line number was 17  I guess), CI_ENVIRONMENT production. Make it development. Not production.

You will be able to see the errors in detail.
Reply
#6

(This post was last modified: 09-27-2020, 04:19 PM by nc03061981.)

(09-27-2020, 10:27 AM)paulbalandan Wrote: in your app/Config/Log file, change the logThreshold to 4 instead of 3. Then check your logs again.

Thanks but it not work

(09-27-2020, 01:15 PM)demyr Wrote: You can do these steps to see the errors on CI4:

1- Config - Boot - Production,
 init_set('display_errors', '0'); Make the "0" -> "1".

2- Copy env file and rename .env
    (Line number was 17  I guess), CI_ENVIRONMENT production. Make it development. Not production.

You will be able to see the errors in detail.

Thanks, I use
1- Config - Boot - Production,
init_set('display_errors', '0'); Make the "0" -> "1".

and it working fine
I can see very very detail of erros
Thanks @demyr

Learning CI4 from my works, from errors and how to fix bugs in the community

Love CI & Thanks CI Teams

Reply
#7

(09-27-2020, 01:15 PM)demyr Wrote: You can do these steps to see the errors on CI4:

1- Config - Boot - Production,
 init_set('display_errors', '0'); Make the "0" -> "1".

2- Copy env file and rename .env
    (Line number was 17  I guess), CI_ENVIRONMENT production. Make it development. Not production.

You will be able to see the errors in detail.

Working fine
Thanks for help

Learning CI4 from my works, from errors and how to fix bugs in the community

Love CI & Thanks CI Teams

Reply
#8

(This post was last modified: 09-28-2020, 02:20 AM by paulbalandan.)

You should not change the Config\Boot\production file. From your use case it seems you are running in production environment but wants to run in development mode in order to see the errors in full detail.

Here are the steps to change the environment.
1. Copy the `env` file to `.env`. (Take note of the leading dot)
2. In the `.env` file, change the line of `CI_ENVIRONMENT = production` to `CI_ENVIRONMENT = development`. Also make sure to remove the beginning #.

Changes made to the Config\Boot\production will just be overridden in the next version update.
Reply
#9

(This post was last modified: 09-28-2020, 02:44 AM by nc03061981.)

(09-28-2020, 02:19 AM)paulbalandan Wrote: You should not change the Config\Boot\production file. From your use case it seems you are running in production environment but wants to run in development mode in order to see the errors in full detail.

Here are the steps to change the environment.
1. Copy the `env` file to `.env`. (Take note of the leading dot)
2. In the `.env` file, change the line of `CI_ENVIRONMENT = production` to `CI_ENVIRONMENT = development`. Also make sure to remove the beginning #.

Changes made to the Config\Boot\production will just be overridden in the next version update.

Correct
Thanks for help

Thank you everyone for helping me fix the error.
Because I haven't copied the evn file and changed it to .evn, the change doesn't work.

Thank you once again for helping me gradually understand the problem.

Learning CI4 from my works, from errors and how to fix bugs in the community

Love CI & Thanks CI Teams

Reply
#10

(09-27-2020, 05:31 PM)nc03061981 Wrote:
(09-27-2020, 01:15 PM)demyr Wrote: You can do these steps to see the errors on CI4:

1- Config - Boot - Production,
 init_set('display_errors', '0'); Make the "0" -> "1".

2- Copy env file and rename .env
    (Line number was 17  I guess), CI_ENVIRONMENT production. Make it development. Not production.

You will be able to see the errors in detail.

Working fine
Thanks for help

You're welcome. Enjoy it!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB