Subject Re: Installing PHP-Firebird
Author vengfulsquirrel
--- In firebird-php@yahoogroups.com, Milan Babuskov <albis@e...> wrote:
> 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


Okay yeah, so if I reinstall apache and php both from the source then
I can get ibase_connect to work. There has to be an easier way,
because it is going to break certain things in Suse plus it is
difficult to add new versions etc. I did get rid of the open
failed:permissions error, inside the ibase_connect() before the
database it wanted the ip address(192.168.2.4). I think you told me
to do something like that before and you were right. Thanks.

wanted:
ibase_connect("192.168.2.4:/opt/firebird/anecesis.fdb","SYSDBA",xxx);
versus
ibase_connect("/opt/firebird/anecesis.fdb","SYSDBA",xxx);

If I just compile the interbase.so module using the same version of
php that Suse has running(4.3.3) and copy it into the extensions
dir... apache will just crash when I restart it. No messages at all,
and nothing in /var/log/httpd/error_log. It just says it started and
then.. lo and behold nothing is running and status says it is not
started. Something is wrong with building the module without
recompiling everything else, even though that doesn't make sense. Any
advice?

-Ian