Disclaimer: I'm not yet sure if this is an RPi issue, or because of different Debian/PHP versions.
If this is not the right place to ask this, please let me know

I've got 2 FTDI USB-to-serial adapters connected to a Raspberry Pi 3.
I'm running PHP code to communicate with a video analog-to-digital converter (ADC).
Now I've moved the FTDI adapters from a PC (Debian 6) to the RPi (Raspbian 10).
Serial communication works fine if I run the PHP code on the commandline (CLI), but throws I/O errors when opening the identical (!) code as PHP (over Apache2) in the browser.
The errors appear randomly for any command that tries to talk to the FTDI adapter...
I've already diffed the 2 php.ini files, and changed them to match: no change at all.
The code is stable and was in daily use since 2012 without any problems.
Has anyone gotten any ideas?
Thank you very much in advance!