Subject Re: [firebird-php] Re: Installing PHP-Firebird
Author Milan Babuskov
vengfulsquirrel wrote:
> If I install php with --with-interbase=shared,/opt/firebird
> and restart apache I get this error. The php.ini file is not even in
> /etc should it be?,php IS working but the modules obviuosly is not.
>
> Fatal error: Call to undefined function: ibase_connect() in
> zaddplant.php on line 47

When Firebird support is loaded as module (shared), you need either:

1. edit your php.ini and uncomment the line:
;extension=php_interbase.dll

To make it:
extension=interbase.so

2. Or, use dl() function of PHP to load interbase.so at runtime (inside
your .php script).

> If I install php with --with-interbase=/opt/firebird
> and restart apache I get this error. The php.ini file is still not in
> /etc.
> Warning: ibase_connect(): operating system directive open failed
> Permission denied in zaddplant.php on line 47
> Cannot Connect

Strange.

> Now I tried copying the php.ini-dist file into /etc but none of the
> settings I gave through configure are set. Does php automatically set
> these or not? Because it is not setting them, ie safe-mode is not set
> to on and neither are magic-quotes.
>
> What is the advantage of compiling firebird as a module?

1. It's easier to install PHP from .rpm file and just add firebird
module. Perhaps you could try this. Just install PHP from .rpm file,
compile the source (with make), but don't do a "make install". Then copy
interbase.so to the correct directory (You can see which is it in
php.ini file), and edit php.ini in the way I wrote at the begining of
this message.

2. If you use Apache/PHP for some other stuff (besides Firebird), then
it isn't loaded every time.

HTH

--
Milan Babuskov
http://fbexport.sourceforge.net