|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-01-15 04:30 UTC] support at hostcolor dot com
Script:
-------------------------
<?php
$fp = fsockopen ("localhost", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br>\n";
}
fclose ($fp);
?>
Output:
-------------------------
Warning: fsockopen() [function.fsockopen]: php_hostconnect: connect failed in /home/virtual/site1/fst/var/www/html/t5.php on line 2
Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:80 in /home/virtual/site1/fst/var/www/html/t5.php on line 2
Operation now in progress (115)
Warning: fclose(): supplied argument is not a valid stream resource in /home/virtual/site1/fst/var/www/html/t5.php on line 6
Modules:
---------------------------
./configure' 'i386-redhat-linux' '--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' '--prefix=/usr' '--with-config-file-path=/etc' '--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath' '--enable-inline-optimization' '--with-bz2' '--with-db3' '--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-gdbm' '--with-gettext=shared' '--with-ncurses' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pear' '--with-png' '--with-regex=system' '--with-xml' '--with-expat-dir=/usr' '--with-zlib' '--with-layout=GNU' '--enable-bcmath' '--enable-debugger' '--enable-exif' '--enable-ftp=shared' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--enable-discard-path' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' '--enable-sockets' '--with-imap=shared' '--with-kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mysql' '--with-pgsql=shared' '--with-snmp=shared' '--with-snmp=shared' '--enable-ucd-snmp-hack' '--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' '--enable-shmop' '--enable-versioning' '--enable-calendar' '--enable-dbx' '--enable-dio' '--enable-mcal' '--enable-mbstring' '--enable-mbstr-enc-trans' '--disable-experimental-zts' '--with-apxs=/usr/sbin/apxs' '--enable-debug'
Additional information:
----------------------
The same script is running at the command prompt.
$result = socket_connect ($socket, "localhost", 80); is running fine on prompt and into browser.
I am sure www service is up and running. There is no internal firewall rules on the machine.
gdb backtrace:
----------------------------
I configured with --enable-debug
[root@ensim html]# gdb /usr/sbin/httpd
GNU gdb Red Hat Linux (5.2-2)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(no debugging symbols found)...
(gdb) run -X
Starting program: /usr/sbin/httpd -X
[New Thread 1024 (LWP 3641)]
Processing config directory: /etc/appliance/apacheconf
Processing config file: /etc/appliance/apacheconf/apache
Processing config directory: /etc/httpd/conf/virtual
Processing config file: /etc/httpd/conf/virtual/site1
Processing config directory: /etc/httpd/conf/site1
Processing config file: /etc/httpd/conf/site1/cgi
Processing config file: /etc/httpd/conf/site1/frontpage
Processing config file: /etc/httpd/conf/site1/mod_perl
Processing config file: /etc/httpd/conf/site1/sqmail
Processing config file: /etc/httpd/conf/site1/ssi
Processing config file: /etc/httpd/conf/site1/weblogs
Processing config file: /etc/httpd/conf/virtual/site10
..............................
Processing config directory: /etc/httpd/conf/site99
Processing config file: /etc/httpd/conf/site99/frontpage
Processing config file: /etc/httpd/conf/site99/sqmail
Processing config file: /etc/httpd/conf/site99/weblogs
Program exited with code 01.
I can't get a core file.
I didn't get any message at gdb prompt. May be I am doing something wrong.Please advise.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 10:00:02 2025 UTC |
Warning: fsockopen() [function.fsockopen]: php_hostconnect: connect failed in /home/xxxxxxxxx/include/EnomInterface_inc.php on line 140 Warning: fsockopen() [function.fsockopen]: unable to connect to resellertest.enom.com:80 in /home/xxxxxxxxx/include/EnomInterface_inc.php on line 140 Fatal error: Call to undefined function: strerror() in /home/xxxxxxxxx/include/EnomInterface_inc.php on line 142 Line 140+ $address = gethostbyname( $host ); // Create a TCP/IP socket. $socket = fsockopen($host,80); if ( !$socket ) { $this->AddError( "socket() failed: " . strerror( $socket ) );I have a similar problem using php 4.4.1 with pfsockopen Part of code: ------------------ <?php $fp = pfsockopen("ssl://example.com", 443, $errno, $errstr); if (!$fp){ echo "$errstr ($errno)<br>\n"; exit; } ?> Output: ------------------ Operation now in progress (115) Modules: ------------------ './configure' '--with-gd' '--with-msql=/usr/local/msql2.0' '--with-mysql=/usr/local/mysql' '--with-apache=../apache_1.3.34' '--with-jpeg-dir=/usr/lib' '--with-png-dir=/usr/lib' '--with-mhash' '--with-openssl=/usr/local/ssl' '--enable-ftp' '--enable-imap' '--with-zlib-dir=/usr/local/lib' '--with-pear' '--with-curl=/usr/local/lib' '--with-pear=../PEAR-1.1' '--enable-mbstring=all' '--with-dom=/usr/local' '--with-domxml=/usr/local' '--enable-memory-limit=yes' '--enable-sockets' '--with-gd-native-ttf' '--enable-gd-imgstrttf' '--with-freetype-dir=/usr/local' '--enable-shared' '--with-expat-dir=/usr/local' '--with-dom-xslt=/usr/local' '--with-xslt-sablot' Additional info -------------------- I have it working on another domain and server with php 4.3.4I'm getting the same "Operation now in progress (115)" w/ PHP 4.4.2 configured with: './configure' '--with-mysql=/usr' '--with-apxs2=/usr/local/bin/apxs' '--enable-mbstring' and using Apache 2.0.59 on RHEL 4 and using this script: <?php $fp = fsockopen ("localhost", 80, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br>\n"; } fclose ($fp); ?> What I have been able to figure out is that if I have less that ~500 virtual domains in the httpd.conf file, the problem goes away. If I have more, the problem comes back. Am I hitting some kind of resource limit?