|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-04-23 19:48 UTC] alejosimon at gmail dot com
Description: ------------ When I request via file_get_contents this URL: $url = 'https://wswhomo.afip.gov.ar/wsfe/service.asmx?wsdl' ; the response is empty, without errors. but some other URLs work ok. BUT BUT this bug ONLY is present over Windows 64btis AND PHP_x64 build... In linux and in both cases, Windows 32bits and/or PHP x32 always ok! THE PROBLEM is only on PHP win64 versions. Test script: --------------- <?php error_reporting( E_ALL ); ini_set( "display_errors", 1 ); $url = 'https://wswhomo.afip.gov.ar/wsfe/service.asmx?wsdl' ; //$url = 'https://www.google.com.ar' ; $response = file_get_contents( $url ); //print_r( $response ); // string empty print_r( $http_response_header ); // array() empty ?> Expected result: ---------------- Array ( [0] => HTTP/1.1 200 OK [1] => Connection: close [2] => Date: Sat, 23 Apr 2016 19:43:24 GMT [3] => Server: Microsoft-IIS/6.0 [4] => MicrosoftOfficeWebServer: 5.0_Pub [5] => X-Powered-By: ASP.NET [6] => X-AspNet-Version: 2.0.50727 [7] => Cache-Control: private, max-age=0 [8] => Content-Type: text/xml; charset=utf-8 [9] => Content-Length: 24646 ) // This result from PHP win32. Actual result: -------------- Array( ) // This result from PHP win64. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 07:00:02 2025 UTC |
@ab, Sorry, but we still have the error :( My test into TLSv1.0 context. <?php error_reporting(E_ALL); ini_set("display_errors", 1); $context = stream_context_create( array( 'ssl' => array( 'protocol_version' => 'tls1', ), )); $url = 'https://wswhomo.afip.gov.ar/wsfe/service.asmx?wsdl' ; // FAIL!!! //$url = 'https://wsaahomo.afip.gov.ar/ws/services/LoginCms?wsdl' ; // OK //$url = 'https://servicios1.afip.gov.ar/wsfe/service.asmx?wsdl' ; // OK //$url = 'https://www.google.com.ar' ; // OK $response = file_get_contents( $url, false, $context ); print_r( $http_response_header ); ?> Result in php 7.0.5 win64: Array( ) -------------------------- Result in php 5.6.20 win32: Array ( [0] => HTTP/1.1 200 OK [1] => Connection: close [2] => Date: Mon, 25 Apr 2016 12:51:29 GMT [3] => Server: Microsoft-IIS/6.0 [4] => MicrosoftOfficeWebServer: 5.0_Pub [5] => X-Powered-By: ASP.NET [6] => X-AspNet-Version: 2.0.50727 [7] => Cache-Control: private, max-age=0 [8] => Content-Type: text/xml; charset=utf-8 [9] => Content-Length: 24646 ) Thanks!Hahahaaaaa, sorry for my stupidity ... now it works !!!!!! You were right! THANK YOU VERY MUCH!!! ...but why that difference between x64 and x32 ??? Now results in all versions of PHP: Array ( [0] => HTTP/1.1 200 OK [1] => Connection: close [2] => Date: Mon, 25 Apr 2016 13:30:01 GMT [3] => Server: Microsoft-IIS/6.0 [4] => MicrosoftOfficeWebServer: 5.0_Pub [5] => X-Powered-By: ASP.NET [6] => X-AspNet-Version: 2.0.50727 [7] => Cache-Control: private, max-age=0 [8] => Content-Type: text/xml; charset=utf-8 [9] => Content-Length: 24646 ) THANKS 2