Subject Re: [firebird-php] RE: Fedora Core 5, Apache2 & PHP5 support for Firebird?
Author Milan Babuskov
Myles Wakeham wrote:
> I wish that was the case. With RH9 I was able to do that. Everything
> pretty much was done. But with Fedora Core 5, the default installation of
> Apache2 and PHP5 doesn't even include MySQL. You have to specify this, and
> then recompile PHP5 to support it. It's the same with Interbase/Firebird
> support from what I can gather. If someone had a RPM for this, I'd be all
> over it. But I've searched and searched, and keep getting told that I have
> to do this myself.

You could simply compile Firebird extension as loadable module (.so) and
enable it in php.ini file (step by step explanation below).

> What is strange to me, and maybe I'm missing something, but the default
> folder structure for Apache2, based on information from the and
> Apache websites, just don't match the file locations that Fedora have
> installed the files. The docs on the 'net for PHP & Apache refer to a
> folder in /usr/local/apache2.... Whereas Fedora has this stuff in
> /etc/httpd/... So when I do the default MAKE INSTALL its putting it where
> it thinks it should go, but its not right. And when I simply move the
> file to where I think it should go, it won't accept it (giving
> the error I previously stated).

Did you use source package from PHP website, or from Fedora's src.rpm
package? I assume you used the first one, in which case you need to
provide the correct --prefix argument to ./configure script. You can use
phpinfo() function to get the original parameters with which ./configure
was run when binary .rpm was built.

> If you know of a place I can get these installs from, I'm all ears. Or a
> suggestion for what I have to do (and forgive me because I'm no Linux guru
> here, so you may have to spell it out), I'd be very appreciative for any
> direction.

The most bullet-proof way I know of:

1. make sure you have apache, php, apache-devel and php-devel packages
installed (I'm not 100% sure those are the exact names for FC5 so YMMV).
You need php-devel for phpize script, and you need apache-devel to use

2. fetch PHP source for the PHP version you have running. Try getting
the src.rpm package if possible. If not, use one from PHP website. Make
sure it is the same version as running PHP.

3. go into ext/interbase directory of that source

4. run "phpize". It will create the "configure" script

5. run "./configure --with-interbase=shared,/path/to/firebird/install"

You may also supply "--with-apxs2" and some other options here, although
they don't seem to have effect in this case as you're only compiling
interbase extension and not the entire php.

6. make (do NOT do "make install")

7. file "" will be created in modules subdirectory. Copy it
to the appropriate "extensions" PHP directory. If you don't know where
it is, check in php.ini or read output of phpinfo(). BTW, if you're not
sure which php.ini is used (I have 2 on my system), phpinfo() is your

8. uncomment (or add a new line) in php.ini, where it says:

Some versions/distributions have a style to put it in separate
file/directory, but it doesn't matter.

9. restart apache

10. run phpinfo() to see extension is loaded.

11. run ibtest.php to check if extension is working properly:

Well, that's it... Good luck.

Milan Babuskov