LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Firebird+PHP+Fedora C2 (https://www.linuxquestions.org/questions/fedora-35/firebird-php-fedora-c2-185245/)

z_darius 05-24-2004 11:04 AM

Firebird+PHP+Fedora C2
 
For those who were looking for answers but couldn fiind them:

1- .Install Fedora selecting Web Server in the list of packages.
This installs Php and Apache.
2..- 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. For example
/home/me
5..- Swicth to php-4.3.5
# cd /home/me/php-4.3.5
6..- Configure PHP for interbase/firebird support
# ./configure --with-interbase=shared,/opt/interbase
# make

Theses generate the interbase.so library in the
/home/me/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
10.[/B].- Start or Restart (if it running) Apache Server
# service httpd start
11..- Create the following script:
<?
$conn = ibase_connect("localhost:/opt/interbase/examples/employee.gdb","sysdba","masterkey");
$sql = "select * from customer";
$res = ibase_query($sql);
while ($row = ibase_fetch_row($res)) {
echo $row[0].' '.$row[1].'<br />';
}
?>
12..- Save the script in /var/www/html as fbtest.php
13..- Navigate to http://yourwebserver/fbtest.php in you browser
14.. You will see result of the query.


All times are GMT -5. The time now is 05:58 PM.