I'm trying to setup a PHP-FPM Chroot jail on a new CentOS 6.3 box. I can get the chroot to work fine, in the sense that I can get php scripts to respond and echo things out. But, every time I use the date function, I get an error saying the timezone db is corrupt.

All I've done is changed the value of the chroot directive in php-fpm conf, to be the document root as specified in nginx.

This is the test script:


this is the nginx vhost


Here's the output I get when I go to localhost



do you have copy of TZ stuff inside the chroot folder ?








also maybe add

add TZ=CST (or whatever your TZ is) in the nginx config details here: http://wiki.nginx.org/CoreModule#env

  • Thanks! putting the /etc/localtime and zoneinfo worked.. – Vid Luther Aug 6 '12 at 14:48
  • copy? isn't a mount better? – the_nuts Mar 26 '16 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.