Re: PHP 4.0 Bug #8440: fopen on a url returns "success" as an error

From: Date: Sat, 30 Dec 2000 22:17:33 +0000
Subject: Re: PHP 4.0 Bug #8440: fopen on a url returns "success" as an error
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-42643@lists.php.net to get a copy of this message
On Wed, Dec 27, 2000 at 06:28:50PM -0000, david@php.net wrote: > From: david@php.net > Operating system: Debian Linux 2.2.14 > PHP version: 4.0.3pl1 > PHP Bug Type: HTTP related > Bug description: fopen on a url returns "success" as an error > > fopen("http://my-url/","r") - Success That you get success means errno was 0 (so the last systemcall didn't give any error), but something must have gone wrong anyway. It's hard to say what it is, I haven't been able to reproduce it. Are you able to debug it further? An strace of each run or maybe easier, add some print or logging statements at some strategic places. In particular right before the hostconnect call, and inside hostconnect, in particular here: if (php_network_getaddresses(host, &sal)) { add debug code here return -1; } and after the different systemcalls. Also at the different return points after hostconnect (in http_fopen_wrapper.c). Could you check if it happens when you specify IP-address in the URL? Just to see if it's resolver related. And BTW, what version of glibc are you using? Well, that's all I can think of at the moment. Stig

« previous php.dev (#42643) next »