Thanks Livin Free...
Here's another one... Why is it that I always get the error message "Error: Can't open display:" in my mail whenever I execute or try to call an xterm command using cron to activate the command. What did I miss? Thanks in advance UNIX gurus... (3 Replies)
I'm currently looking into ways to integrate the Telegram API into the forums:
Telegram Bots - Bot Code Examples
I'm thinking, first off, to use the Telegram API to get forum alerts and notifications (to Bot or Not?).
Second, I thinking of ways to more deeply integrate Telegram into the... (5 Replies)
I have added a new experimental "Computer Science and Mathematics Trivia - True or False" section in the discussions, currently under the tags box.
In the future, I plan to
Expand this feature to add more trivia categories from math, science and technology.
Keep track of correct and... (20 Replies)
The UNIX and Linux Forums now has over 1000 TRUE / FALSE computer science and computer related trivia question in our database. These questions are of relatively high quality (compared to similar sites on the web) and are fun (according to feedback by users). In the first week during the... (1 Reply)
Thanks to Akshay, who helped me write the core MySQL queries, we now have two new draft leaderboards, by (1) member and by (2) country:
https://www.unix.com/trivia_stats.php
Currently milhan leads the members with a high score of 90%:
... (3 Replies)
Only a few days after I coded this new feature from scratch, we are seeing over 3000 entries in the database from members (mostly guests) playing CS trivia.
I have spend a lot of time coding this (from scratch) and testing the API. From the logs, it seems to have an API bug which appears... (31 Replies)
Today marks another milestone in the computer trivia app:
100,000 Computer Trivia Questions Answered by Users
Some notes to mention at this milestone:
vbe leads the "best score" category with 320 questions answered for an overall score of 91.2%.
rdrtx leads "most questions answered"... (0 Replies)
I have just completed the first phase of integrating all these devices and technologies:
MQTT, Node-RED, Linux, Apache2, MySQL, PHP, Telegram, ESP32, ESP8266, and the Arduino Uno
The glue that binds all this together is MQTT. In fact, MQTT makes this kind of integration nearly trivial to... (1 Reply)
Just noticed that our successful computer trivia feature (stats here) has surpassed over 50,000 questions answered by users:
https://www.unix.com/trivia_stats.php
This was a coding effort worth while and I'm pleased to see so many people enjoying it in such a short time since it was released... (3 Replies)
Discussion started by: Neo
3 Replies
LEARN ABOUT PHP
mysqlnd_uh_set_connection_proxy
MYSQLND_UH_SET_CONNECTION_PROXY(3) 1 MYSQLND_UH_SET_CONNECTION_PROXY(3)mysqlnd_uh_set_connection_proxy - Installs a proxy for mysqlnd connectionsSYNOPSIS
bool mysqlnd_uh_set_connection_proxy (MysqlndUhConnection &$connection_proxy, [mysqli &$mysqli_connection])
DESCRIPTION
Installs a proxy object to hook mysqlnd's connection objects methods. Once installed, the proxy will be used for all MySQL connections
opened with mysqli, mysql or PDO_MYSQL, assuming that the listed extensions are compiled to use the mysqlnd library.
The function can be disabled with mysqlnd_uh.enable. If mysqlnd_uh.enable is set to FALSE the function will not install the proxy and
always return TRUE. Additionally, an error of the type E_WARNING may be emitted. The error message may read like PHP Warning:
mysqlnd_uh_set_connection_proxy(): (Mysqlnd User Handler) The plugin has been disabled by setting the configuration parameter
mysqlnd_uh.enable = false. The proxy has not been installed [...].
PARAMETERS
o $connection_proxy
- A proxy object of type MysqlndUhConnection.
o $mysqli_connection
- Object of type mysqli. If given, the proxy will be set for this particular connection only.
RETURN VALUES
Returns TRUE on success. Otherwise, returns FALSE
EXAMPLES
Example #1
mysqlnd_uh_set_connection_proxy(3) example
<?php
$mysqli = new mysqli("localhost", "root", "", "test");
$mysqli->query("SELECT 'No proxy installed, yet'");
class proxy extends MysqlndUhConnection {
public function query($res, $query) {
printf("%s(%s)
", __METHOD__, var_export(func_get_args(), true));
$ret = parent::query($res, $query);
printf("%s returns %s
", __METHOD__, var_export($ret, true));
return $ret;
}
}
mysqlnd_uh_set_connection_proxy(new proxy());
$mysqli->query("SELECT 'mysqlnd rocks!'");
$mysql = mysql_connect("localhost", "root", "", "test");
mysql_query("SELECT 'Ahoy Andrey!'", $mysql);
$pdo = new PDO("mysql:host=localhost;dbname=test", "root", "");
$pdo->query("SELECT 'Moin Johannes!'");
?>
The above example will output:
proxy::query(array (
0 => NULL,
1 => 'SELECT 'mysqlnd rocks!'',
))
proxy::query returns true
proxy::query(array (
0 => NULL,
1 => 'SELECT 'Ahoy Andrey!'',
))
proxy::query returns true
proxy::query(array (
0 => NULL,
1 => 'SELECT 'Moin Johannes!'',
))
proxy::query returns true
SEE ALSO mysqlnd_uh_set_statement_proxy(3), mysqlnd_uh.enable.
PHP Documentation Group MYSQLND_UH_SET_CONNECTION_PROXY(3)