Authenticate Against MySQL with PHP

Name: check_mysql_php
Purpose: External authentication script for MySQL, written in PHP
Author: LISSY Alexandre (Lissyx)
Type: Program
Requirements: ejabberd 1.0.0
Download: check_mysql.php.txt

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Error in log file

If you're seeing the following error after using the script above...

extauth script has exitted abruptly with reason 'normal'

You could be using a newer version of php. i.e. php > 5.4 in which case the following command in the script above is deprecated.

@define_syslog_variables();

Make sure to remove or comment that line out.

External authentication with php and mysql not working

I am starting with Ejabberd. And my connection and authentication and chat work correctly when authentication was internal
. But when I edit ejabberd.cfg to work with external authentication script then meet error:

- Config file:
%%{auth_method, internal}.
{auth_method, external}.
{extauth_program, "/etc/ejabberd/my_auth.php"}.

- Error report: C(<0.6790.0>:extauth:146) : extauth script has exitted abruptly with reason 'normal'
This error loop until the server stop.

I grant full permission to /etc/ejabberd/my_auth.php and run with php command, not error.

Please help me!
Thanks in Advance..

Same problem with eJabberd 16.01 in Ubuntu 16.04

When I am trying to login in admin area I get this :

2016-07-26 18:41:39.550 [error] <0.10430.0>@extauth:loop:131 extauth call '[<<"auth">>,<<"admin">>,<<"localhost">>,<<"test">>]' didn't receive response
2016-07-26 18:41:39.550 [error] <0.10106.0>@ejabberd_auth:is_user_exists:316 The authentication module ejabberd_auth_external returned an error
when checking user <<"admin">> in server <<"localhost">>
Error message: badarg
2016-07-26 18:41:39.550 [warning] <0.10106.0>@ejabberd_web_admin:process:239 Access of <<"admin@localhost">> from <<"x.x.x.x">> failed with error: <<"inexistent-account">>

Im using this https://github.com/cburschka/ejabberd-auth-php. Any idea? The tests give me all ok, the log file doesnt show nothing when ejabberd make the extauth call. My configuration is:

auth_method: external
extauth_program: "/etc/ejabberd/extauth/main.php"

I also check the permissions, all seems correct, with chmod 777 file and chown ejabberd:ejabberd I get the same. I dont know what to do more. With su ejabberd the php file executes correctly

SOLVED: I installed eJabberd from .deb in /opt, running ejabberdctl live I discover that the libssl from /opt/ejabberd/lib/linux*/libssl.1.0.0 wasn't update to the openssl 1.0.2 (last required for PHP 7.0). I download last libssl.deb and I extracted in the lib eJabberd directory. Now is working correctly

Syndicate content