Re: Missing Env. Variables when called by AT Scheduler
| From: | Chris | Date: | Tue, 07 Oct 2008 23:30:45 +0000 |
| Subject: | Re: Missing Env. Variables when called by AT Scheduler | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-281546@lists.php.net to get a copy of this message | ||
JJB wrote:
We regularly send out massive mail blasts to our customers. Recently several mail blasts failed to transmit. After a serious amount of research we found the snippet of code below to be the place where it was breaking down. The issue it seems is that the Environment Variables HOST and SERVER_NAME are sometimes not returning true when executed from the Linux AT scheduler. (using atq commands). doing a php -i from the command line returns the correct values, as does putting in a php info command at the top of the script and opening it from a browser.I doubt php -i does that at all. $ php -i | grep 'SERVER_NAME' $ $_SERVER['SERVER_NAME'] and $_SERVER['HOST'] are set by web servers, they are not available through php-cli. -- Postgresql & php tutorials http://www.designmagick.com/