Fixed #1008: [EXPLETIVE] Fucking Debian fucking ruined their fucking PHP package once again, and now we need to waste fucking time to fucking fix it
ported 0decb25ad15e14481e88fa5858f8bf2a88238185, refs #1008