Subject [Fwd: [firebird-php] Re: PHP5 with Firebird2 on Fedora4 Installation Error]
Author Albert Irawan
Hallo Friend,

I have already connected Firebird from PHP :
<?
$host = 'development.ciputra.ac.id:/var/lib/firebird2/data/UC.FDB';
$username = "SYSDBA";
$password = "masterkey";
$conn = ibase_connect ($host,$username,$password) or die ("error in db
connect");

//Connect Stored Procedured in PHP
$stmt="SELECT * FROM
SPAC_AR_GENERATOR('$id_company','$id_dept','$id','$ar_date','$due_date','$code_ar','$total','$description','$range','$id_termin')";

$sth=ibase_query($conn,$stmt) or die (ibase_errmsg());
while ($row=ibase_fetch_object($sth))
{
if ($row-> CIDAR !=null)
{
}
}

?>

Maybe this code can be help. Thx

Albert Irawan
(+62-31-741390)

---------------------------- Original Message ----------------------------
Subject: [firebird-php] Re: PHP5 with Firebird2 on Fedora4 Installation Error
From: "lee_domain" <lee_domain@...>
Date: Tue, September 18, 2007 08:28
To: firebird-php@yahoogroups.com
--------------------------------------------------------------------------

--- In firebird-php@yahoogroups.com, "lee_domain" <lee_domain@...> wrote:
>
> I am trying to build a Bird Nets with
> FirebirdSS-2.1x + Apache-2.2.4 + PHP-5.2.3
> Problem comes when
> LoadModule module_php5 modules/libphp5.so
> is added to httpd.conf
------------------------------

With the help of many Firebird lovers, I have found a work-around,
thanks to you all.

Following is a test:

<!-- connect to a firebirdb database and select something:
consel_fb.php --->

<?php

//connect to a database on fb server FBSS-2.1
$srv_db = 'localhost:/home/myname/employee.fdb';
$usrname = 'sysdba';
$pswd = 'masterkey';

// get and report connection result
$conn = fbird_connect($srv_db, $usrname, $pswd);
echo $conn."<br>";

// issue SQL query command, show returned results on console
// particularly test some FB2.0/2.1 additionals, such as ROWS

$sql = 'SELECT COUNTRY FROM COUNTRY ROWS 2 To 5';
$res = fbird_query($conn, $sql);
while ( $row = fbird_fetch_object($res) )
{
echo $row->COUNTRY."<br>";
}

// relaese the results
fbird_free_result($res);

// close the connected database, and report result
$closedb = fbird_close($conn);
echo $closedb;

?>

Resource id #2
England
Canada
Switzerland
Japan
1

Of course the work-around is still far away from perfection, needing
some improvements, and more test.

If you would like to test any other php script on FB2.1, please post
them here, it will be a pleasure for me to test it together with you.

Thanks to you all again
Yours
O'Li




___DISCLAIMER___
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent Universitas Ciputra as an academic institution. Finally, the recipient should check this email and any attachments for the presence of viruses. Universitas Ciputra accepts no liability for any damage caused by any virus transmitted by this email.


[Non-text portions of this message have been removed]