I am working on a php social network that requires us to create XMPP accounts for all new members. I have a working Ejabberd server running with mod_admin_extra all working fine.
I am trying to call ejabberdctl from a php file like so:
exec('sudo /home/user/ejabberd-2.1.2/bin/ejabberdctl register test server pass 2>&1');
but i get the following error :
Failed RPC connection to the node ejabberd@localhost: nodedown
Although the same command works from the command line.
I have also added the following to /etc/sudoers :
www-data ALL= NOPASSWD: /home/webuser/ejabberd-2.1.2/bin/ejabberdctl
So what gives?