Fix: PHP fgets() cannot be trusted to read a large line reliably