[PHP-DB] compling php against interbase rpm

2003-04-01 Thread May, Patrick
Hello,

I'm having problems getting php installed when I compile it with interbase
support.  I installed interbase using the firebird rom:

FirebirdSS-1.0.2.908-1.i386.rpm

This installs firebird into /opt/interbase.  I configure php with a line
like:

./configure --with-interbase=/opt/interbase
--with-apxs=/usr/local/apache/bin/apxs

Then I happily compile away.  But make test doesn't seem to happy:

=
FAILED TEST SUMMARY
-
InterBase: create test database [ext/interbase/tests/001.phpt]
InterBase: connect, close and pconnect [ext/interbase/tests/002.phpt]
InterBase: misc sql types (may take a while) [ext/interbase/tests/003.phpt]
InterBase: BLOB test [ext/interbase/tests/004.phpt]
InterBase: transactions [ext/interbase/tests/005.phpt]
InterBase: binding (may take a while) [ext/interbase/tests/006.phpt]
=

And when I try to load the libphp4.so module, Apache silently dies.  Any
ideas?

Thanks in advance,

Patrick May


RE: [PHP-DB] MySQL or Postgres

2003-03-24 Thread May, Patrick
Ben,

 Subject: [PHP-DB] MySQL or Postgres
 
 
 Could someone please point me in the correct direction for a decent 
 comparison of the two in respect of:-
 
Reliability
Scalability
Speed
Functionality
 
 These are actually in order or importance to me (I know both 
 are fairly fast).
 
 I am also interested in how easy it would be to migrate from MySQL to 
 Postgress.
 
 Proples general experiences/comments also welcome.

There are other open-source databases besides MySQL and Postgres.  My
experience has pointed me towards firebird / interbase:

http://firebird.sourceforge.net/

~ Patrick


RE: [PHP-DB] Problem retrieving/updating data from InterBase

2003-03-19 Thread May, Patrick
Vincent,

 currently I'm working with an Interbase 6.0 database and I 
 want to insert
 some text (and eventually a picture) to a blob field. I've found the
 following php code:
 
 $bid = ibase_blob_create();
 ibase_blob_add($bid, test);
 $comments_blob = ibase_blob_close($bid);
 $sql = UPDATE tblcontent SET Metadata=? WHERE id=1;
 ibase_query($sql,$comments_blob);
 ibase_commit();
 
 When I try to retrieve this blobdata, I use the following code:
 
 $set = ibase_query(SELECT Metadata FROM tblcontent WHERE ID = 1);
 $row = ibase_fetch_object($set);
 $blob_id = ibase_blob_open($row-Metadata);
 $content = ibase_blob_get($blob_id);
 ibase_blob_close($blob_id);
 ibase_free_result($set);
 
 $content returns an empty string.
 I don't know if it goes wrong updating the data, or 
 retrieving the data.
 Can anybody help me out here

I've experienced flakiness using blobs with php.  I did get it to work,
however.  When I insert my text, I do not use a blob.  When I retrieved the
results, I would use all capital letters for the field name, and I made use
of the ibase_blob_info() function:

$blob_data  = ibase_blob_info( $row-METADATA );
$blob_hndl  = ibase_blob_open( $row-METADATA );
$content= ibase_blob_get(  $blob_hndl, $blob_data[0] ));
  ibase_blob_close( $blob_hndl);

Hope this has some hints,

Patrick May