0

I have been trying to use the mod_lua dbacquire function to operate an example mysql database...

https://httpd.apache.org/docs/trunk/mod/mod_lua.html#databases

I have uncommented what I needed in the httpd.conf file to enable mod_dbd. At the moment I keep receiving this error for the given example:

Could not connect to the database: can't find driver for mysql

I have seen things saying to place this inside of the httpd.conf file:

DBDriver mysql
DBDParams host=localhost,dbname=pony,user=shetland,pass=appaloosa

(Yes, I do change the parameters.)

When I add this to the httpd.conf file it causes XAMPP to error and not start the apache localhost. I've narrowed it down to it being the DBDriver function - as it only errors when this is included.

A1.exe
  • 331
  • 2
  • 10
  • I assume you want to access a database from some PHP script, am I correct? – RiggsFolly Apr 16 '17 at 18:48
  • Are you intending to write your own Apache Module that requires access to a database? If you are this is how you might do it. If you intend to write a PHP script to access a MYSQL database, this is not how you do it. – RiggsFolly Apr 16 '17 at 18:52
  • I intend to use it from a Lua script- through dbacquire inside a handle to be called through mod_lua – A1.exe Apr 17 '17 at 19:41

0 Answers0