php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #79619 gethostname() should mention FQDN
Submitted: 2020-05-21 19:33 UTC Modified: 2020-05-22 14:01 UTC
From: lkmorlan at uwaterloo dot ca Assigned:
Status: Re-Opened Package: *Network Functions
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-05-21 19:33 UTC] lkmorlan at uwaterloo dot ca
Description:
------------
---
From manual page: https://php.net/function.gethostname
---
The documentation does not say anything about whether the return value is a fully-qualified domain name or not; sometimes it is, sometimes it is not.

It should mention that it could return either and explain what causes it to do one or the other.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-05-21 19:57 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2020-05-21 19:57 UTC] requinix@php.net
PHP is merely reporting what your system says. There's no logic about making it fully-qualified or not.
 [2020-05-21 20:51 UTC] lkmorlan at uwaterloo dot ca
I suggest adding:

The value is the output of the system hostname command. Depending on system configuration, this will be either the fully-qualified domain name or just the local part of the name.
 [2020-05-21 22:18 UTC] requinix@php.net
-Status: Not a bug +Status: Re-Opened -Package: Documentation problem +Package: *Network Functions
 [2020-05-21 22:18 UTC] requinix@php.net
I wouldn't even mention fully-qualified - just say that it's from the system, consult your system's documentation, the usual that we do for functions like this.
 [2020-05-22 14:01 UTC] lkmorlan at uwaterloo dot ca
OK, how about:

The value is the output of the system hostname command, which will depend on system configuration. Consult your system documentation.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 00:01:41 2024 UTC