Bug - preg_match(): Compilation failed: regular expression is too large at offset 32785


@laptop, This appears to be a bug in codeignitor. However,it also appears as if you alone are seeing this error, We are not seeing other reports of the problem.

Given that, the only way to debug this might be to catch it as it happens. I would be happy to assist but this will mean providing access to your server (for example FTP or SSH access).

Please feel free to PM me here or on slack if you wish to proceed with this course of action.


I am able to see where a possible issue might be occurring, but I am unable to reproduce the problem locally. I suppose it is just the way my local data is set up. Let me work with it some more until I can force a crash on my local system.


Maybe filling the system with several thousand records will help, because no other changes have been made before the bug occurred. Thanks for your help!


You are spot on here. The issue relates back to a query that searches the allocation of clients to a guest user. Because you have over 5000 records, it builds a mammoth query - something like

.. WHERE client_id = 2 OR client_id = 6 OR client_id = 11 OR client_id = 12 OR ...

(If you can imagine that query extending out over 5000 clients you will get the picture.)

This is not handled well in the Codeignitor framework.

I will log a fix request during this weekend and seek an alternate way of writing the query and provide a fix soon,




Any chance to solve this issue soon?