Debug Exception crashing the app |
Hello,
i have too often issues with the Debug\Exception, and i really wish we could easily turn it off even in development mode on. this time, in development mode, i have a controller and a view that works fine, and i add comments : like 50 lines of commented mixed php/html code in my view PHP Code: <?php /* and then the app crash with this in the log and the Debug\Exception display that goes with Code: CRITICAL - 2021-11-03 10:10:23 --> Allowed memory size of 134217728 bytes exhausted (tried to allocate 18788264 bytes) i comment the CI_ENVIRONMENT = development in the .env file and then it works fine, not even an error in the logs... This is way too often that the Debug\Exception code crash the app requesting more memory, and not displaying the real error, when there is one. This time there is not even an error in my code : the app crashs on PHP comments.
Check the error_reporting(); setting in the following file:
./app/Config/Boot/production.php I don’t know and cannot check on my tablet if CodeIgniter4 redirects the error log file but it should show on phpinfo(); otherwise try the following: PHP Code: //Use ini_get to get the error_log directive. The error_log location can easily be modified by using the following: PHP Code: $newLog = ini_set(‘error_log’, “NEW-LOCATION.log’); (11-03-2021, 05:50 AM)John_Betong Wrote: Check the error_reporting(); setting in the following file: thank you for reply, I'm sorry but i don't understand why i should make any change in the production config file while everything works fine in production mode ??? ... what i wish to do is to disable the Debug\Exception() thing in the development mode, but from what i've read so far it is not possible for the moment.
> The toolbar itself is displayed as an After Filter. You can stop it from ever running by removing it from the $globals property of app/Config/Filters.php.
https://codeigniter4.github.io/CodeIgnit...he-toolbar
11-05-2021, 12:00 AM
(This post was last modified: 11-05-2021, 12:13 AM by John_Betong. Edit Reason: Forgot to mention the php.ini ) Quote:@tomasoma, Try this: // File: ./system/Debug/Exceptions.php // around line: 81 PHP Code: public function initialize() Edit: I forgot to mention about my php.ini settings Code: error_prepend_string = " |
Welcome Guest, Not a member yet? Register Sign In |