Apache+Mandrake+PHP+Firebird

I have recently configured our Linux server to run PHP with Firebird 1.5 database support. After almost a day of searching, I’d like to share here the steps I found from firebird-php mailing list at yahoogroups.

Update:
The step by step procedure mentioned below did not somehow work completely for my Mandrake 9 server. I checked the original author of this instructions and he said that probably, the reason is that he based his instructions on Mandrake 10 installations. Unfortunately, it’s too burdensome for me to upgrade my OS at this time. So I tried to find a trick to solve this. Here’s what I did, it worked:

1. After genergating interbase.so (see below how to do it), I opened my php.ini file. I looked for this line:


extension_dir = /usr/lib/php/extensions

2. Because extension_dir points to /usr/lib/php/extensions, I copied my interbase.so to that directory.

3. Then, I changed

magic_quotes_sybase = Off

to

magic_quotes_sybase = On

4. I added this line:

extension=interbase.so

5. Restarted Apache
service httpd restart

Whoa! It worked!



1.- Install Mandrake 10 with Apache 2 and PHP included on the installation disks.

2.- After the installtion completes install Firebird as root
# rpm -Uvh FirebirdSS-1.0.3.972-0.i386.rpm

3.- Download the source code of PHP (php-4.3.5.tar.bz2)

4.- Extract the source code to any directory. For example
/home/someuser

5.- Go to the above diectory
# cd /home/someuser/php-4.3.5

6.- Compile PHP for interbase/firebird support
# ./configure –with-interbase=shared,/opt/interbase
# make

This steps generates the interbase.so library in
/home/someuser/php-4.3.5/modules

7.- Copy the interbase.so to /usr/lib/php4
# cp modules/interbase.so /usr/lib/php4

8.- Go to /etc/php and create the file interbase.ini
# cd /etc/php
# touch interbase.ini

9.- Add this line to interbase.ini:
extension=interbase.so

10.- Start or (Restart – if it running) Apache Server

# service httpd start
or
# service httpd restart

11.- To test use the following script:

< ? $coonection = ibase_connect("localhost:/opt/interbase/examples/employee.gdb", "sysdba","masterkey"); //this in one line $sql = "select * from customer"; $res = ibase_query($sql); while ($row = ibase_fetch_row($res)) { echo $row[0].' '.$row[1].'
‘;
}
? >

12.- Save the script in /var/www/html as fbtest.php

13.- Run the script in the web navigator by navigating to:
http://yourmandrakeserver.xxx/test.php

NOTES:
Steps 3, 4, 5 an 6 could be replaced with just one step
(“download interbase.so from…” ). Perhaps IBPhoenix or
FirebirdSQL would agree to place the file (interbase.so –
about 128KB) in the download area? Or maybe there is even
someone who could produce and rpm to set up FB for PHP. I
saw a rpm like that for RH 7.x but making one myself is way
above my head at this point.

  • Dariusz Zelichiwski

    haha! This is what I wrote, and someone took it from Firebird mailing lists and posted here, signing “techie”. Isn’t the world small :)

  • Dariusz Zelichiwski

    haha! This is what I wrote, and someone took it from Firebird mailing lists and posted here, signing “techie”. Isn’t the world small :)

  • http://graceplace.ph Arnold

    Yes. I recognize that it came from firebird-php mailing list, not may own. On the other hand, it won’t work for me yet as I posted recently in the list. Maybe you can check it out.

  • http://graceplace.ph Arnold

    Yes. I recognize that it came from firebird-php mailing list, not may own. On the other hand, it won’t work for me yet as I posted recently in the list. Maybe you can check it out.

  • Dariusz Zelichiwski

    I checked it out and I responded

  • Dariusz Zelichiwski

    I checked it out and I responded

  • Pingback: PukiWiki/TrackBack 0.1()

  • http://maranatasoftware.com Augusto

    Please How to get that becasu I only compile interbase.la and it does not work.
    Thanks.
    If you have for mandrake 10 and 9.2
    thanks a lot

  • http://maranatasoftware.com Augusto

    Please How to get that becasu I only compile interbase.la and it does not work.
    Thanks.
    If you have for mandrake 10 and 9.2
    thanks a lot

  • Shortie

    Hi

    I have Mdk v9.2
    php v4.3.3
    Could anyone forward a copy of interbase.so to me via email ?

    Thanks kindly in advance

    Yours

  • Shortie

    Hi

    I have Mdk v9.2
    php v4.3.3
    Could anyone forward a copy of interbase.so to me via email ?

    Thanks kindly in advance

    Yours

  • Pingback: debt management()

  • http://blonde-redhead-tons-confessions.thatfake.nx.cn/ George Sorof

    I’m sure that I’m the only normal person here. Why would I think so? Because no one normal would have written anything like posts below on this kind of website.

  • http://blonde-redhead-tons-confessions.thatfake.nx.cn/ George Sorof

    Im sure that Im the only normal person here. Why would I think so? Because no one normal would have written anything like posts below on this kind of website.

  • http://LASVEGASPOKERSOURCE.ORG Melda Brueske

    Hi there may I quote some of the material here in this entry if I reference you with a link back to your site?

  • http://LASVEGASPOKERSOURCE.ORG Melda Brueske

    Hi there may I quote some of the material here in this entry if I reference you with a link back to your site?