Subject | It works!! PHP+Firebird (1.0) in Linux Fedora Core 2. |
---|---|
Author | Kamus |
Post date | 2004-05-23T00:19:26Z |
I have working Php and Firebird "1.0". With 1.5 it fails for me.
I use the new Fedora Core 2, also works with RedHat 9.
These are the steps:
1.- Install Fedora selecting Web Server in the list of packages.
This install Php and Apache.
2.- After install Linux, you must install Firebird. As root
# rpm -Uvh FirebirdSS-1.0.3.972-0.i386.rpm
Default install path is /opt/interbase
The server of firebird is running now.
3.- Download the source code of PHP (php-4.3.5.tar.bz2)
4.- Extract the source code to any path. By example
/home/julio
5.- Go to extracted files
# cd /home/julio/php-4.3.5
6.- Compile PHP for interbase/firebird support
# ./configure --with-interbase=shared,/opt/interbase
# make
This steps generates the interbase.so library in the
/home/julio/php-4.3.5/modules
7.- Copy the interbase.so to /usr/lib/php4
# cp modules/interbase.so /usr/lib/php4
8.- Go to /etc/php.d and create the file interbase.ini
# cd /etc/php.d
# touch interbase.ini
9.- Edit the interbase.ini file and add this line:
extension=interbase.so
** You can use vi or mcedit to do this.
10.- Start or Restart (if it running) Apache Server
# service httpd start
11.- Create the following script:
<?
$cnx = ibase_connect("localhost:/opt/interbase/examples/employee.gdb",
"sysdba","masterkey"); //this in one line
$sql = "select * from customer";
$res = ibase_query($sql);
while ($fila = ibase_fetch_row($res)) {
echo $fila[0].' '.$fila[1].'<br />';
}
?>
12.- Save the script in /var/www/html as fbconexion.php
13.- Run the script in the web navigator
http://localhost/fbconexion.php
And you can see this:
1001 Signature Design
1002 Dallas Technologies
1003 Buttle, Griffith and Co.
1004 Central Bank
1005 DT Systems, LTD.
1006 DataServe International
1007 Mrs. Beauvais
1008 Anini Vacation Rentals
1009 Max
1010 MPM Corporation
1011 Dynamic Intelligence Corp
1012 3D-Pad Corp.
1013 Lorenzi Export, Ltd.
1014 Dyno Consulting
1015 GeoTech Inc.
14.- Have fun with Php and Firebird 1.0 in Linux :DD
_____________________________________
Julio Carlos Canaviri C.
e-mail : e18278@...
Linux Registered User #306526
_____________________________________
I use the new Fedora Core 2, also works with RedHat 9.
These are the steps:
1.- Install Fedora selecting Web Server in the list of packages.
This install Php and Apache.
2.- After install Linux, you must install Firebird. As root
# rpm -Uvh FirebirdSS-1.0.3.972-0.i386.rpm
Default install path is /opt/interbase
The server of firebird is running now.
3.- Download the source code of PHP (php-4.3.5.tar.bz2)
4.- Extract the source code to any path. By example
/home/julio
5.- Go to extracted files
# cd /home/julio/php-4.3.5
6.- Compile PHP for interbase/firebird support
# ./configure --with-interbase=shared,/opt/interbase
# make
This steps generates the interbase.so library in the
/home/julio/php-4.3.5/modules
7.- Copy the interbase.so to /usr/lib/php4
# cp modules/interbase.so /usr/lib/php4
8.- Go to /etc/php.d and create the file interbase.ini
# cd /etc/php.d
# touch interbase.ini
9.- Edit the interbase.ini file and add this line:
extension=interbase.so
** You can use vi or mcedit to do this.
10.- Start or Restart (if it running) Apache Server
# service httpd start
11.- Create the following script:
<?
$cnx = ibase_connect("localhost:/opt/interbase/examples/employee.gdb",
"sysdba","masterkey"); //this in one line
$sql = "select * from customer";
$res = ibase_query($sql);
while ($fila = ibase_fetch_row($res)) {
echo $fila[0].' '.$fila[1].'<br />';
}
?>
12.- Save the script in /var/www/html as fbconexion.php
13.- Run the script in the web navigator
http://localhost/fbconexion.php
And you can see this:
1001 Signature Design
1002 Dallas Technologies
1003 Buttle, Griffith and Co.
1004 Central Bank
1005 DT Systems, LTD.
1006 DataServe International
1007 Mrs. Beauvais
1008 Anini Vacation Rentals
1009 Max
1010 MPM Corporation
1011 Dynamic Intelligence Corp
1012 3D-Pad Corp.
1013 Lorenzi Export, Ltd.
1014 Dyno Consulting
1015 GeoTech Inc.
14.- Have fun with Php and Firebird 1.0 in Linux :DD
_____________________________________
Julio Carlos Canaviri C.
e-mail : e18278@...
Linux Registered User #306526
_____________________________________