We can't account (using discrete `.ini` files) for the case where a new PHP module is installed after gear deploy unless `php.d` is unlocked. I considered modifying `bin/control` to do a `/bin/rm ${OPENSHIFT_PHP_DIR}configuration/etc/php.d/*` before this line: https://github.com/openshift/origin-server/pull/5307/files#diff-0269029c61b0781adc2731bc91cfd0c6R66
It would take care of the issue you raised, but I think it has a bad smell.

An alternative would be to provide a "`modules.ini`" file, and just concatenate the relevant `.ini`s into it; I'm pretty sure that would work.