jacquestvanzuydam / laravel-firebird

Firebird Illuminate package for Laravel 5
63 stars 93 forks source link

PDOException in Connector.php line 55: could not find driver #18

Closed pfloriginale closed 8 years ago

pfloriginale commented 8 years ago

Detail

  1. in Connector.php line 55
  2. at PDO->__construct('firebird:dbname=localhost:/storage/firebird/name_database.FDB', 'sysdba', 'masterkey', array('0', '2', '0', false, false)) in Connector.php line 55

Somebody could help me?

I coded

composer require jacquestvanzuydam/laravel-firebird:dev-5.1-support

added to config/database.php

    'firebird' => [
        'driver'   => 'firebird',
        'host'     => env('DB_HOST', 'localhost'),
        'database' => '/storage/firebird/G_CHIOSCO.FDB',
        'username' => 'sysdba',
        'password' => 'masterkey',
        'charset'  => env('UTF8'),
    ],

added to config/app.php

Firebird\FirebirdServiceProvider::class,

added

DB_CHARSET=UTF8

I use in the same project also a mysql database, so in the model where i need this connection i coded

added to the stats.php model

protected $connection = 'firebird';

Thanks a lot look like great job and i would like try!

cedamorim commented 8 years ago

Change this line 'charset' => env('UTF8') to 'charset' => env('DB_CHARSET', 'UTF8'),

jacquestvanzuydam commented 8 years ago

If you still having problems after using the suggestion that @cedamorim suggested, please let us know?

pfloriginale commented 8 years ago

Change but... no fixed

2016-01-19 14:48 GMT+01:00 Jacques van Zuydam notifications@github.com:

If you still having problems after using the suggestion that @cedamorim https://github.com/cedamorim suggested, please let us know?

— Reply to this email directly or view it on GitHub https://github.com/jacquestvanzuydam/laravel-firebird/issues/18#issuecomment-172859151 .

jacquestvanzuydam commented 8 years ago

If I understand you correctly, you are trying to use both mysql and firebird?

Have you tried removing/commenting out the Illuminate\Database\DatabaseServiceProvider::class, in app.php?

As the Firebird driver does extend the original service provider.

cedamorim commented 8 years ago

Wow, sorry .. I did not pay attention right in the title, apparently you forgot to enable the extension of the firebird for pdo http://php.net/manual/en/ref.pdo-firebird.php

pfloriginale commented 8 years ago

Thanks guys for attention but are a lot of day I try without result...

I'm testing on XAMP with Windows 64 bit

But..

php give me always this error PHP Warning: PHP Startup: Unable to load dynamic library 'E:\Programmi\xamp\php\ext\php_pdo_firebird.dll' - %1 non è un'applicazione di Win32 valida.

In italian means "php_pdo_firebird.dll is not a valid win 32 application"

I can't find solution and I would like to try this!

jacquestvanzuydam commented 8 years ago

Paolo, unfortunately I don't use Windows to develop with. Perhaps someone else using this library can help with the installation of the PDO for windows?

What I can suggest however is using a Vagrant Box like the homestead one used for testing/developing in Laravel and install Firebird on it.

Please look at the following links for more about Vagrant and Homestead:

https://www.vagrantup.com

https://laravel.com/docs/5.2/homestead

cristiano-pacheco commented 8 years ago

hello paulo, you need to enable the extension pdo firebird in php.ini. for this, search for ;extension=pdo_firebird in your php.ini and remove; at the beginning of the line. restart your apache and'll be resolved.

pfloriginale commented 8 years ago

Thanks a lot... but the problem maybe is other...

my php.ini is..

...
;extension=php_openssl.dll
extension=php_pdo_firebird.dll
;extension=php_pdo_mysql.dll
...

But it give me this error on the shell if i test "php"

PHP Warning: PHP Startup: Unable to load dynamic library '/opt/bitnami/php/lib/php/extensions/php_pdo_firebird.dll' - /opt/bitnami/php/lib/php/extensions/php_pdo_firebird.dll: cannot open shared object file: No such file or directory in Unknown on line 0

Now i'm testing on AMAZON AWS bitnami -lampstack-5.5.29-1 -linux-ubuntu-14.04.1-x86_64

pfloriginale commented 8 years ago

Another thigs is that php looking for a php_pdo_fiebird.dll in this folder, where, there are oly *.so files.

Is correct? Sorry... I'm a really newbie about server config

cattura

pfloriginale commented 8 years ago

FIXED!

in php.ini I changed

from extension=php_pdo_firebird.dll to extension=pdo_firebird.so

Really I don't know because but it works! I promise i will study apache and php enviroment! :)

look like great... now I try :)))

pfloriginale commented 8 years ago

FIXED also in local with XAMP

I work with windows 7 64 bit, but XAMP want a fbclient.dll 32 bit

So... i download from firebird site a .zip 32 bit version for windows, take only che fbclient.dll and put in the root php...

jacquestvanzuydam commented 8 years ago

I am glad to hear you managed to solve this. I'd still recommend using a modified Vagrant Laravel Homestead over XAMP.

bhrandon commented 7 years ago

Good afternoon, I'm brazilian and I'm having an error when doing the migration for firebird, I have all the firebird drives in wamp64 started and I'm using laravel 5.3 with its 5.3 package as well.

erroexeptionpdodriver

jacquestvanzuydam commented 7 years ago

Hi @bhrandon , Have you followed the steps used by @pfloriginale ?

I don't have a Windows environment to test / replicate this with, but it looks like a firebird isn't installed correctly.

pfloriginale commented 7 years ago

If you don t want lose too much time in fixing... Use vagrant+homestead.

I use this pack from 1 yr and its great

bhrandon commented 7 years ago

Good morning, I've followed every step. I want to ask you a favor @pfloriginale, could you create a tutorial on how to use the package with firebird on windows? I think this is going to help a lot of people. And only you can help me.

pfloriginale commented 7 years ago

May I know why you don't use vagrant + homestead? Need a little bit of time to learn it, but it solves also your future issues.

ahmed-bermawy commented 7 years ago

You need to install php module for pdo_mysql

to do that run this command on your server

yum install php-mysqlnd

Then restart httpd service

service httpd restart