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
1
vote
1 answer

Is mysqlnd necessary for SQLi parameterised queries in PHP?

I have read up how parameterised queries are the way forwards regarding prevention of SQL injection, however to my surprise it seems more complicated to implement than I had imagined. I have attempted a simple SELECT statement using mysqli in PHP…
1
vote
1 answer

Possible reasons for "mysql server has gone away" error (php 5.4, mysqlnd)

We recently upgraded one of our webservers from PHP 5.3 (Debian Squeeze package, using libmysqlclient and APC) to PHP 5.4 (Debian Wheezy, Dotdeb package, using mysqlnd, Opcache and APCu). After working fine for almost one day, we experienced "mysql…
ak2
  • 457
  • 1
  • 5
  • 17
1
vote
0 answers

PhP is mysqlnd installed?

I use queries similar to this all throughout my app: $stmt = $connection->stmt_init(); $sql = "SELECT * FROM table"; $stmt->prepare($sql); $stmt->execute(); $results = $stmt->get_results(); When I went to test some on my live server, it appears…
Vigs
  • 1,286
  • 3
  • 13
  • 30
1
vote
3 answers

Problems with mysqli, mysqlnd and PHP v5.4. Would PDO be better?

In my efforts to update my code from using mysql_*, I have run into a whole heap of pain. I decided to change my code using mysqli, first in the procedural style. After learning a bit more, I decided that actually the object-oriented style was…
Whitenoise
  • 115
  • 1
  • 3
  • 10
1
vote
3 answers

Will installing mysqlnd break existing code in PHP which uses mysql?

I'm moving my code from using mysql in PHP to mysqli. In order to get the mysqli get_result() function to work I need to install mysqlnd as said here on SO. This involves removing the existing php-mysql extension, and now I just want to make sure…
Nikola
  • 14,888
  • 21
  • 101
  • 165
1
vote
1 answer

PDO MySQL crashes apache on statement execute

I'm using PHP 5.4.4 and MySQL 5.5.31 on Debian 6. I have the following code: file_put_contents("dump.log", $check_username); // To ensure the variable is set, which it is $database->query('SELECT * FROM users WHERE username = :username',…
3ventic
  • 1,023
  • 1
  • 20
  • 32
1
vote
1 answer

Query method doesn't work - missing mysqlnd driver

My query class isn't working on a clients new server because their server is missing the mysqlnd driver. How would I convert the method to not use mysqlnd and also not screw up all their classes? function query($query, $params=NULL) { …
steeped
  • 2,613
  • 5
  • 27
  • 43
1
vote
2 answers

Error compiling mysqlnd_qc with apc

Running the command pecl install mysqlnd_qc to install the caching with APC enabled I receive the following error: configure: error: APC is onlysupported if both APC and MySQL Query Cache are compiled statically ERROR: `/var/tmp/mysqlnd_qc/configure…
SimonW
  • 6,175
  • 4
  • 33
  • 39
0
votes
2 answers

Troubles Completing the 'pdo_mysql' Installation on PHP 8

I'm running php 8 on Linux Mint and have installed it by compiling the source code (a first for me). I've also had success compiling and installing several php extensions. However, i'm having trouble installing the "pdo_mysql" extension. I've…
0
votes
0 answers

How to determine mysqlnd version for PHP (for usage of iconv())?

I am totally confused regarding versions and I am not an expert for PHP/MySQL combinations. Some Background Having two systems: 1. my local dev machine (Ubuntu 20), 2. the production server (CentOS 7). It seems like the production server uses (info…
BairDev
  • 2,865
  • 4
  • 27
  • 50
0
votes
1 answer

MySQLnd gone missing? How can I work with host provider?

I have a couple of PHP8 projects running on shared hosting which use mysql features like get_result(). Overnight everything has stopped working and get_result() is now reported as an undefined function. As per Call to undefined method…
Spacey
  • 153
  • 1
  • 7
0
votes
1 answer

Updating DB table when Mysqli result is cached

On my website there are already many visits daily, so I am thinking about providing the Mysqli Db results from cache. I am trying it like this: $res = $mysqli->query("/*" . MYSQLND_QC_ENABLE_SWITCH . "*/" . "SELECT * FROM mytable WHERE id =…
Darksymphony
  • 2,155
  • 30
  • 54
0
votes
0 answers

mysqli_fetch_all raising undefined function error in PHP 7.3

I'm trying to get my website working publicly (my host is Namecheap), but I'm having some trouble with my sign-in-page. After I submit my log-in-form 500 Internal Server Error appears. I checked my error logs and found the following error: PHP Fatal…
Juho Pesonen
  • 105
  • 1
  • 2
  • 9
0
votes
0 answers

Install mysqlnd_memcache on Ubuntu for pre-installed innodb_memcache plugin

I have issue with installing "mysqlnd memcache" plugin (mysqlnd_memcache.so) to use with InnoDB Memcached Daemon (having its "/usr/lib/mysql/plugin/libmemcached.so") on Ubuntu (Bionic) 18.0.4. The problem is that the official installation…
Fakhar Anwar
  • 295
  • 1
  • 3
  • 20
0
votes
1 answer

alternative to mysql_nd functions

I moved my php code to a new hosting which missing mysql_nd and a have more than 150 functions that use stmt->get_result() and fetch_assoc. Is there a function that can do the same work of stmt->get_result() and fetch_assoc and give the exact…
Christian
  • 164
  • 1
  • 10
1 2 3
8 9