Subject Re: [ib-support] Digest Number 1113
Author Milan Babuskov
> From: "jaak_simm" <jaak_simm@...>
> Subject: using Firebird for web apps (with php)
>
> Hi Firebird devs/users,
> I'm considering using Firebird for my next web project, cause I
> found that FB supports such thing as stored procedures (non-existent
> in mysql). I've successfully set up firebird with apache+php on a
> linux box. My problem is the slow speed of opening db-connections
> (around 500ms). I found that php has a possibility to have
> persistent connections to FB with ibase_pconnect(). But the idle
> connections are closed after a couple of hours.

Well I'm not sure if keeping connection alive for days is a good thing to
do. Besides, only the first connection takes 500ms.

> Is there a way to leave idle persistent connections open for a
> longer period or is it a problem of PHP implementation. Though, I
> could use an ugly solution of creating a script that regularly
> queries the database and keeps the connections alive.

I think i read somwhere that there is a possiblity to change the timeout,
but can't recall where. It's a PHP implementation. I just looked at php.ini
file, but found nothing.

> Are there some other useful tips when using FB as a web backend? Any
> documentation/tutorials for that?

Maybe one thing, when doing database maintenace or changing of database
structure (metadata), you should be the only user connected to database at
the time or you'll get those: "object is in use" errors. So when doing this,
be prepared for downtime... I don't know about the nature of your
application, though. I have a web aplication (intranet) running for a few
months (Apache+PHP+FB), so if you have some specific questions, just ask.

HTH,
Milan.