Welcome Guest, Not a member yet? Register   Sign In
Exception details in log
#11

The correct way is to edit your php.ini file. Edit memory_limit to your desire value.

As from your question, 128M (which is the default limit) has been exceeded, so there is something seriously
wrong with your code as it should not take that much.

If you know why it takes that much and you want to allow it set memory_limit = 512M or higher and you should be good.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#12

(10-26-2023, 09:31 PM)InsiteFX Wrote: The correct way is to edit your php.ini file. Edit memory_limit to your desire value.

As from your question, 128M (which is the default limit) has been exceeded, so there is something seriously
wrong with your code as it should not take that much.

If you know why it takes that much and you want to allow it set memory_limit = 512M or higher and you should be good.

I'm aware of there is an error and something is causing it.

My question is how can I get CodeIgniter to tell me what page the error occurred on? When it logs a critical error, it won't tell me which script/page caused the issue, just the stack trace from index.php to system calls.

This makes it infinitely hard to figure out this edge case.
Reply
#13

Why don't you check Apache's access log?
Reply
#14

(10-27-2023, 01:05 AM)kenjis Wrote: Why don't you check Apache's access log?

It's one way to do it, sure. But when you have 20k+ pageviews per day, narrowing down an apache access log for an error is difficult.

I'm just wondering why we can't get page url's added into the CodeIgniter Error logging since it gives us lots of useful information anyway, why not implement the page url too?
Reply
#15

[quote pid="413505" dateline="1698396656"]

It's one way to do it, sure. But when you have 20k+ pageviews per day, narrowing down an apache access log for an error is difficult.


Just maybe ... pipe through "grep" or equivalent from command line or bash script for key words that you have shown  one file at a time .   To be fair cant at this moment think of the code to do that ..
[/quote]
CMS CI4     I use Arch Linux by the way 

Reply
#16

@CIDave It is easy to answer the question. It is because nobody sent a Pull Request like that.

I sent a PR: https://github.com/codeigniter4/CodeIgniter4/pull/8108
Reply
#17

(10-27-2023, 02:25 PM)kenjis Wrote: @CIDave It is easy to answer the question. It is because nobody sent a Pull Request like that.

I sent a PR: https://github.com/codeigniter4/CodeIgniter4/pull/8108

Brilliant! I think a lot of people will find this useful Smile
Reply




Theme © iAndrew 2016 - Forum software by © MyBB