Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

https://gist.github.com/3199578

this is the nginx vhost

https://gist.github.com/3199552

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

https://gist.github.com/3199602

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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

/etc/localtime 

-and-

/usr/share/zoneinfo

to

/chroot/path/etc/localtime 

-and-

/chroot/path/usr/share/zoneinfo

also maybe add

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

share|improve this answer
    
Thanks! putting the /etc/localtime and zoneinfo worked.. –  Vid Luther Aug 6 '12 at 14:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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