Yii Framework Forum

Improved Firebird Adapter


(Ricobregon) #1

Hi gys,

I’ve updated the Firebird adapter created by idle_sign and then modified by zoggo.

Fixed some errors related to the code generators and autoinc fields (yes, now the adapter detects when a generator is present).

Also the adapter adds some missing variables and makes it compatible with Yii 1.1.10 (and above).

[s]2576

firebird_adapter_0.7.tar.gz

2602

firebird_adapter_0.8.tar.gz

GitHub repository is also available: https://github.com/robregonm/YiiFirebird

If you find bugs, please let me know, in order to fix them and possibly add this files to the Yii core (would be great).

Regards.


(Ricobregon) #2

This version is very stable. I’m using it for a personal project, nevertheless we need more testing.

Best regards.


(Ricobregon) #3

If some of you experience speed issues, please let me know.


(Ricobregon) #4

New version available

This new version is compatible with Yii 1.1.9 and above.

It is recommended you use the latest version of pdo-firebird (at least version 5.3.10)

2602

firebird_adapter_0.8.tar.gz


(Pbond81) #5

Why do you use PDO? It’ still in alpha state.

Zend Framework also use php_interbase driver only


(Birger) #6

I’m using the Firebird adapter for my first Yii problem and it seems to work ok.

However, I encounter a problem with decimal fields. They are readed from the database just fine. But when I update a record with a decimal the value is devided by 10000. So 5 becomes 0.0005 when posted to the database. When I edit the record again the value is devided by 10000 again which turns it into 0.

Any idea what I am doing wrong?


(Birger) #7

I changed the fields to FLOAT in the database and that seems to work.


(Ricobregon) #8

@birger

I’ll take a look at it.

If you find any bug, please report it at the github repository: https://github.com/robregonm/YiiFirebird

Best regards.


(Birger) #9

Thanks for looking at it. If I find anything else I will post it on github.


(Ricobregon) #10

This extension can be downloaded from the Extensions page.


(Ricobregon) #11

Version 1.0RC released.

Feel free to download and report bugs.


(Ricobregon) #12

Version 1.0RC2 released.

Lots of bug fixes and enhancements implemented.


(Ricobregon) #13

Good news:This extension will be pushed to Yii core as soon as the final version 1.0 of the extension is released.


(Biz) #14

Hi robregonm

Version 1.0RC2 downloaded. Installed as in readme.

Getting error ‘could not find driver’

Have I missed something?

Thank you.


(Ricobregon) #15

Hi Jay_69,

Are you using PHP 5.3.10+, and Yii 1.1.13?

There are some known issues mainly when PHP version is not 5.3.10 or above.

And, last Yii version fixes some bugs when loading 3rd party Db extensions (like Yii.Firebird)

Please, let me know, if you get some progress on this.

Regards.


(Biz) #16

Hi robregonm,

Sorry could not test on other versions.

Our project uses Firebird as local db and syncs with MySql site db, so we decided not to use direct connect to Firebird db from the site.

Set up http server and used cross domain requests instead.

But anyway I will keep your extension on a list.

Cheers


(Ricobregon) #17

Release Candidate 4 is available to download.

This new version includes several bug fixes and enhancements.

Feel free to download and report issues.

And remember, as soon as this extension is stable, then a pull request will be done to Yii repo.


(Sm) #18

Just in case anybody else had the same problem…

The Yii Firebird adapter worked fine with Apache, but it just silently crashed under the FreeBSD+Nginx+PHP-FPM installation.

So if you’re on a FreeBSD system and using PDO_Firebird along with PHP-FPM, make sure you have the LINKTHR option enabled for your PHP5 (lang/php5):


LINKTHR=on: Link thread lib (for threaded extensions)

Hope it will help :)


(Ricobregon) #19

@ibmed

Thanks for you comment. I think I’ll add it to the documentation as a “known issue”.


(Warez) #20

Hi robregonm,

Im’ trying to use firebird extension with gii, but there is a message when I click on “Crud Generator”

SOLVE: folder name in protected\extensions must be YiiFirebird