Subject firebird with php - apache configuration
Author mikaelderrien

i'm Mikaƫl, from france, and i met some troubles with the use
of php for firebird, that you may have already encounter.
i installed firebird superserver RC4 on a suse 8.2, ant it runs
well. i also use an apache web server (1.3.27) configured with
php support, there's no problem. i use webmin to do easily the
administration. i want to use ibWebAdmin 0.91 and installed it.
i've modified the file inc/ to fit to my
installation, following the comments, i don't think there are
troubles due to my changes, i can copy it here if you judge it
necessary. Then, in a web browser :
processed to
http://localhost/ibwa/database.php (through aliases)
i got this error messages (*)
Your php installation misses the interbase support !
Recompile your php and configure --with-interbase[=DIR]
or edit your php.ini to load
i've looked in /etc/php.ini and /etc/httpd/httpd.conf, i've
also read the file about DSO in the html manual docs provided
with apache. As i understand it, things mus go this way :
* in /etc/php.ini, section ;Dynamic Extensions; add the line to [extension section], the file will
be found in /usr/lib/apache with others DSO librairies. Then
in section ;Module Settings; add a section [firebird], that will
be useful the day i'll find what the **** to put in. Indeed, this
might not be necessary since firebird options are set up in
firebird/firebird.conf, except for magic quotes.
* in inc/, replace in :
if (!in_array('interbase', get_loaded_extensions())) {
@dl('') || @dl('interbase.dll');
by, don't care about the dll.
* in /etc/httpd/modules/ create the file mod_firebird with
these lines inside :
LoadModule:LoadModule firebird_module /usr/lib/apache/
AddModule:AddModule mod_firebird.c
don't you recognize ? great :) let's see about
* in /etc/httpd/ create the file mod_firebird.conf with these lines
inside :
Listen 80
Listen 8099
Listen 8101
Listen 8102
NameVirtualHost name.domain:8099
NameVirtualHost name.domain:8101
NameVirtualHost name.domain:8102
ServerName name.domain
<VirtualHost name.domain:8099>
Port 8099
<VirtualHost name.domain:8101>
Port 8101
<VirtualHost name.domain:8102>
Port 8102
this should deal with apache web server and virtual hosts, at least
i hope so.
* in /etc/sysconfig/apache add the lines :
## Type: yesno
## Default: "no"
# enable mod_firebird module
(remember the first line of /etc/httpd/modules/mod_firebird ?)
* in /etc/httpd.conf, in ### Section 1: Global Environment
add the lines
LoadModule firebird_module /usr/lib/apache/
AddModule mod_firebird.c
to section # Dynamic Shared Object (DSO) Support.

And now, what's about this mysterious ?
As i explained in dos.html and apxs.html, this module is build by
the command
$ apxs -c mod_firebird.c
So, what's about mod_firebird.c ? I just need to write it... but
this is far
too much complicated for me. I saw mod_php4.c and other source code
files for
creating modules with apxs, however i'm able to develop this kind of
and basically understand what they're supposed to do.

i haven't found 'mod_firebird.c' or something similar, neither by
apache web site
nor by suse web site, so if someone has it, i'm very interested :)

Then, i found a file called on yahoo firebird-support
forum and decided to
tried it so i made the right changes, following what i explained
in inc/, httpd.conf and php.ini and copy to
/usr/lib/apache/ then restarted apache services (apply changes)
and... it failed :|
quite logically, because versions of applications weren't the same :

Failed to start apache :

Starting httpd [ Mailman Midgard PERL PHP4 Python ZopeKeepHomes ]

Syntax error on line 263 of /etc/httpd/httpd.conf:
Cannot load /usr/lib/apache/ into server:
cannot open shared object file: No such file or directory

i think, in, '' should be replaced by, maybe...
if i had interbase.c ; so, now, i don't know what to do.

Apart from this, i've also installed SQLLY developpment IB admin 4
but this dosn't work :
# /opt/ibadmin4/bin/ibadmin4
gives me several 'QPopupMenu: (unnamed) Popup has invalid menu item'
messages and the followings
Exception EIBClientError in module IBAdmin4 at 0810AE0A.
InterBase library not found in the path. Please install
InterBase to use this functionality.

so i guess i need to install interbase to get its library althouh writes clearly that their
product runs with firebird 1.5


- i noticed a file in /usr/lib/mysql/, where are located*, called libmysclient.a
and that provide informations for linking the library, like
dependencies, directories...
could it be an exploitable example for firebird or this idea is just
useless and stupid ?

- i thought that php integrated firebird support, since you can find
the files ibase.php in
/usr/share/php/DB/ or ibase.h and gds.h in firebird/include

- this is not directly linked, but what's the function of
firebird/lib/ ?

for the moment, i've found a file called mode_example.c, in apache
2.0.47 package, and i'll try
to create my own mod_firebird.c starting from that but it's quite
sure it'll fail.

any comment, advice, hint, idea or even solution ;) is welcomed :)
because until now i still don't know how to make firebird, php and
apache run altogether.

fanx for reading