We are currently experiencing issues with HTTP streams within PHP scripts. The
following will present sample code that produces the error, error messages, and system
information.
Code that produces errors:
http://somewebhost.domain.gTLD/index.html";, "r");
$httpfile = file_get_contents("http://somewebhost.domain.gTLD/index.html";);
include 'http://somewebhost.domain.gTLD/index.html';
?>
Errors:
Warning: fopen(http://somewebhost.domain.gTLD): failed to open stream: HTTP request
failed! in /www/localwebhost.domain.gTLD/htdocs/test.php on line 2
Warning: file_get_contents(http://somewebhost.domain.gTLD/index.html): failed to open
stream: HTTP request failed! Ø `· in /www/localwebhost.domain.gTLD/htdocs/test.php on
line 3
Warning: main(http://somewebhost.domain.gTLD/index.html): failed to open stream: HTTP
request failed! 0vÿ¿Øc xÀN1·~a1·þ: in /www/localwebhost.domain.gTLD/htdocs/test.php
on line 4
Warning: main(): Failed opening 'http://somewebhost.domain.gTLD/index.html' for
inclusion (include_path='.') in /www/localwebhost.domain.gTLD/htdocs/test.php on line 4
System info:
System is running RedHat ES 3 with all the latest patches applied. The system has
approx 512 virtual web sites configured in Apache. The Apache startup script changes
the max file descriptors to a number higher than the RedHat default of 1024 (the
number is currently set too 409600; we have also tried lower numbers such as 8192;
please, note that Apache opens more than 1024 files upon startup and that the default
setting is no longer an option; each virtual site has its own access log and error
log).
RPM list:
kernel-smp-2.4.21-15.0.4.EL
httpd-2.0.46-32.ent.3
php-4.3.2-11.1.ent
php-mysql-4.3.2-11.1.ent
PHP specifics:
'./configure' '--host=i386-redhat-linux' '--build=i386-redhat-linux'
'--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr'
'--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc'
'--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib'
'--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com'
'--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache'
'--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d'
'--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath'
'--enable-inline-optimization' '--with-bz2' '--with-db4=/usr' '--with-curl'
'--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr'
'--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf'
'--with-gettext' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr'
'--with-openssl' '--with-png' '--with-pspell' '--with-regex=system' '--with-xml'
'--with-expat-dir=/usr' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU'
'--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes'
'--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
'--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp'
'--enable-wddx' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex'
'--without-oci8' '--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl'
'--with-kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr'
'--with-pgsql=shared' '--with-unixODBC=shared' '--enable-memory-limit'
'--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar'
'--enable-dbx' '--enable-dio' '--enable-mcal' '--with-apxs2filter=/usr/sbin/apxs'
We would like to know how to further troubleshoot this error to determine the reason
why this error message started happening. We have other web servers configured
identically (same version of RedHat distribution, same version of Apache, PHP etc.),
with fewer web sites that are not experiencing this issue.
Please, let us know if there is any additional information needed.
Thank you,
Tim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php