[php-src] Issue #8484: Call to undefined function posix_getpwuid()

From: Date: Tue, 03 May 2022 04:53:50 +0000
Subject: [php-src] Issue #8484: Call to undefined function posix_getpwuid()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241384@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8484 Author: per-funke ### Description **The following code:** $uinfo = posix_getpwuid(posix_getuid()); <?php ``` **Resulted in this output:** PHP Fatal error: Uncaught Error: Call to undefined function posix_getpwuid() in /.../keepalive.php:21 Stack trace: #0 {main} thrown in /home/xhosa/tools/scripts/keepalive.php on line 21``` ``` **But I expected this output instead:** an array of information about the user referenced by the given user ID. Running this in https://3v4l.org/Wq7JS#v7.4.13: <?php $uinfo = posix_getpwuid(posix_getuid()); echo $uinfo["name"]; ?> Result: Output for 7.4.13 | released 2020-11-26 | took 8 ms, 16.49 MiB Notice: Trying to access array offset on value of type bool in /in/Wq7JS on line 4 I suspect "value of type bool " is "false". Can't find any fitting and current bug reports, it may indicate myself as a being the problem. Still... I'm stuck. all comments appreciated by Per Funke ``` ### PHP Version PHP 7.4.3 (cli) (built: Mar 2 2022 15:36:52) ( NTS ) ### Operating System Ubuntu 20.04.4 LTS

« previous php.bugs (#241384) next »