Unable to connect to ZM DB could not find driver

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
SkippyDo
Posts: 221
Joined: Mon Nov 20, 2017 6:49 pm

Unable to connect to ZM DB could not find driver

Post by SkippyDo »

Running Debian Buster (recent, successful, upgrade from Stretch). Upgraded ZM from 1.30.4. Everything appears to be running correctly (OS, web server, mysql and ZM) except that I am unable to connect up to ZM via the web. From a web browser (run from a remote location; server is headless, so cannot really test a browser on it) I am getting: Unable to connect to ZM db.could not find driver

PHP Version => 7.3.14-1~deb10u1

Only error that I can find is in the apache2 error log:

[Thu Apr 30 18:03:00.829219 2020] [:error] [pid 645] [client 107.242.121.41:37436] Unable to connect to ZM DB could not find driver
[Thu Apr 30 18:03:00.829327 2020] [:error] [pid 645] [client 107.242.121.41:37436] PHP Fatal error: Uncaught Error: Call to a member function query() on null in /usr/share/zoneminder/www/includes/config.php:165\nStack trace:\n#0 /usr/share/zoneminder/www/includes/config.php(140): loadConfig()\n#1 /usr/share/zoneminder/www/index.php(46): require_once('/usr/share/zone...')\n#2 {main}\n thrown in /usr/share/zoneminder/www/includes/config.php on line 165

Where should I look?
bbunge
Posts: 2935
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: Unable to connect to ZM DB could not find driver

Post by bbunge »

Could be a php issue. Seem to remember that an upgrade left the old php version and installed the new as well. Might be best to Install Buster fresh.
SkippyDo
Posts: 221
Joined: Mon Nov 20, 2017 6:49 pm

Re: Unable to connect to ZM DB could not find driver - RESOLVED!

Post by SkippyDo »

Listing php packages installed I found:

ii apache2 2.4.38-3+deb10u3 amd64 Apache HTTP Server
ii apache2-bin 2.4.38-3+deb10u3 amd64 Apache HTTP Server (modules and other binary files)
ii apache2-data 2.4.38-3+deb10u3 all Apache HTTP Server (common files)
ii apache2-doc 2.4.38-3+deb10u3 all Apache HTTP Server (on-site documentation)
ii apache2-utils 2.4.38-3+deb10u3 amd64 Apache HTTP Server (utility programs for web servers)
ii libapache2-mod-php7.0 7.0.33-0+deb9u6 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii libapache2-mod-php7.3 7.3.14-1~deb10u1 amd64 server-side, HTML-embedded scripting language (Apache 2 module)

Suspected that Apache2 was tripping over php7.0, so I disabled php7.0 via sudo a2dismod php7.0 and restarted Apache2 and all seems to be working great now!
Post Reply