Install & compile Firebird InterBase database server with PHP on Linux Server.

Firebird originally started its life as the Borland InterBase database. It is a relational database management system . Firebird offers many ANSI SQL:2003 standard features like excellent concurrency, high performance, and powerful language support for stored procedures and triggers.

In order to install the firebird database on Linux server you will need to perform the following steps:
1)Download the firebird module to the server

cd /opt/

wget http://sourceforge.net/projects/firebird/files/firebird/2.0.5-Release%20%28Source%29/Firebird-2.0.5.13206-0.tar.bz2/download

2)Manually build and install the firebird

tar -jxf Firebird-2.0.5.13206-0.tar.bz2
mv Firebird-2.0.3.12981-1 firebird
cd firebird/Firebird-2.0.5.13206-0
./autogen.sh
make
make install

Firebird classic 2.0.3.12981-1.i686 Installation

Press Enter to start installation or ^C to abort
Please enter new password for SYSDBA user: (Enter here SYSDBA user password and press Enter key)
firebird database Installed successfully

3. Add /usr/local/firebird/bin/ to your path. You can either change /etc/profile or do

Quote:

export PATH=$PATH: /usr/local/firebird/bin/

or
change the profiles in your users home directories

4. Check that all went well:

Quote:
Read /opt/interbase/SYSDBA.password to get your SYSDBA password.

gsec -display

should display the list of known users (SYSDBA only after a fresh install)
like

Quote:

[root@server ~]# gsec -display
user name uid gid full name
——————————————————————————————
SYSDBA 0 0 Sql Server Administrator
[root@server ~]#

[root@server]# isql /usr/local/firebird/examples/empbuild/employee.fdb
Database: /usr/local/firebird/examples/empbuild/employee.fdb
SQL> SHOW TABLES;
COUNTRY CUSTOMER
DEPARTMENT EMPLOYEE
EMPLOYEE_PROJECT JOB
PROJECT PROJ_DEPT_BUDGET
SALARY_HISTORY SALES
should display all tables from this database

SQL> quit;
[root@server]#

Once firebird database successfully installed you will have to compile firebird module with PHP and Apache , in order to work it with PHP.

Steps to compile firebird module with php On Linux Cpanel server

1)The firebird module doesn’t exit in standard cpanel easyapache scripts, You will have to put it in Custom FLAG

Quote:
• All PHP 4.x versions – edit /var/cpanel/easy/apache/rawopts/all_php4 file and put following code
–with-interbase=/opt/firebird/
• All PHP 5.x versions – edit /var/cpanel/easy/apache/rawopts/all_php5 file and put the following code
–with-interbase=/opt/firebird/

2) And run /scripts/easyapache script
When installing is finished, open the php.ini configuration file (located in /usr/local/lib/), and check if these lines exist (uncomment/modify them if necessary):

Quote:
magic_quotes_sybase = On ; Use Sybase-style magic quotes (escape ‘ with ” instead of ‘)
extension=php_interbase.so

3)You can check php module using php –m command

php -m |grep interbase

interbase

OR create php info file under the default apache document root with following code and access it in browser
<?
phpinfo();
?>

you will see following output

Quote:

interbase
Firebird/InterBase Support static
Compile-time Client Library Version Firebird API version 20
Run-time Client Library Version LI-V6.3.3.12981 Firebird 2.0

Directive Local Value Master Value
ibase.allow_persistent On On
ibase.dateformat %Y-%m-%d %Y-%m-%d
ibase.default_charset no value no value
ibase.default_db no value no value
ibase.default_password no value no value
ibase.default_user no value no value
ibase.max_links Unlimited Unlimited
ibase.max_persistent Unlimited Unlimited
ibase.timeformat %H:%M:%S %H:%M:%S

ibase.timestampformat %Y-%m-%d %H:%M:%S %Y-%m-%d %H:%M:%S
  1. Your site was extremely interesting, especially since I was searching for thoughts on this subject last Thursday.

  2. I don’t know If I said it already but …Hey good stuff…keep up the good work! 🙂 I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say I’m glad I found your blog. Thanks,)

    A definite great read..Jim Bean

  3. I don’t know If I said it already but …I’m so glad I found this site…Keep up the good work I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say GREAT blog. Thanks, 🙂

    A definite great read….

  1. No trackbacks yet.

Leave a reply to BloggerDude Cancel reply