Subject | Re: Request for help -interbase.so |
---|---|
Author | Johan van Zyl |
Post date | 2004-11-15T19:11:27Z |
--- In firebird-php@yahoogroups.com, "David at PFI"
<firebird-php-david@p...> wrote:
I dont konw if this will help you, but this cfm works for me.
I develop on Win 2000 Pro PC with Dreamweaver but the cfm is saved on
Linux Box (SME)
Try http://realwebonline.myftp.org/php/
<html>
<head>
<title> Database Test </title>
</head>
<big><u>Status Report on table USER</u><br></big>
<br>
<table border>
<?php
dl("interbase.so");
print "Connected to";
$host = "/opt/firebird/examples/employee.fdb";
$username = "SYSDBA";
$password = "masterkey";
$dbh = ibase_pconnect ($host, $username, $password);
$stmt = "SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEE";
$sth = ibase_query ($dbh, $stmt);
$time = gettimeofday ();
print " ".$host." at ".$time['sec']." <br>";
?>
<br>
<table border>
<tr>
<td> <b>Name</b></td>
<td> <b>Alias</b></td>
<td> <b>Relation</b></td>
<td> <b>Length</b></td>
<td> <b>Type</b></td>
</tr>
<?php
$coln = ibase_num_fields($sth);
for ($i=0; $i < $coln; $i++)
{
$col_info = ibase_field_info($sth, $i);
print "<tr>\n";
print "<td> ".$col_info['name']." </b></td>";
print "<td> ".$col_info['alias']." </b></td>";
print "<td> ".$col_info['relation']." </b></td>";
print "<td> ".$col_info['length']." </b></td>";
print "<td> ".$col_info['type']." </b></td>";
print "<tr>\n";
}
?>
</table>
<br><br>
<big><u>Table Contents</u></big><br><br>
<table border>
<tr>
<td> <b>First</b></td>
<td> <b>Last</b></td>
</tr>
<?php
while ($row = ibase_fetch_row ($sth))
{ print "<tr>";
print "<td> ".$row[0]. " </b></td>";
print "<td> ".$row[1]. " </b></td>";
print "<tr>";
}
ibase_close ($dbh);
?>
</table>
</html>
<firebird-php-david@p...> wrote:
>Hi
>
> Hello all. I have hit a deadend with compiling the infamous
> interbase.so file.
> Environment=
> Redhat 9.0,
> Apache 2.0.52,
> MySQL 4.0.21,
> PHP 4.3.9
> Codecharge Studio 2.3
> Xampp 1.4.9a
>
> I use the xampp/codecharge environment to develop in.
> (www.apachefriends.org) Although I have tryed to make Firebird 1.5
> work with PHP in even different config I can think of separate from
> Xampp. I must be missing something, because when I follow the
> instructions I have found in various places for compiling PHP with
> interbase aka firebird support, everything says it is supposed to
> reference a interbase.so file in modules/extensions. Well no matter
> how I compile it with make, it never produces this file. Hence PHP
> barfs when it tryed to load the module and it is not there.
>
> Does anyone have a copy of interbase.so that was compiled with the
> above considerations that they could email me? I am assuming that
> this will allow my PHP code to talk to Firebird server side? If I am
> missing something please feel free to comment.
>
> Any help is appreciated.
>
> Thank you,
>
> David
I dont konw if this will help you, but this cfm works for me.
I develop on Win 2000 Pro PC with Dreamweaver but the cfm is saved on
Linux Box (SME)
Try http://realwebonline.myftp.org/php/
<html>
<head>
<title> Database Test </title>
</head>
<big><u>Status Report on table USER</u><br></big>
<br>
<table border>
<?php
dl("interbase.so");
print "Connected to";
$host = "/opt/firebird/examples/employee.fdb";
$username = "SYSDBA";
$password = "masterkey";
$dbh = ibase_pconnect ($host, $username, $password);
$stmt = "SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEE";
$sth = ibase_query ($dbh, $stmt);
$time = gettimeofday ();
print " ".$host." at ".$time['sec']." <br>";
?>
<br>
<table border>
<tr>
<td> <b>Name</b></td>
<td> <b>Alias</b></td>
<td> <b>Relation</b></td>
<td> <b>Length</b></td>
<td> <b>Type</b></td>
</tr>
<?php
$coln = ibase_num_fields($sth);
for ($i=0; $i < $coln; $i++)
{
$col_info = ibase_field_info($sth, $i);
print "<tr>\n";
print "<td> ".$col_info['name']." </b></td>";
print "<td> ".$col_info['alias']." </b></td>";
print "<td> ".$col_info['relation']." </b></td>";
print "<td> ".$col_info['length']." </b></td>";
print "<td> ".$col_info['type']." </b></td>";
print "<tr>\n";
}
?>
</table>
<br><br>
<big><u>Table Contents</u></big><br><br>
<table border>
<tr>
<td> <b>First</b></td>
<td> <b>Last</b></td>
</tr>
<?php
while ($row = ibase_fetch_row ($sth))
{ print "<tr>";
print "<td> ".$row[0]. " </b></td>";
print "<td> ".$row[1]. " </b></td>";
print "<tr>";
}
ibase_close ($dbh);
?>
</table>
</html>