1

Topic: Database connection error: could not find driver

When I try to go to the admin console after installing via Softaculous I see the following:

Could not connect to the calendar database. See 'logs/sql.log'

When I go to that file I see the following:

mycal:ERROR Script: /luxcal/index.php - Database connection error: could not find driver

I didn't see any pre-reqs to be done before doing the install but from the error I'm guessing there's something that should be in place before doing the install.

Any suggestions?

Re: Database connection error: could not find driver

Hi Greg,
What calendar version are you using?
If you are using the MySQL version, then PHP on your server must have the PDO-MySQL driver enabled.
If you are using the SQLite version, then PHP on your server must have the PDO-SQLite driver enabled.
Most of the times both drivers are enabled by default. Some web hosts have an option in cPanel where you can enable these drivers.
Roel

3

Re: Database connection error: could not find driver

I installed v5.2.0M so I'm going to guess that means it's the MySQL version?

I do see that there's a database name & database user set up (both named my "website_luxc354") so I'd imagine it got at least part of the way. Unfortunately I don't see anything in cPanel that says something about enabling database drivers. However, I do have ssh access to the web host so perhaps there's a command(s) I could issue to verify and/or enable it?

I did run across this command (ignore the pound sign; apparently my hosting service enjoys tormenting me):

[~]# php -m | grep -i pdo
PDO
PDO_ODBC
pdo_pgsql
pdo_sqlite
[~]#

So if I'm not making too many assumptions the version I've installed via cPanel/Softaculous is the MySQL version but the web host provider doesn't have the MySQL PDO enabled but does have the SQLite one? Or perhaps there's a command that I can use to enable it (although it's an unprivileged account with no sudo access so I'm gonna guess the answer is "no" to that).

Also, is there a particular version of PHP I should enable? That I'm able to change on the fly.

If that's the case then I guess I can request the pdo_MySQL to get enabled and proceed from there.

Thanks,
Greg

4

Re: Database connection error: could not find driver

Hi Raul; we've chatted prior on my Elog module called YAPS for managing printer fleets. So my normal daily notifications by email telling me everything is ok with my vh and Luxcal, even if noone did anything on the web demo that day .. it 'just stopped working' 2 days ago. So when I went in to see the calendar in action I got this message showing on the screen where the calendar should be: "Could not connect to the calendar database. See 'logs/sql.log'" The  calendar would not pull up at all. The logs shows could not connect to the db. Sqlite is installed.
So I went into php.ini that shows as the php  ver being used by my sys (debian linux) and made sure the pdo was set for sqlite which is selected by LuxCal.
It did NOT help. Nothing changed on my system recently asfaict... but who knows (the demo is on a virtual host at 92.243.26.27:81) I *might* have inadvertently installed *something* like a new python3 (good name for this new virus variant!).
Any ideas, hints or clues? I want to keep using your Calendar as I am sooo close to releasing my first version of YAPS and your Calendar is such a great added feature,  soo awesome!
Also one weird thing.. the daily cron notification emails started being sent once again yesterday, after I discovered the Calendar was down the day previously and noticed there was an issue because that day, the email was NOT sent... so I guess *some* parts are working, but not others?
Thanks man,
John