ID: 31923 User updated by: mike-bugs dot php dot net at webheat dot co dot uk Reported By: mike-bugs dot php dot net at webheat dot co dot uk Status: Bogus Bug Type: Filesystem function related Operating System: Linux PHP Version: 4.3.10 New Comment:
Thank you Pollita. That's a lot clearer. Do you have any suggestions for a work around for this issue? Previous Comments: ------------------------------------------------------------------------ [2005-02-12 17:52:10] [EMAIL PROTECTED] "gethostbyname() (Used by the network streams code among other parts of PHP) treats this correctly according to RFC specification." I can see this statement being inobvious. I mean the gehostbyname() function defined by the host systems standard C library. You assumption that PHP's network code does not attempt to validate the hostname before passing it on to the the system for resolution. It works on some systems because on those systems the value is encoded into a DNS packet and sent to the DNS server unmangled. On other systems, a validation check is performed first and if it doesn't pass, then it doesn't bother waiting for a network round trip, instead simply returning a failure. ------------------------------------------------------------------------ [2005-02-12 17:17:11] mike-bugs dot php dot net at webheat dot co dot uk Thanks Magnus. This does explain possible behaviour but doesn't explain why 2 Windows PHP installs work fine but 2 Linux PHP installs (as installed by my hosting company) do not. This seems to imply that file_get_contents() doesn't validate the DNS compliance of the arguement. Also referring to the previously note from Pollita, as forgiving as the browser maybe the DNS servers involved in the lookup of http://mark-.deviantart.com are the ones that are dealing with this more so from what I know. The deviantart.com DNS server software also seems to be forgiving, not just of look ups of this kind but of creating new record of this kind too, as the DNS entry would have been created when the user mark- signed up his account with Deviantart.com ------------------------------------------------------------------------ [2005-02-12 06:21:56] [EMAIL PROTECTED] It should be RFC883 (page 56) not RFC833. http://www.faqs.org/rfcs/rfc883.html "The labels must follow the rules for ARPANET host names. They must start with a letter, end with a letter or digit, and have as interior characters only letters, digits, and hyphen." ------------------------------------------------------------------------ [2005-02-12 00:02:20] mike-bugs dot php dot net at webheat dot co dot uk If this is the case it does not explain why it works on two machines(installed by me)and not on two otheres (installed by my hosting company). Btw, could you post a link to the RFD you are quoting from. I searched on Google and found an RFC entitled "Who talks TCP?" Thanks ------------------------------------------------------------------------ [2005-02-11 21:36:12] [EMAIL PROTECTED] Please refer to RFC833 Appendix 1. Hyphens may not appear at the start or end of a <label>. gethostbyname() (Used by the network streams code among other parts of PHP) treats this correctly according to RFC specification. Your browser is simply more forgiving. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31923 -- Edit this bug report at http://bugs.php.net/?id=31923&edit=1