No mysqli under Ubuntu 20.04

Klug

New Member
#1
Hello.

I've setup a brand new VM running Ubuntu 20.04.
Then OpenLiteSpeed, then lsphp74, then a virtual host with su_exec (using the official documentation).

First of all, there's not lsphp74-mysqlnd (or mysql-nd) for this OS. I've understood this is normal but still feels strange.

phpinfo() (in the vHost of course) says:
Code:
mysqlnd
mysqlnd    enabled
Version     mysqlnd 7.4.20
Compression     supported
core SSL     supported
extended SSL     supported
Command buffer size     4096
Read buffer size     32768
Read timeout     86400
Collecting statistics     Yes
Collecting memory statistics     No
Tracing     n/a
Loaded plugins     mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password,auth_plugin_caching_sha2_password,auth_plugin_sha256_password
API Extensions     no value
I tried a code snippet:
Code:
<?php
var_dump (function_exists('mysqli_connect'));
?>
The result is "bool(false)" and it shows up an error in the log:
Code:
2021-06-27 21:23:11.321556 [NOTICE] [128202] [178.39.189.188:52368:HTTP2-17#vHostName] [STDERR] PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_report() in /home/userdir/web/_test_mysqli.php:8
Stack trace:
#0 {main}
  thrown in /home/userdir/web/_test_mysqli.php on line 8
I must be missing something obvious. But what?
 

Klug

New Member
#4
I did install lsphp74-mysql, of course. But no mysqli with it.

Here's the complete list of the package installed:
Code:
lsphp73-apcu/focal,now 5.1.18-1+focal amd64 [installed]
lsphp73-common/focal,now 7.3.28-2+focal all [installed,automatic]
lsphp73-curl/focal,now 7.3.28-2+focal amd64 [installed]
lsphp73-dbg/focal,now 7.3.28-2+focal amd64 [installed]
lsphp73-dev/focal,now 7.3.28-2+focal amd64 [installed]
lsphp73-igbinary/focal,now 3.1.2-1+focal amd64 [installed]
lsphp73-imagick/focal,now 3.4.4-1+focal amd64 [installed]
lsphp73-imap/focal,now 7.3.28-2+focal amd64 [installed,automatic]
lsphp73-json/focal,now 7.3.28-2+focal amd64 [installed]
lsphp73-memcached/focal,now 3.1.5-1+focal amd64 [installed]
lsphp73-msgpack/focal,now 2.1.0-1+focal amd64 [installed]
lsphp73-mysql/focal,now 7.3.28-2+focal amd64 [installed,automatic]
lsphp73-opcache/focal,now 7.3.28-2+focal amd64 [installed,automatic]
lsphp73-redis/focal,now 5.2.2-1+focal amd64 [installed]
lsphp73/focal,now 7.3.28-2+focal amd64 [installed,automatic]
lsphp74-apcu/focal,now 5.1.18-1+focal amd64 [installed]
lsphp74-common/focal,now 7.4.20-1+focal all [installed]
lsphp74-curl/focal,now 7.4.20-1+focal amd64 [installed]
lsphp74-dbg/focal,now 7.4.20-1+focal amd64 [installed]
lsphp74-dev/focal,now 7.4.20-1+focal amd64 [installed]
lsphp74-igbinary/focal,now 3.1.2-1+focal amd64 [installed,automatic]
lsphp74-imagick/focal,now 3.4.4-1+focal amd64 [installed]
lsphp74-imap/focal,now 7.4.20-1+focal amd64 [installed]
lsphp74-json/focal,now 7.4.20-1+focal amd64 [installed]
lsphp74-memcached/focal,now 3.1.5-1+focal amd64 [installed]
lsphp74-msgpack/focal,now 2.1.0-1+focal amd64 [installed,automatic]
lsphp74-mysql/focal,now 7.4.20-1+focal amd64 [installed]
lsphp74-opcache/focal,now 7.4.20-1+focal amd64 [installed]
lsphp74-redis/focal,now 5.2.2-1+focal amd64 [installed]
lsphp74/focal,now 7.4.20-1+focal amd64 [installed]
phpinfo() with lsphp74 doesn't show/know mysqli.
phpinfo() with lsphp73 does show/know mysqli (and it works with the apps).
 

Cold-Egg

Administrator
#6
Just did a quick test, it's included in the lsphpxx-mysql.
Since OpenLiteSpeed comes with php detached mode by default, you need to restart PHP with command killall -9 lsphp to make settings take effect immediately.
 
Top