Subject Re: [firebird-php] Firebird 2.0 Beta 2
Author Paul
Lutz Brückner wrote:
> Hi all,
>
> anyone out there who has success with Firebird 2.0 Beta 2 and php? All I
> get when I try to connect with php to a Firebird database is the error
> 'Invalid clumplet buffer structure: buffer end before end of clumplet -
> clumplet too long'. I can connect with isql and the database is freshly
> created with isql. Is it worth deeper investigations or is it just not
> yet supported?
>
> My setup details: Suse 10.0 X86-64, php 5.1.3-dev,
> FirebirdCS-2.0.0.12169-Beta2.amd64.rpm
>
> Thanks, Lutz
>
>
Hi,
Did you ever resolve this?

I am getting the same error with a similar setup. A fresh
os/apache2/php/fb2 install.

System Configuration
Suse 10.0 P4(X86-64) 64 bit kernel
PHP 5.1.4 installed from source
Firebird Classic installed from source
Firebird TCP/IP server version LI-T2.0.0.12654 Firebird 2.0 Release
Candidate 2

Clues ?
1. I get the error above using the following connect setup
$sqldialect=3;
$buffers=32 ;
$connect=ibase_connect($host, $username,
$password,'',$buffers,$sqldialect)
or die("Connect failure ".ibase_errmsg()); <<< dies here
with msg

Connect failure Invalid clumplet buffer structure: buffer end before end
of clumplet - clumplet too long

2. If I set buffers to 0, which according to the php documention "If 0
or omitted, server chooses its own default."
there is no html error message output, but the following error msg in
the apache error_log

FATAL: emalloc(): Unable to allocate -3460768 bytes

in php.ini memory limit is
memory_limit = 16M ; Maximum amount of memory a script may consume

3. If I connect as follows
$qrytxt = 'SELECT LocationNumber,Name FROM Location order by
LocationNumber;';
$connect=ibase_connect($host, $username, $password)
or die("Connect failure
".ibase_errmsg());
$qry=ibase_query($connect,$qrytxt) or die("Query Failure :
".ibase_errmsg());
while ($results=ibase_fetch_row($qry)) << line 34 dies here with
the error msg
*
*Warning: ibase_fetch_row(): supplied argument is not a valid
Firebird/InterBase result resource in
*/.....*public_html/test/altrows.html on line 34*

*4. Occasionaly during testing this weird one :
Warning: ibase_query() : Statement expects 29557 arguments, 0 given in
/....public_html/test/altrows.html on line 32
Query Failure :
no ibase_errmsg().
but this msg in the apache error_log
[Thu Jun 22 ...] [notice] child pid 6644 exit signal Segmentation fault
(11)*
*
5. As with the original message in this thread, all tests so far with
isql have worked flawlessly*

*cheers
Paul*


*