I found that this error appears rather often online but almost no one has any idea why it would come up. I found this error myself today while doing an install of FreePBX on Fedora 14. My full error was:
Checking user..PHP Fatal error: Call to undefined function posix_getpwuid() in /usr/src/freepbx-2.8.1/install_amp on line 728
This seems like it must be a permissions error. But more than likely you are simply missing the PHP Posix library. You can resolve this on Fedora with
yum -y install php-posix
Ta da!
hi,
I am facing same problem on RHEL 6 & it cannot be search on it please help me ……….
thanks very much for the information, i was looking for it since last two days….
I just updated my PBX in a Flash system, rebooted my server, and had a similar problem:
[root@pbx /]# amportal start
PHP Fatal error: Call to undefined function posix_getpwuid() in /var/lib/asterisk/bin/gen_amp_conf.php on line 3
**** WARNING: ERROR IN CONFIGURATION ****
astrundir in ‘/etc/asterisk’ is set to but the directory
does not exists. Attempting to create it with: ‘mkdir -p ‘
mkdir: missing operand
Try `mkdir –help’ for more information.
**** ERROR: COULD NOT CREATE ****
Attempt to execute ‘mkdir -p ‘ failed with an exit code of 1
You must create this directory and the try again.
I just disabled the following lines of /var/lib/asterisk/bin/gen_amp_conf.php and it works now.
// $current_user = posix_getpwuid(posix_geteuid());
// if ($current_user[‘uid’] !== 0) {
// die(‘Forbidden – must be root’);
// }
Thank You very, very much that you wanted to write this 🙂 So simple solution… And it works of course
Thanks a ton!!! Saved me so much frustration!!! I Love asterisk, but working remotely with old version of CentOS and trying to upgrade php is a pain!
Thanks, this seems to be an issue with a base LAMP install on Fedora 18 as well =/
It works, thanks for your time making the post.
Hi,
Thanks a lot, it worked perfectly for me on centos 6.5.
All the best 🙂