Re: CRON throws error, but no command line problems

From: Date: Fri, 19 Dec 2003 13:59:26 +0000
Subject: Re: CRON throws error, but no command line problems
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-173017@lists.php.net to get a copy of this message
This is usually a DNS error. It's telling you it can't find an IP address for the given hostname -Dave At 08:57 AM 12/19/2003, Jay Blanchard wrote:
Good morning group! I am running PHP 4.3.4RC1 on a FreeBSD sevrer that recently came online as an upgrade from another server. (previous PHP version was 4.1.n) Via a CRON job I am running a script that was working fine to ftp another server, download some files, and then process those files. Here is the code snippet where the failure occurs... // ftp variables $ftp_server = "rc.foo.com"; $ftp_user = "foo"; $ftp_pass = "foopass"; // connect to ftp server $ftpc = ftp_connect($ftp_server); <--LINE 36 if(!ftp_login($ftpc, $ftp_user, $ftp_pass)){
        echo "Could not login to $ftp_server";
        exit();
} The CRON reports this PHP Warning: ftp_connect(): php_network_getaddresses: getaddrinfo failed: No address associated with hostname in /usr/local/www/data.default/crm/parsecdr.php on line 36 The only reference I could find to this problem was in http://www.php.net/fopen which said that Apache should be restarted. I have done the restart and I am for the CRON job to run again in the next few minutes. While I am waiting has anyone ever seen this error? If so, can you give me an idea of what I may need to do to fix the problem? I would be so appreciative and will put in a good word with Santa for you. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#173017) next »