Req #68281 [Opn->Csd]: mariadb server with dialog auth method
Edit report at https://bugs.php.net/bug.php?id=68281&edit=1
ID: 68281
Updated by: cmb@php.net
Reported by: roberto at spadim dot com dot br
Summary: mariadb server with dialog auth method
-Status: Open
+Status: Closed
Type: Feature/Change Request
Package: MySQL related
Operating System: any
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
The MySSQL extension (ext/mysql) has been deprecated as of PHP
5.5.0 and removed as of PHP 7.0.0, so we won't implement any
feature requests anymore.
Previous Comments:
------------------------------------------------------------------------
[2014-10-22 06:33:12] roberto at spadim dot com dot br
From heidisql:
https://code.google.com/p/heidisql/source/browse/trunk/source/dbconnection.pas#671
one point... when using dialog, we can't use persistent connection, since each new connection
create a new dialog...
------------------------------------------------------------------------
[2014-10-22 06:23:05] roberto at spadim dot com dot br
Reading examples from mariadb client/server auth dialog plugin
at php side, we must include a function as callback to builtin_ask function:
MYSQL_PLUGIN_EXPORT char *mysql_authentication_dialog_ask(MYSQL *mysql, int type,const char
*prompt,char *buf, int buf_len)
and the return of this function is the 'mysql_auth_dialog_send'
in other words at php side we have:
mysql_set_callback('any_function');
mysql_connect();
if we got dialog, any_function will be called, the problem is... at what connect we are? maybe
"struct st_mysql *mysql" solve this problem, if not at least we can call a function and
php user must know what he is doing
at mysqli and pdo we could pass this callback function name as a mysqli_option or a array parameter
(pdo)
well i think that's all for now (04:22AM i didn't sleep yet, good night)
------------------------------------------------------------------------
[2014-10-22 06:13:43] roberto at spadim dot com dot br
what kinds of questions exists:
https://github.com/MariaDB/server/blob/e974b564389af8251c2ba51060e6129e45431586/include/mysql/auth_dialog_client.h
------------------------------------------------------------------------
[2014-10-22 06:12:14] roberto at spadim dot com dot br
more example from mariadb server:
https://github.com/MariaDB/server/blob/1e79138459038c39c85239a825bf1727ef43c156/client/mysql.cc#L4500
------------------------------------------------------------------------
[2014-10-22 06:08:56] roberto at spadim dot com dot br
here more info about how to use dialog and client:
https://github.com/MariaDB/server/blob/10.1/plugin/auth_dialog/dialog.c
/*
This plugin performs a dialog with the user, asking questions and
reading answers. Depending on the client it may be desirable to do it
using GUI, or console, with or without curses, or read answers
from a smartcard, for example.
To support all this variety, the dialog plugin has a callback function
>>>>>"authentication_dialog_ask"<<<<<. If the client has a
>>>>>function of this name
dialog plugin will use it for communication with the user. Otherwise
a default implementation will be used.
*/
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=68281
--
Edit this bug report at https://bugs.php.net/bug.php?id=68281&edit=1
Thread (7 messages)