[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-developers] RaQ4, Interbase, PHP



Hi,

I have been trying a similar thing and the results I have so far are.

To get PHP4 to use the Interbase lib on the RAQ4 do the following.

edit( vi ?) the php.ini file ( found in /etc/httpd ) and uncomment the

# interbase.so

line.

At this point the web server needs to reload the php module , I had to
re-boot the server
but any other suggestions on how to do this would be good.

What you are doing is telling PHP to load the interbase library, it seems to
be commented out
by default so you get the unrecognised function error in php.

Then when connecting to the database, I currently have found the only way
that works is the following.

1. ensure the permissions on the database are 666. ( otherwise you get a
read/write error)
2. Use the ibase_connect statement as follows

  $dbConn = ibase_connect( $dbname, $username, $password);

where $dbase name is the filename and location of the database( you don't
need the tcp/ip connection part
as you are connecting locally( I got an error with it anyway).

$dbConn = ibase_conect( "/opt/interbase/examples/employee.gdb", "SYSDBA",
"masterkey");

( I would change the default SYSDBA password as well)

This worked for me( so far).

Hope this helps,

Steve Rogers



----- Original Message -----
From: <peter.ball@xxxxxxxxxxxx>
To: <cobalt-developers@xxxxxxxxxxxxxxx>
Sent: Sunday, November 19, 2000 8:39 AM
Subject: [cobalt-developers] RaQ4, Interbase, PHP


> Hi, we've got a stock standard Cobalt RaQ4i (preinstalled with PHP &
> Interbase)
>
> PHP & Interbase are working fine separately, but we want to do some web
> pages with db content. However, PHP seems to not be recognizing the
> interbase commands.
>
> Do we have to recompile Apache or PHP or something to get it to work?
>
> If so, does anyone have a step by step like I saw here somewhere for
MySQL?
>
> Also, is or is not the Interbase that's preinstalled up to any (small
scale)
> serious work or is it basically crap?
>
>
>
>
> <?php
>
> $host = "202.3.42.65:/home/opt/interbase/examples/employee.gdb";
> $username = "SYSDBA";
> $password = "masterkey";
>
>
>
> $dbh = ibase_connect ($host,$username,$password);
>     $stmt = 'SELECT * FROM tblname';
>     $sth = ibase_query ($dbh, $stmt);
>     while ($row = ibase_fetch_object ($sth)) {
>       print $row->email . "\n";
>     }
>     ibase_close ($dbh);
> ?>
>
>
> We always get "Call to undefined function: ibase_connect() in
> /home/sites/home/web/Employee.php on line 9" when we load it onto the
> server.
> so we think PHP is not recognizing ibase_connect etc.
> If anyone can fix the above then I'm sure we'll be ok after that.
>
>
> p.s. This works ok ...
> using Telnet
> from [root /root]#  .... typed .....
> /home/opt/interbase/bin/isql
/home/opt/interbase/examples/employee.gdb -USER
> "SYSDBA" -PAS "masterkey"
> returns ...
> SQL>
>
> Then this works OK ...
> SELECT * FROM EMPLOYEE;
> records displayed
>
>
> Regards
>
>
> Peter
>
>
>
> _______________________________________________
> cobalt-developers mailing list
> cobalt-developers@xxxxxxxxxxxxxxx
> http://list.cobalt.com/mailman/listinfo/cobalt-developers