php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43057 mod_php can't resolve any hostname
Submitted: 2007-10-21 10:14 UTC Modified: 2007-11-12 10:15 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: bigboss at rambler dot ru Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 5.2.4 OS: FreeBSD 6.2
Private report: No CVE-ID: None
 [2007-10-21 10:14 UTC] 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');
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-21 10:40 UTC] 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-22 08:09 UTC] jani@php.net
Does the same script work if you run it using PHP CLI? (command line)
 [2007-10-22 11:11 UTC] bigboss at rambler dot ru
Yes, it is.
 [2007-10-23 09:40 UTC] jani@php.net
Please check what the difference between linked libraries is between your PHP CLI binary and the libphp5.so in your system.
 [2007-10-23 09:51 UTC] bigboss at rambler dot ru
How?
 [2007-10-23 10:38 UTC] bigboss at rambler dot ru
I am using php5 port for build PHP on my server...
 [2007-10-25 21:15 UTC] mail at czar dot dk
upgrade to PHP Version 5.2.5RC2-dev did not help, same problem appears

uname -a
FreeBSD web2.netplads.dk 6.2-RELEASE-p8 FreeBSD 6.2-RELEASE-p8 #6: Fri Oct 12 17:23:48 CEST 2007     czar@web2.netplads.dk:/usr/obj/usr/src/sys/SMP  amd64

apache 2.0.61


configure options:
./configure --enable-bcmath --enable-calendar --enable-discard-path --enable-exif --enable-ftp --enable-gd-native-ttf --enable-libxml --enable-magic-quotes --enable-pic --enable-safe-mode --enable-sockets --enable-zip --prefix=/usr/local --with-apxs2=/usr/local/apache/bin/apxs --with-curl=/opt/curlssl/ --with-curlwrappers --with-freetype-dir=/usr/local --with-gd --with-gettext --with-imap=/opt/php_with_imap_client/ --with-imap-ssl=/usr/local --with-jpeg-dir=/usr/local --with-libxml-dir=/opt/xml2/ --with-mcrypt=/opt/libmcrypt/ --with-mhash=/opt/mhash/ --with-mysql --with-openssl=/usr/local --with-openssl-dir=/usr/local --with-png-dir=/usr/local --with-ttf --with-xpm-dir=/usr/local --with-zlib --with-zlib-dir=/usr --disable-ipv6
 [2007-10-29 10:27 UTC] bigboss at rambler dot ru
May be this is problem of FreeBSD 6.2? I have another server with FreeBSD 6.1 and it's working fine.
 [2007-10-31 11:51 UTC] mail at czar dot dk
upgraded my freebsd to 6.3 prerelease, it works again..

i'm reporting this to the freebsd community...
 [2007-11-12 10:15 UTC] tony2001@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 02:01:30 2024 UTC