DD, I just had this same issue and resolved it (for me). There's a couple ways to solve this. On my servers (centos 5) the env variables retrieved from _SERVER are available from the cli but they are a subset of the ones available from http. And cronjobs are even fewer than cli env variables as I have come to find. So it really just all depends on what user crontab runs as. I like the idea of setting a php.ini variable to find your environment but if php.ini changes and sometimes it does with php version updates, this could break. I chose to use the HOSTNAME env variable. You can set this in your .bash_profile for whichever user crontab runs as. Or you can set it globally in /etc/profile. Or you can just set it in your crontab entry like so:
* * * * * HOSTNAME=dev.domain.com;export HOSTNAME;/path/to/execute/your/cakeshell/script You can set any env variable using anyone of those ways. Hope this helps -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
