Questions tagged [mysqlnd]

The MySQL native driver for PHP (mysqlnd) is a drop-in replacement for the MySQL Client Library (libmysql) for the PHP script language.

Because MySQL Native Driver is written as a PHP extension, it is tightly coupled to the workings of PHP.

This leads to gains in efficiency, especially when it comes to memory usage, as the driver uses the PHP memory management system. It also supports the PHP memory limit. Using MySQL Native Driver leads to comparable or better performance than using MySQL Client Library, it always ensures the most efficient use of memory. One example of the memory efficiency is the fact that when using the MySQL Client Library, each row is stored in memory twice, whereas with the MySQL Native Driver each row is only stored once in memory.

126 questions
60
votes
6 answers

How to know if MySQLnd is the active driver?

Maybe it's an obvious question, but I want to be sure. How can i know if it MySQLnd is the active driver? I'm runing PHP 5.3 and MySQL 5.1.37. In phpinfo() mysqlnd is listed but only with this I can't be sure if I'm using MySQLnd or the old…
The Disintegrator
  • 4,147
  • 9
  • 35
  • 43
49
votes
6 answers

How to enable mysqlnd for php?

I have PHP installed and running (version: 5.3.17) and I want to switch to mysqlnd (in the phpinfo mysqlnd does not exist at all). I read that in order to set it, you need to update the ./configure command: ./configure --with-mysql=mysqlnd…
SimonW
  • 6,175
  • 4
  • 33
  • 39
37
votes
6 answers

MySQLi not found dockerized php

I'm trying to dockerize my website. I've got Nginx and PHP up and running and it's working find except I can't connect to a db. When the page is loaded I get the error: Fatal error: Uncaught Error: Class 'MySQLi' not found in /private/conn.php:8…
Tom
  • 9,725
  • 3
  • 31
  • 48
24
votes
3 answers

Fatal error: Call to undefined method mysqli_result::fetch_all()

I have problems with PHP in Ubuntu 10.04. When I try use mysqli_result::fetch_all this error appears: Call to undefined method mysqli_result::fetch_all() However, it works in Windows XP. The Code: $result = $this->dbh->query('SELECT [...] '); return…
Stokres
  • 685
  • 2
  • 7
  • 12
13
votes
2 answers

Could not connect to MySQL 4.1+ using old insecure authentication

I know that there have been a lot of questions raised with the same concern as mine, but I hope you can help me find out another solution for this. We are using Symfony 2.5.10, PHP 5.4.44 and MySQL 4.1.20 for our project. Whenever I attempt to log…
user123
  • 1,060
  • 3
  • 13
  • 29
13
votes
2 answers

What the different between MySQL Native Driver and MySQL Client Library

I want to know the different between MySQL Native Driver and MySQL Client Library and when to use both of them
Robert
  • 2,342
  • 2
  • 24
  • 41
11
votes
1 answer

Mysqlnd active connections number is too big. Is this normal?

I have Windows 2003 Server. Apache 2.4.10, PHP 5.4.31 and MySQL 5.6.19 installed. There are two wordpress website running on server. In the phpinfo(); under mysqlnd section there says; active_connections 18446744073709551563 is this number normal?…
ewroman
  • 625
  • 6
  • 14
8
votes
2 answers

What is the difference between Mysqlnd, PDO and PDO_Mysql extensions in php?

They seem to be the same thing, and yet different. I don't know which one is which: I know we can use PDO as new PDO() and use prepare() and query() methods, to fetch data from database. So, if this is PDO mentioned in the extensions list, then what…
ʎɹnɔɹǝW
  • 811
  • 2
  • 8
  • 14
8
votes
1 answer

MySQLi get_result() undefined when mysqlnd is installed

I am writing a simple test script to get my head around MySQLi prepared statements. This script will become the basis for a function that needs to be slightly dynamic in its handling of results. I need the fetch method to return as an array similar…
Tanoro
  • 871
  • 2
  • 10
  • 30
8
votes
2 answers

Best way to call and "forget about" an async mysqlnd INSERT query

Setup I'm working with php and mysql in this situation. Let's say I have my mysqli connection like this: $link = new mysqli('localhost', 'root', 'password', 'A_Database'); I have installed mysqlnd to perform asynchronous mysql queries using the…
Gershom Maes
  • 7,358
  • 2
  • 35
  • 55
8
votes
5 answers

How do I make sure that values from MySQL keep their type in PHP?

I am having a problem in my PHP script where values called from MySQL are being returned as strings, despite being marked in the database as int and tinyint. This is a problem because when converting an array based on MySQL date into JSON data,…
Questioner
  • 7,133
  • 16
  • 61
  • 94
6
votes
3 answers

get_result() Doesn't Work even mysqlnd is enabled

It might be a duplication of many questions however i dont seem to get my answer from any of the questions present.I am using multi domain linux hosting provided by hostgator.I tried to use mysqli_stmt_get_result() but it throws me an error stating…
Tilak Raj
  • 1,369
  • 5
  • 31
  • 64
6
votes
2 answers

Fatal error: Call to undefined method mysqli_stmt::get_result()

Since i've moved a site of mine to a new vServer, I always get this error message Fatal error: Call to undefined method mysqli_stmt::get_result() These lines of code are working fine $mysql = new mysqli($db_host, $db_user, $db_password,…
Johannes Trümpelmann
  • 943
  • 1
  • 11
  • 25
5
votes
1 answer

DB returns string instead of int (mysqlnd for PHP-7.1 / Laravel)

A few days ago, I asked a question about a bug I found in Laravel. To fix it, I installed php5-mysqlnd on my server. Today, I upgraded my application to the latest php 7.1.*. Everything works correctly, except the bug is back again, i.e. integers in…
Jachinair
  • 272
  • 6
  • 15
5
votes
2 answers

Why PDO generates warnings when we tell it not to do it?

Problem We tell PDO to wrap each issue into exception. In some cases it generates a few warnings and only then throws exception. Why does it do it? Duplicates? There were no correct answers on SO regarding it. Last question was PHP PDO Exception +…
gaRex
  • 4,144
  • 25
  • 37
1
2 3
8 9