Page 1 of 1

xampp 7.0.1 and adodb

PostPosted: 26. February 2016 17:02
by foxserv
Hi,

I've got one project that uses a MS Access database as backend. I connect to this databases by using the following commands in my php file.

$db_conn = new \COM("ADODB.Connection") or die("Cannot start ADO"); ( also "new COM(..." without the '\' before the 'COM' leads to same error )
$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("../db/whatever.mdb").";";
$db_conn->open($connstr);

After installing XAMPP with PHP 7.0.1 this leads to following error: Fatal error: Uncaught Error: Class 'COM' not found in .... ( rest gives filename and linenumber that causes error, as one can guess, the first one in the example above )

In my previous XAMPP ( php 5.4.7 ) everything worked fine. Comparing the two I found that at least the complete "pear" folder under "php" is missing in the 7.0.1 version and one of the "pear" subfolders is "adodb".

Is this what's really causing the error and can I fix it by just copying the pear\adodb folder under the 7.0.1 php folder?

BTW: have to stick with the MS Access database because that's customer's request....