Open EMR - 5.0.2. - Windows or Linux

We have two OpenEMR systems in our office for two doctors.
First we started in 2012, and the second in 2017.
First EMR have almost 4000 patients, and second around 1400.
The second EMR system which was launched later, was started on OpenEMR 5.0.0, had all upgrades till 5.0.2(3), and works grate on 5.0.2., no any problems, fast respond.
But the first one, which we using for 8 years, was started on OpenEMR versions 4.1.0, and had all upgrades till 5.0.1. on Windows platform. It was transferred to Linux MINT platform, and works perfect on version 501. But have a problem on 502.

Is there is any settings in php to resolve this problem.