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

Hello, 
It's difficult to give more information. 
The php source code to test is 
<?php
  $sk = fsockopen("dev2.emea.dmai.net",80);
  echo "socket = " . $sk;
?>
May be the problem in only on HPUX. We found a solution to fixed it.
It's running and for us it's OK now. But we prefer to include our
sources change of network.c in the global release. If not, we need to
change source code at each releases. 
Best regards
Pierre Marie MOULIERE


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

[2006-08-23 15:50:10] [EMAIL PROTECTED]

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.




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

[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