#43057 [Fbk->Opn]: mod_php can't resolve any hostname

From: Date: Mon, 22 Oct 2007 11:11:16 +0000
Subject: #43057 [Fbk->Opn]: mod_php can't resolve any hostname
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-118821@lists.php.net to get a copy of this message
ID: 43057 User updated by: bigboss at rambler dot ru Reported By: bigboss at rambler dot ru -Status: Feedback +Status: Open Bug Type: Apache2 related Operating System: FreeBSD 6.2 PHP Version: 5.2.4 New Comment: Yes, it is. Previous Comments: ------------------------------------------------------------------------ [2007-10-22 08:09:37] jani@php.net Does the same script work if you run it using PHP CLI? (command line) ------------------------------------------------------------------------ [2007-10-21 10:40:39] bigboss at rambler dot ru Some situation was described here: http://bugs.php.net/bug.php?id=8754&edit=2 But problem not fixed... ------------------------------------------------------------------------ [2007-10-21 10:14:58] bigboss at rambler dot ru Description: ------------ When I execute this script as http://mysite.ru/script.php (i.e. using apache with mod_php) - I see: Warning: readfile(): php_network_getaddresses: getaddrinfo failed: hostname nor servname provided, or not known in /usr/home/user/htdocs/script.php on line 3 Warning: readfile(http://ya.ru): failed to open stream: Bad file descriptor in /usr/home/user/htdocs/script.php on line 2 But when I execute this script with SSH as: #php asdf.php it's working! Apache 2.2.6, PHP 5.2.4, FreeBSD 6.2 Reproduce code: --------------- <? readfile('http://ya.ru'); ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43057&edit=1

« previous php.bugs (#118821) next »