Bug #76856 [NEW]: When i called stream_socket_client gives error message of

From: Date: Mon, 10 Sep 2018 12:51:31 +0000
Subject: Bug #76856 [NEW]: When i called stream_socket_client gives error message of
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216958@lists.php.net to get a copy of this message
From: sushil dot adsare at konnet dot co dot in Operating system: windows 10 PHP version: 5.6.37 Package: Streams related Bug Type: Bug Bug description:When i called stream_socket_client gives error message of Description: ------------ --- From manual page: http://www.php.net/function.stream-socket-client --- $socket = stream_socket_client($client,$errorno, $errorstr, $timeout); Comment Code Just for U r info //$socket = stream_socket_client('tcp://127.0.0.1:7014',$errorno, $errorstr, $timeout); echo($errorstr." errorstr!!!\n"); /* Set the timeout */ stream_set_timeout($socket, $timeout); /* Send the command */ if(!fwrite($socket, $snd_msg)) { echo($client." Error while writing!!!\n"); } if (!($rcv_msg = fread($socket, 1024))) { echo($client." Error while reading!!!\n"); } else { } errorstr echo print error Message - no connection could be made because the target machine actively refused it and also give another error in html format on cmd <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>IIS 10.0 Detailed Error - 405.0 - Method Not Allowed</title> </head> <body> <div id="content"> <div class="content-container"> <h3>HTTP Error 405.0 - Method Not Allowed</h3> <h4>The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.</h4> </div> <div class="content-container"> <fieldset><h4>Most likely causes:</h4> <ul> <li>The request sent to the Web server used an HTTP verb that is not allowed by the module configured to handle the request.</li> <li>A request was sent to the server that contained an invalid HTTP verb.</li> <li>The request is for static content and contains an HTTP verb other than GET or HEAD.</li> <li>A request was sent to a virtual dire ctory using the HTTP verb POST and the default document is a static file that does not support HTTP verbs other than GET or HEAD.</li> </ul> </fieldset> </div> <div class="content-container"> <fieldset><h4>Things you can try:</h4> <ul> <li>Verify the list of verbs enabled for the module handler this request was sent to, and ensure that this verb should be allowed for the Web site.</li> <li>Check the IIS log file to see which verb is not allowed for the requ est.</li> <li>Create a tracing rule to track failed requests for this HTTP status code. For more information about creating a tracing rule for failed requests, click <a href="http://go.microsoft.com/fwlink/?LinkID=66439">here</a>. </l i> </ul> </fieldset> </div> <div class="content-container"> <fieldset><h4>Detailed Error Information:</h4> <div id="details-left"> <table border="0" cellpadding="0" cellspacing="0"> <tr class="alt"><th>Module</th><td>&nbsp;&nbsp;&nbsp;StaticFileModule</td></tr> <tr><th>Notification</th><td>&nbsp;&nbsp;&nbsp;ExecuteRequestHandler</td></tr> <tr class="alt"><th>Handler</th><td>&nbsp;&nbsp;&nbsp;StaticFile</td></tr> <tr><th>Error Code</th><td>&nbsp;&nbsp;&nbsp;0x80070001</td></tr> </table> </div> <div id="details-right"> <table border="0" cellpadding="0" cellspacing="0"> <tr class="alt"><th>Requested URL</th><td>&nbsp;&nbsp;&nbsp;http://localhost:80/iisstart.htm</td></tr> <tr><th>Physical Path</th><td>&nbsp;&nbsp;&nbsp;C:\inetpub\wwwroot\iisstart.htm</td></tr> <tr class="alt"><th>Logon Method</th><td>&nbsp;&nbsp;&nbsp;Anonymous</td></tr> <tr><th>Logon User</th><td>&nbsp;&nbsp;&nbsp;Anonymous</td></tr> </table> <div class="clear"></div> </div> </fieldset> </div> <div class="content-container"> <fieldset><h4>More Information:</h4> This error means that the request sent to the Web server contained an HTTP verb that is not allowed by the configured module handler for the request. <p><a href="http://go.microsoft.com/fwlink/?LinkID=62293&amp;IIS70Error=405,0,0x80070001,14393">View more information &raquo;</a></p> </fieldset> </div> </div> </body> </html> I just send data send info though socket. this code is working previously but after system update it shows error. i know it may be any permission issue but i don't understand. i tries some 1 add all feature in iis 10 2 add http handler mapping(verbs)in my server website which is host on iis 10 Test script: --------------- function send_anx_app_msg($client) { $rcv_msg = ""; $timeout = 10; $snd_msg = "STATUS_MONITOR"; $socket = stream_socket_client($client,$errorno, $errorstr, $timeout); //$socket = stream_socket_client('tcp://127.0.0.1:7014',$errorno, $errorstr, $timeout); echo($errorstr." errorstr!!!\n"); /* Set the timeout */ stream_set_timeout($socket, $timeout); /* Send the command */ if(!fwrite($socket, $snd_msg)) { echo($client." Error while writing!!!\n"); } if (!($rcv_msg = fread($socket, 1024))) { echo($client." Error while reading!!!\n"); } else { } fclose($socket); return $rcv_msg; } Expected result: ---------------- it just connect and send on socket -- Edit bug report at https://bugs.php.net/bug.php?id=76856&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76856&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76856&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76856&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76856&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76856&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76856&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76856&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76856&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76856&r=support Expected behavior: https://bugs.php.net/fix.php?id=76856&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76856&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76856&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76856&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76856&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76856&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76856&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76856&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76856&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76856&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76856&r=mysqlcfg

« previous php.bugs (#216958) next »