Are you using cageFS? try disable CageFS for this user temporarily see if it works.
Maybe the Locale files are missing under that cage, causes PHP failed to set the locale.
Otherwise, please add "sleep(30)" at the beginning of the script, then you can locate the process serving the script and strace it to find out what happened.