Subject | RE: [firebird-php] Firebird and PHP-Interbase extension on a Mac (bsd) |
---|---|
Author | Nigel Weeks |
Post date | 2005-08-18T22:55:27Z |
>Here's a post I did a few months back. We can start with that:
> It's part of PHP source code. You can the compiling
> instructions there too.
Steps are:
1.
Start by finding the ./configure line that was used when building PHP the
first time - you can get this from the php_info() function in a small php
script inside your webserver root, and open it in a browser:
<?php
php_info();
?>
2.
Download the source for the version of PHP you're running(so things have a
better chance of working) Expand it out somewhere(doesn't really matter
where), cd into the directory, and just run the ./configure command you got
from the previous step.
3.
If the previous one worked, and all dependencies are found ok, do the
./configure again, but add the --enable-interbase=/path/to/firebird.
(I'm not sure where Firebird will be on OSX, but a `which isql` should tell
you)
If this works ok, and it can find all the dependencies, you're ready to
compile.
4.
Build PHP
Type `make`.
This will build PHP, but won't install it. Now, find the module(without the
backticks):
`find . -name "interbase.so"`
It's usually inside an 'ext' directory.
5.
Copy this file to your PHP extensions directory. On a Fedora machine I have
access to, this is '/usr/lib/php4/'. On FreeBSD, it's
'/usr/local/lib/php/20040412/'
6.
Tell PHP about the new extension. In your 'php.ini', uncomment/add the line
'extension=interbase.so'.
On FreeBSD, this is in '/usr/local/etc/php.ini'
My Fedora machine has a directory in '/etc/php.d/' that contains an
'interbase.ini' file the above line in it - might be an installation
specific thing, I dunno. Just letting you know! :-)
You're done. Restart the webserver, and you should be away.