Bug occured after trying to add a new customer in Version 1.5.8 - Please help
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>
ERROR - 2019-02-24 08:57:33 --> Severity: Warning --> preg_match(): Compilation failed: regular expression is too large at offset 32785 /home/ideatrad/public_html/invoice/vendor/codeigniter/framework/system/database/DB_query_builder.php 2413
ERROR - 2019-02-24 08:57:34 --> Severity: Warning --> Cannot modify header information - headers already sent by (output started at /home/ideatrad/public_html/invoice/vendor/codeigniter/framework/system/core/Exceptions.php:271) /home/ideatrad/public_html/invoice/vendor/codeigniter/framework/system/helpers/url_helper.php 564
As this is a problem of the code itself changing the PHP version is not changing the code but using PHP 7 (and greater) is at least very good as its minimum requirement. BUT it can not solve the problem your having!
Pls do it like this:
create a Backup of FTP and DB
Update IP 1.5.8 to IP 1.5.9
check if everything is working now.
report back if it helped
untill your not on the latest IP version support here is ‘limited’ as this will most probably fix all Bugs/issues your having. So updating is the first thing you should do.
Have you installed/modified something else which makes you installation not stock?
Then pls provide us a bit more infos about your system environment.
are you running IP from Webhosting or dedicated Hosting?
if Webhosting, at which provider?
On which Server/OS (and version) are you hosting IP?
do you use some hosting panel? If so which and which version?
do you have a normal PHP version or and home-brew one?
how many customers do you have?
If this happens this part will never be scalable.
I did never encounter this issue but maybe I cant even help here and the RegEx part just have to be made smaller, much smaller when it hits the offset 32785
Hope someone else can help here as my skills with RegEx are limited.
If some of the Devs see this maybe this practice solves the problem and improves performance: LINK
I personally think that Webhost for IP is not the best choice but this should not be the biggest problem.
Like I said: running big RegEx querys makes code un-scalable.
This in combination with 5.000 will make RegEx reach its limitations. (my own opinion)
I think making the RegEx part smaller would solve the issue.
I sadly have to say that I can not help you with this but hopefully some devs can. (@Severenth can you help here?)
It is difficult to help unless others are experiencing this too.
It looks like a simple enough query from the trace - I wonder what could be causing a query to be generated more that 32 K.
You can however, help us (if you have some coding savy).
The error is occurring in this file -
vendor/codeigniter/framework/system/database/DB_query_builder.php
If you are able to edit the file, let me know. I will suggest some code changes that might help us pinpoint the error.
It shows each time when adding a new client.
Is there anything unusual about the client data, for example a very large text field, or some value that is cut and pasted.
<?php defined(‘BASEPATH’) OR exit(‘No direct script access allowed’); ?>
You posted that error. That looks like a weird redirect. Can you tell me the following URLS
The URL before you clicked the button to add the client
The URL when the error shows,
Also, if you have slack, look me up so that we can go through some details of your applications.
I can edit the DB_query_builder.php if you can tell me what to insert in it. Regarding the entered client data - it’s almost always just a simple email or the additional fields as city, VAT# address and so on - row in CP1251 encoding - none of them is longer than 3-4 words
This will stop the application dead in it’s tracks, but it will catch the error when it happens, and will print out the large condition that is being processed as part of the query.
Message: Cannot modify header information - headers already sent by (output started at /home/ideatrad/public_html/invoice/vendor/codeigniter/framework/system/core/Exceptions.php:271)