I have a CLI PHP script that is run by cron that is missing nearly every _SERVER and _ENV variable. I understand that this is generally the case, but there is one variable that I really, really need. I need to know the host name of the server that the script is running on. Every possible value that I could use to deduce that from…

$_SERVER['HTTP_HOST']
$_SERVER['SERVER_NAME']
$_SERVER['HOSTNAME']
$_ENV['HOSTNAME']


…are empty. Any ideas? Any way that I can get one (or more) of those values to be populated? Any other way to determine what server I'm on?

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to