Bug #72088 [NEW]: file_get_contents() return empty in some urls
| From: | alejosimon at gmail dot com | Date: | Sat, 23 Apr 2016 19:48:58 +0000 |
| Subject: | Bug #72088 [NEW]: file_get_contents() return empty in some urls | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-200721@lists.php.net to get a copy of this message | ||
From: alejosimon at gmail dot com
Operating system: Windows 7 x64
PHP version: 7.0.5
Package: HTTP related
Bug Type: Bug
Bug description:file_get_contents() return empty in some urls
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.
--
Edit bug report at https://bugs.php.net/bug.php?id=72088&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72088&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72088&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72088&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=72088&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=72088&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=72088&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=72088&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=72088&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=72088&r=support
Expected behavior: https://bugs.php.net/fix.php?id=72088&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=72088&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=72088&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=72088&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72088&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=72088&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=72088&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=72088&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=72088&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=72088&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=72088&r=mysqlcfg