#38341 [NEW]: Problem in getting hostname when the program runs as cronjob
| From: | manikandan dot r at greynium dot com | Date: | Sat, 05 Aug 2006 09:15:07 +0000 |
| Subject: | #38341 [NEW]: Problem in getting hostname when the program runs as cronjob | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-100376@lists.php.net to get a copy of this message | ||
From: manikandan dot r at greynium dot com
Operating system:
PHP version: 5.1.4
PHP Bug Type: Output Control
Bug description: Problem in getting hostname when the program runs as cronjob
Description:
------------
I used $_SERVER global variable to get the hostname and it is working
fine, when the programs run in command line. But i was not get the value
of the hostname [ $_SERVER['HOST']] when the file runs as cronjob.
How to get the value of hostname?
----
Mani
Reproduce code:
---------------
echo $_SERVER['HOST'];
Expected result:
----------------
php5.greynium.com -My development server hostname.
Actual result:
--------------
Empty
--
Edit bug report at http://bugs.php.net/?id=38341&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38341&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38341&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38341&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38341&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=38341&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38341&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38341&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38341&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38341&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38341&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=38341&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=38341&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38341&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38341&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38341&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38341&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38341&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38341&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38341&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38341&r=mysqlcfg