Using firebird (database) client in php Centos 6.2 and directadmin

cDGo

Verified User
Joined
Sep 21, 2012
Messages
84
Hi I'm trying to get the firebird client working under php on my Centos 6.2 server.
I need to connect to an external up and runninf firebird server from out of a php file.

Some how I did get the Firebird Superserver to install I can see them in the process monitor.
But can't get the client to work.
As a noob with Linux, I am very stuck here.

I do believe I need to put some (libfbclient.so interbase.so???) file into the php.ini file.
And recompile the directadmin php version with firebird support.

Any step by step instruction would be very thankfully received.

Domé
 
Hi Alex,

Thank you very much for responding.

Just another dumb question....
This involves a live server.
How much damage can I do with this...?

And if so, how long will the server be unavailable?
If it doesn't work out ok, can I just remove the --with-interbase entry from custom/ap2/configure.apache and re run the same script?
 
You're welcome.

How much damage can I do with this...?

If you follow the guide and don't mess up the things (normally no downtime should arise), then as the worst scenario it might be that PHP will be re-built without interbase support. That might happen if you are running PHP as CGI, but modifying a file as it said in the guide for mod_php.

If you mess up the things, you might face an issue that Apache won't start, or start without PHP support. In this case, you'll probably need either to rewrite apache configs, or even re-build apache/php.

If it doesn't work out ok, can I just remove the --with-interbase entry from custom/ap2/configure.apache and re run the same script?

Yes, it is a proper way to undone the things.
 
Hi Alex,

I took the dive into the unknown...

One remark with the instruction Adding custom modules is that after the command:
./build clean
./build apache

and before
Then restart apache:

The process does restart httpd it self, so at the point I wanted to stop until qualified backup people where available, it went restarting after all.
Good thing: server still seems to work.
Bad thing: nothing seems to be changed.

As there is a folder named /usr/local/directadmin/custombuild/custom/ap2
Does the comile process knows that it need to use this configure.apache?
And from now on, will the server uses this configure.apache file as default?
Cause the original file wasn't changed.

I changed the /usr/local/directadmin/custombuild/custom/ap2/configure.apache file with:
"--enable-expires" \
"--with-ssl=/usr" \
"--with-interbase=/opt" \
"--enable-headers"

I'm using /opt as there's a folder within /opt/firebird which holds the files for the superserver installation of firebird.

On my test page i still get:
Call to undefined function ibase_connect()

And in my server_info.php page I can't find anything like firebird or interbase.

In the process monitor function of Directadmin I still see:
15221 firebird 20 0 4376 272 44 S 0.0 0.0 0:00.00 /opt/firebird/bin/fbguard -f -p /var/run/firebird/default.pid
15222 firebird 20 0 33792 1364 84 S 0.0 0.1 0:00.17 /opt/firebird/bin/fbserver

So server process is running.
 
As I wrote before, you should make sure, you are using mod_php otherwise you should change another configure file.

What you see with

Code:
./build options
?

Code:
./build used_configs
?
 
Hi Alex,

./build used_configs:
apache configuration file: /usr/local/directadmin/custombuild/custom/ap2/configure.apache
PHP5 configuration file: /usr/local/directadmin/custombuild/configure/ap2/configure.php5

./build options:
Shows a lot, I don't know how to put the output into a file, so here are some settings I see:
Apache: 2.2.22
PHP: 5.2.17 as CLI with mail() header patch
 
Sorry, I've posted a link to a wrong guide, please follow this one:

- Add custom modules to php with custombuild
http://help.directadmin.com/item.php?id=252

The wrong one was for compiling Apache with custom modules. Still nothing wrong with that, so you might want just to remove
/usr/local/directadmin/custombuild/custom/ap2/configure.apache

and copy

/usr/local/directadmin/custombuild/configure/ap2/configure.php5

to

/usr/local/directadmin/custombuild/custom/ap2/configure.php5

and after add your modifications.
 
HI Alex,

Thanks for the update.
I will try that one tommorrow, and get back here with the results.

Domé
 
Back
Top