Proposing MySQLnd Userland Handler
[email protected] (David Soria Parra)
| Newsgroups | php.pecl.dev |
|---|---|
| Message-ID | <[email protected]> |
Hi DevML,
I would like to propose the pecl extension "MySQLnd Userland Handler" (mysqlnd_uh).
The plugin let you hook a mysqli connection if you use mysqlnd and install a userland proxy class
for every call. This allows you to write SQL monitoring tools in PHP Userland. It works with PHP 5.3.0
and a first version will be marked as 0.1.0 alpha.
The code can be found at: http://patches.experimentalworks.net/mysqlnd_uh.tar.bz2
A short example:
<?php
/* print every mysqlnd query to stdout */
class Proxy extends MySQLndUHConnection {
public function query ($res, $query) {
fprintf(STDERR, "Query: " . $query);
}
}
mysqlnd_uh_set_connection_proxy(new Proxy());
?>
If there are no objections I'll import the project to the pecl SVN and create a package.
Greetings
David