Bug #76251 [NEW]: get_headers halt without any warning on unresolved hosts
| From: | i dot s dot azizy at gmail dot com | Date: | Mon, 23 Apr 2018 04:58:08 +0000 |
| Subject: | Bug #76251 [NEW]: get_headers halt without any warning on unresolved hosts | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-214836@lists.php.net to get a copy of this message | ||
From: i dot s dot azizy at gmail dot com
Operating system: Linux workspace25 2.6.32-696.1.1
PHP version: 5.6Git-2018-04-23 (Git)
Package: HTTP related
Bug Type: Bug
Bug description:get_headers halt without any warning on unresolved hosts
Description:
------------
when you call get_headers function with unresolved url (url has dns and
ip but is not responding) within script codes running script will be
finished without any warning after a short timeout less that one
minutes. there is not any warning or return value! running it alone did
not raise this error.
pay attention : url must has valid dns ip but has not any response to
requests like http://www.sport.ir
Test script:
---------------
ini_set("max_execution_time", "0");
ini_set("max_input_time", "0");
set_time_limit(0);
// TEST ZONE START
error_reporting(E_ALL);
var_dump(get_headers('http://www.sport.ir'));
echo 'finished';
die;
// TEST ZONE END
Expected result:
----------------
<br />
<b>Warning</b>: get_headers(): php_network_getaddresses: getaddrinfo
failed: Name or service not known in <b>[SCRIPT-PATH]/[SCRIPT-NAME]</b>
on line <b>7</b><br />
<br />
<b>Warning</b>: get_headers(http://www.sport.ir): failed to open
stream: php_network_getaddresses: getaddrinfo failed: Name or service
not known in <b>[SCRIPT-PATH]/[SCRIPT-NAME]</b> on line <b>7</b><br />
bool(false)
finished
--
Edit bug report at https://bugs.php.net/bug.php?id=76251&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76251&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76251&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76251&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76251&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76251&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76251&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76251&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76251&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76251&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76251&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76251&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76251&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76251&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76251&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76251&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76251&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76251&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76251&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76251&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76251&r=mysqlcfg