ID: 16051
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Closed
Bug Type: Scripting Engine problem
Operating System: FreeBSD
PHP Version: 4.1.2
New Comment:
Has been fixes in CVS already and will be in 4.2.0
Previous Comments:
------------------------------------------------------------------------
[2002-03-13 17:06:46] [EMAIL PROTECTED]
there is a problem in the file ext/posix/posix.c in function
posix_uname, if i read the documentation about this function i can get
some informations of the utsname struct. Well under linux you can use a
machine domain name, (not yet implemented in FreeBSD). well the
'domainname' are not implemented on php but it's writed on the docs :
/* {{{ proto array posix_uname(void)
Get system name (POSIX.1, 4.4.1) */
PHP_FUNCTION(posix_uname)
{
struct utsname u;
uname(&u);
if (array_init(return_value) == FAILURE) {
RETURN_FALSE;
}
add_assoc_string(return_value, "sysname", u.sysname, 1);
add_assoc_string(return_value, "nodename", u.nodename, 1);
add_assoc_string(return_value, "release", u.release, 1);
add_assoc_string(return_value, "version", u.version, 1);
add_assoc_string(return_value, "machine", u.machine, 1);
}
/* }}} */
i'v fix it :
/* {{{ proto array posix_uname(void)
Get system name (POSIX.1, 4.4.1) */
PHP_FUNCTION(posix_uname)
{
struct utsname u;
uname(&u);
if (array_init(return_value) == FAILURE) {
RETURN_FALSE;
}
add_assoc_string(return_value, "sysname", u.sysname, 1);
add_assoc_string(return_value, "nodename", u.nodename, 1);
add_assoc_string(return_value, "release", u.release, 1);
add_assoc_string(return_value, "version", u.version, 1);
add_assoc_string(return_value, "machine", u.machine, 1);
#ifdef __USE_GNU
add_assoc_string(return_value, "domainname", u.domainname, 1);
#endif
}
/* }}} */
if you don't want to correct it, please delete the wrong information in
the documentations.
Regards,
Vergoz Michael
SYSDOOR
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16051&edit=1