ID:               38568
 Updated by:       [EMAIL PROTECTED]
 Reported By:      pierre-marie dot mouliere at arc-intl dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Sockets related
 Operating System: HP-UX B.11.23 (Itanium IA64)
 PHP Version:      5.1.5
 New Comment:

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.





Previous Comments:
------------------------------------------------------------------------

[2006-08-23 15:04:53] pierre-marie dot mouliere at arc-intl dot com

Description:
------------
Symptom : 
When opening a socket with fsockopen() the following error occurs :
fsockopen(): unable to connect to x.x.x.net:80 (Operation now in
progress) in testsocket.php

We locate the problem in the source code     
Problem is in network.c, in 'main' directory, near line 328

Function getsockopt() returns code EINPROGRESS in 'error' field. So
function exits with ret = -1 (third line from end  here), although
EINPROGRESS is not really an error.
We have implemented the following workaround (3 lines) between /* Start
changes */ and /* End changes */ and it's fixed




Reproduce code:
---------------
----------------------------------------------------------
ok:
   if (!asynchronous) {
      /* back to blocking mode */
      RESTORE_SOCKET_BLOCKING_MODE(sockfd, orig_flags);
   }
/* Start changes */
   if (error == EINPROGRESS) {
       error = 0;
   }
/* End changes */
   if (error_code) {
      *error_code = error;
   }
   if (error && error_string) {
     *error_string = php_socket_strerror(error, NULL, 0);
     ret = -1;
   }
   return ret;
----------------------------------------------------------

            




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38568&edit=1

Reply via email to