Fatal Error in adodb-ado5.inc.php:280

This public forum is for user-to-user discussions of PHP Report Maker. Note that this is not support forum.

Fatal Error in adodb-ado5.inc.php:280

Postby leontet » Tue Jul 18, 2017 5:57 am

Hi all!

I'm trying to learn how to use PHP Report Maker, so I may be asking stupid questions.
I made a simple MS Access 2016 database (for testing purposes) containing 4 tables populated by a few records.
I saved it both as .accdb and .mdb
I imported it in my MS SQL Server 2008 R2

When proceeding to generate and run the PHP report codes, things run fine only when I use the SQL Server database as source.
When using either the ACCDB or MDB files as source, code is generated but when browsing to the test directory I get this error:

Fatal error: Uncaught Error: Call to a member function Execute() on boolean in C:\inetpub\wwwroot\test_rep\adodb5\drivers\adodb-ado5.inc.php:280 Stack trace: #0 C:\inetpub\wwwroot\test_rep\adodb5\adodb.inc.php(1251): ADODB_ado->_query('SELECT * FROM [...', false) #1 C:\inetpub\wwwroot\test_rep\adodb5\adodb.inc.php(1229): ADOConnection->_Execute('SELECT * FROM [...', false) #2 C:\inetpub\wwwroot\test_rep\tblAniUnivrpt.php(709): ADOConnection->Execute('SELECT * FROM [...') #3 C:\inetpub\wwwroot\test_rep\tblAniUnivrpt.php(579): crtblAniUniv_rpt->GetCnt('SELECT * FROM [...') #4 C:\inetpub\wwwroot\test_rep\tblAniUnivrpt.php(1118): crtblAniUniv_rpt->Page_Main() #5 {main} thrown in C:\inetpub\wwwroot\test_rep\adodb5\drivers\adodb-ado5.inc.php on line 280

I'm stuck here, as I found no useful information (for me at least) on the internet.
I need to use the Access files as sources.
Please help. Thank you in advance!
leontet
 
Posts: 13
Joined: Tue Jul 18, 2017 5:38 am

Re: Fatal Error in adodb-ado5.inc.php:280

Postby Webmaster » Tue Jul 18, 2017 7:59 am

Make sure you have installed Microsoft Access 2016 Runtime. Read system requirements:
http://www.hkvstore.com/phpreportmaker/download.asp
Webmaster
 
Posts: 10734
Joined: Fri Aug 06, 2004 5:59 pm

Re: Fatal Error in adodb-ado5.inc.php:280

Postby leontet » Tue Jul 18, 2017 7:46 pm

Thank you for the fast reply!

Indeed, Access 2016 Runtime was not installed - my bad!
I just installed it, rebooted the server and tried the script again.
Unfortunately there is no joy: the same error appears.

Any further ideas?
Thank you!
leontet
 
Posts: 13
Joined: Tue Jul 18, 2017 5:38 am

Re: Fatal Error in adodb-ado5.inc.php:280

Postby Webmaster » Wed Jul 19, 2017 4:59 pm

Click Tools -> Advanced Settings, enable Debug. Re-generate ewrcfg*.php, run the script again and see if you can get more detailed error messages.
Webmaster
 
Posts: 10734
Joined: Fri Aug 06, 2004 5:59 pm

Re: Fatal Error in adodb-ado5.inc.php:280

Postby leontet » Wed Jul 19, 2017 7:31 pm

This is exactly what I did last night.
With debug enabled the old error message is preceded by the following lines:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\inetpub\wwwroot\test_rep1\test.accdb;Persist Security Info=False;
com_exception: Source: ADODB.Connection
Description: Provider cannot be found. It may not be properly installed. in C:\inetpub\wwwroot\test_rep1\adodb5\drivers\adodb-ado5.inc.php:116
Stack trace:
#0 C:\inetpub\wwwroot\test_rep1\adodb5\drivers\adodb-ado5.inc.php(116): com->Open('Provider=Micros...')
#1 C:\inetpub\wwwroot\test_rep1\adodb5\adodb.inc.php(670): ADODB_ado->_connect('Provider=Micros...', '', false, '')
#2 C:\inetpub\wwwroot\test_rep1\phprptinc\ewrfn10.php(6833): ADOConnection->Connect('Provider=Micros...', false, false)
#3 C:\inetpub\wwwroot\test_rep1\phprptinc\ewrfn10.php(6698): ewr_ConnectDb(Array)
#4 C:\inetpub\wwwroot\test_rep1\phprptinc\ewrfn10.php(6747): ReportConn('DB')
#5 C:\inetpub\wwwroot\test_rep1\qryAniGrupeStudentirpt.php(229): ewr_Connect('DB')
#6 C:\inetpub\wwwroot\test_rep1\qryAniGrupeStudentirpt.php(1188): crqryAniGrupeStudenti_rpt->__construct()
#7 {main}

So it is pretty obvious php cannot access the database file when it is an ACCDB format.
Funny thing is that something similar appears when the database file is of MDB type:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\inetpub\wwwroot\test_rep1\test.mdb;
com_exception: Source: ADODB.Connection
Description: Provider cannot be found. It may not be properly installed. in C:\inetpub\wwwroot\test_rep1\adodb5\drivers\adodb-ado5.inc.php:116
Stack trace:
#0 C:\inetpub\wwwroot\test_rep1\adodb5\drivers\adodb-ado5.inc.php(116): com->Open('Provider=Micros...')
#1 C:\inetpub\wwwroot\test_rep1\adodb5\adodb.inc.php(670): ADODB_ado->_connect('Provider=Micros...', '', false, '')
#2 C:\inetpub\wwwroot\test_rep1\phprptinc\ewrfn10.php(6833): ADOConnection->Connect('Provider=Micros...', false, false)
#3 C:\inetpub\wwwroot\test_rep1\phprptinc\ewrfn10.php(6698): ewr_ConnectDb(Array)
#4 C:\inetpub\wwwroot\test_rep1\phprptinc\ewrfn10.php(6747): ReportConn('DB')
#5 C:\inetpub\wwwroot\test_rep1\qryAniGrupeStudentirpt.php(229): ewr_Connect('DB')
#6 C:\inetpub\wwwroot\test_rep1\qryAniGrupeStudentirpt.php(1188): crqryAniGrupeStudenti_rpt->__construct()
#7 {main}

I repaired, then unistalled/reinstalled MS Access Database Engine 2010 (x86 version, with the x64 one the database cannot be read at all by PHP Report Manager, so no code can be generated) to no avail.

Anyway, it seems the problem is somewhere else, at a level that makes usage of both Microsoft.ACE.OLEDB.12.0 and Microsoft.Jet.OLEDB.4.0 impossible.
leontet
 
Posts: 13
Joined: Tue Jul 18, 2017 5:38 am

Re: Fatal Error in adodb-ado5.inc.php:280

Postby Webmaster » Wed Jul 19, 2017 8:21 pm

leontet wrote:
> Description: Provider cannot be found. It may not be properly installed.

The database provider is still not found even you said you have installed it.

Check your PHP version, usually it is x86. If you use .mdb, it must be x86 or it will not work.

If your PHP is x64, it will not work with .mdb, you must install x64 version of Microsoft Access 2016 Runtime and you can only use .accdb.

If your PHP is x86, you must install x86 version of Microsoft Access 2016 Runtime and you can use both .mdb and .accdb. So x86 version is recommended if you need to use .mdb.

After installing the runtime, reboot your machine if necessary. If you use IIS as testing server, at lease restart IIS.
Webmaster
 
Posts: 10734
Joined: Fri Aug 06, 2004 5:59 pm

Re: Fatal Error in adodb-ado5.inc.php:280

Postby leontet » Thu Jul 20, 2017 12:55 am

SOLVED!!!

After the explanations you gave me in your last post, I drew the conclusion the problem could be some sort of mismatch between the 32 bit Access Engine and Runtime I had to install and the 64 bit PHP 7.02 I was running.
So I replaced the 64 bit version of PHP with the 32 bit one. I did the same thing with the MSSQL drivers for PHP7 (with the appropriate changes in php.ini).
IISRESET and voila! Everything is working as expected!!!

Thank you a zillion times for your patience and availability!!!

PS: It won't be a bad idea, in my opinion, to specify on the PHP Report Maker download page, besides the prerequisite software, that x86 PHP is needed (or at least recommended). A similar mention for Access Engine and Runtime won't hurt either!
Thank you again!
leontet
 
Posts: 13
Joined: Tue Jul 18, 2017 5:38 am


Return to General Discussion (PHP Report Maker)