Bug #16879 Updated: posix_getpwuid() fails incorrectly

From: Date: Tue, 02 Jul 2002 09:48:26 +0000
Subject: Bug #16879 Updated: posix_getpwuid() fails incorrectly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12785@lists.php.net to get a copy of this message
ID: 16879 Updated by: sander@php.net Reported By: solo@n-w-t.net -Status: Open +Status: Feedback Bug Type: POSIX related Operating System: RedHat Linux 2.2.5 PHP Version: 4.0CVS-2002-04-27 New Comment: Works fine for moe. Can you try a snapshot from http://snaps.php.net ? Previous Comments: ------------------------------------------------------------------------ [2002-04-27 14:54:54] solo@n-w-t.net I am not sure that this is a bug, but for some reason, when attempting to get the file owner of a file getpwuid() fails (used in this context): $uid = fileowner($path); $owner = posix_getpwuid($uid); Fileowner() returns either 0 or 1028, and getpwuid fails. The 0 of course false would mean the file doesnt exist, but using the same variable ($path) in other functions such as fileperms() etc do not fail and return the proper data. Situation: $path = "/home/"; $uid = fileowner($path); $owner = posix_getpwuid($uid); $owner_name = $owner['name']; I have tried the same situation with valid filenames (instead of directories). all extensions are enabled and configure line is: './configure' '--target=i386-redhat-linux' '--prefix=/usr' '--with-config-file-path=/etc' '--disable-debug' '--enable-pic' '--enable-inline-optimization' '--with-apxs=/usr/sbin/apxs' '--disable-static' '--with-exec-dir=/usr/bin' '--with-regex=system' '--with-gettext' '--with-gd' '--with-jpeg-dir=/usr' '--with-png' '--with-zlib' '--with-db2' '--with-db3' '--with-gdbm' '--enable-debugger' '--enable-magic-quotes' '--enable-safe-mode' '--enable-sysvsem' '--enable-sysvshm' '--enable-track-vars' '--enable-yp' '--enable-ftp' '--without-mysql' '--with-xml' (as phpinfo() says it is) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16879&edit=1

« previous php.bugs (#12785) next »