KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Help with Firebird database. #429

Open Andy Noel opened this topic on on Aug 24, 2018 - 7 comments

Andy Noel commented on Aug 24, 2018

Dear Support,

I am new to Kool Report and just purchased the Kool Report Pro Modules. We want to connect to Firebird database but simply getting a General HTTP ERROR 500 Error I need help about how to connect to Firebird database. I may be missing a few lines in my php.ini or a few dll files.

Here is my code

<?php 
require_once "../koolreport/autoload.php";

class EmployeeList extends \koolreport\KoolReport
{
    function settings()
    {
        return array(
            "dataSources"=>array(
                "mydata"=>array(
                    'connectionString' => 'firebird:host=localhost;dbname=C:\Data\TEST.GDB', 
                    'username' => 'sysdba',
                    'password' => 'masterkey',
                    'charset' => 'utf8', 					
                )
            )
        );
    }
    function setup()
    {
        $this->src("mydata")
        ->query("select empno as is , othernames as firstName, surname as lastName from pemployee")
        ->pipe($this->dataStore("employees"));
    }
}
?>

In my php.ini file extension=php_pdo_firebird.dll

Andy Noel commented on Aug 24, 2018

RESOLVED. Problem was in my SQL Statement. "select empno as is" instead of "select empno as id" the word 'is' was causing the problem..

KoolReport commented on Aug 24, 2018

In the index.php (the file that create report object), could you please add this code above all

error_reporting(E_ALL);

This will let PHP to show exactly error. Please let me know what the error is

KoolReport commented on Aug 24, 2018

Oh that's great that you solved the issue. This typo mistake is easy to be made.

paulo commented on Feb 24, 2021

@Andy Noel , are you using Windows? How were you able to connect to FIREBASE using PHP? How did you install DLL? I can't get mine to load here... thanks

Andy Noel commented on Feb 24, 2021

Hi Yes are are using Windows. Add line in php.ini extension=php_pdo_firebird.dll

Make sure this dll is in the ext sub folder of the php folder

Andy

paulo commented on Feb 24, 2021

thanks Andy. I am getting '"SQLSTATE[HY000] [335544721] Unable to complete network request to host "xnet://Global\FIREBIRD"."' error now... I can access using other tools and I am connected to the VPN... so I am not really sure what is causing this.. thanks for your help !

paulo commented on Feb 24, 2021

just for future searches and others about this topic.,I've changed the string to : 'connectionString' => 'firebird:dbname=10.215.224.199:c:\ProgramData\Trams\Database\trams.ib',

and not it seems to be a problem on the server , but at least it is connecting. "SQLSTATE[HY000] [335544421] connection rejected by remote interface"

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
None yet

None