OpenEMR Version: 7.0.4 Server Environment: Ubuntu, Apache, PHP-FPM 8.2 Module Affected: Fees → Batch Payments → Edit/Modify Payments
The Problem
When attempting to allocate or modify a payment for a patient with a large number of charges/encounters, clicking Modify Payments results in a solid white screen with only the “Modify Payments” and “Finish Payments” buttons visible. The payment does not post and no allocation is written to the database.
This can also affect the initial batch payment posting — the payment session is created and the dollar amount is saved, but nothing is allocated to the encounters. The money sits in the Undistributed (red) field when the payment is later searched.
Root Cause
PHP has a default limit of 1,000 input variables per request (max_input_vars = 1000 in php.ini). When a patient has many charges and encounters displayed in the Batch Payment screen, the form submission exceeds this limit. PHP silently truncates the POST data, stripping critical variables including payment_id. Without payment_id, edit_payment.php cannot process the request and renders a blank page.
This was confirmed in the Apache error log:
PHP Warning: PHP Request Startup: Input variables exceeded 1000.
To increase the limit change max_input_vars in php.ini.
PHP Warning: Undefined array key "payment_id" in
/var/www/html/openemr/interface/billing/edit_payment.php on line 391
The Fix
Increase max_input_vars in your PHP-FPM php.ini file.
Step 1 — Identify your active PHP-FPM version:
bash
ps aux | grep php-fpm | grep master
Note the version (e.g., 8.2).
Step 2 — Back up your php.ini:
bash
sudo cp /etc/php/8.2/fpm/php.ini /etc/php/8.2/fpm/php.ini.bak.$(date +%F)
Step 3 — Increase max_input_vars:
bash
sudo sed -i 's/^;*max_input_vars.*/max_input_vars = 5000/' /etc/php/8.2/fpm/php.ini
Step 4 — Verify the change:
bash
grep "max_input_vars" /etc/php/8.2/fpm/php.ini
Should return: max_input_vars = 5000
Step 5 — Restart PHP-FPM:
bash
sudo systemctl restart php8.2-fpm
Result
After applying the fix, Modify Payments processes correctly for patients with large encounter lists and the white screen no longer occurs.
Notes
- Adjust the PHP version number in the paths to match your server (8.2, 8.3, etc.)
- If you run Apache with mod_php instead of PHP-FPM, the file to edit may be
/etc/php/8.x/apache2/php.iniinstead - A value of 5000 provides substantial headroom for even the largest patient encounter lists
- This fix applies to all users hitting the same patient — it is a server-wide setting
Reported and resolved at NP Health Clinic, Lumberton TX. Running OpenEMR 7.0.4 on Ubuntu with Apache + PHP-FPM 8.2.