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
As of php 5.3, you can use the gethostname() function. Another option
is running the hostname shell command.
--
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 re
When running a PHP script VIA crontab the _SERVER ENV variables will
not be in scope due to script not running through your http server.
Perhaps you should set a variable in your PHP.ini file on your dev
machine and have your Task check to see if it is on your DEV machine
by doing an ini_get and
Hey,
for a specific cronjob I need to determine on which Server I am.
Normally I do this by the bootstrap where the Server Variable is
checked and configurations like
Configure::write('NON_SSL_HOST', 'http://www.domain.com').
But with Configure::read(...) I cannot get these entries from within a