From: scott at abcoa dot com Operating system: AIX 4.3.3 PHP version: 4.3.4 PHP Bug Type: Sockets related Bug description: fsockopen() failed with "Addr family not supported by protocol" error
Description: ------------ I had no trouble with the fsockopen() until I upgraded to PHP 4.3.4. My last working version was 4.2.3 before the upgrade. It sure look like a fsockopen() issue. Enclosed below is the source code that produce the same error result with both the Apache/Browser and the Shell Environment. I tried variety of URL Address and still get the same result, like www.google.com, www.cnn.com, www.php.net, etc... Been trying different ways with the scripts, machine and network and yet get the same result. I tried with and without the "tcp:\\" and still get the same result. (One more thing, could error 66 meant 6 with an one digit, not two??) Reproduce code: --------------- <? //fsockopen("tcp:\\www.google.com",80,$errno,$errstr,30); fsockopen("www.google.com",80,$errno,$errstr,30); echo "\n\n"; echo $errno."\n\n"; echo $errstr."\n\n"; ?> Expected result: ---------------- Should expect to see an successful connection to www.google.com Actual result: -------------- Warning: fsockopen() [http://www.php.net/function.fsockopen]: php_hostconnect: connect failed in <<file path omitted by me>> on line 5 Warning: fsockopen() [http://www.php.net/function.fsockopen]: unable to connect to www.google.com:80 in <<file path omitted by me>> on line 5 66 Addr family not supported by protocol -- Edit bug report at http://bugs.php.net/?id=27509&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27509&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27509&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27509&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27509&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27509&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27509&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27509&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27509&r=support Expected behavior: http://bugs.php.net/fix.php?id=27509&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27509&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27509&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27509&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27509&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27509&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27509&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27509&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27509&r=float