ID: 25505
Updated by: [email][/email]
Reported By: michaelc at mikeit dot com dot au
Status: Feedback
Bug Type: ODBC related
Operating System: Win32
PHP Version: 4.3.3
New Comment:

Following ODBC spec's ExtendedFetch is required for API conformance
Level2, the minimum PHP supports (I believe). You should probably
contact the MYOB people and inform them to use a fully compliant ODBC
driver, such as the Microsoft one.

That being said you can also just set HAVE_SQL_EXTENDED_FETCH to 0 and
life should be golden for you to bypass this.

Previous Comments:

[2003-09-11 22:23:13] [email][/email]

What would '(gdb) bt' (bt, as in backtrace) output?
That small part of it looks more like the MYOB crashes rather than


[2003-09-11 22:08:00] michaelc at mikeit dot com dot au

Ran GDB under cygwin for the script:

(gdb) run odbc_test.php
Starting program: /cygdrive/c/php4/php.exe odbc_test.php
---Type <return> to continue, or q <return> to quit---

Program received signal SIGSEGV, Segmentation fault.
0x01c7e090 in MYOBSp32!_AppDebugInfoEnable4 ()


[2003-09-11 21:32:50] michaelc at mikeit dot com dot au

Trying to write a php gtk frontend to a MYOB (manage your own business)

They provide a suitably crippled ODBC driver, which via Perl, I can
determine that it supports only SQLFetch, rather than PHP's default of

I know how to recompile on linux to change PHP's behavious, but how
would I do this on Win32 ? Is there an .ini flag, or SQL command option
I can set to work around this ?

Is there any chance of getting PHP to implement a flag as to what SQL
fetch command it uses for ODBC ?

Not that that the exec function actually works, and returns data, and
the program works correctly up until I terminate where I get the error
message on exit.

Reproduce code:

if (!class_exists('gtk')) {
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')

function delete_event()
return false;

$connectionstring = odbc_connect("MYOB","michaelc","") or

$query = "SELECT * FROM Cards";

$queryexe = odbc_do($connectionstring, $query);


$window = &new GtkWindow();
$window->connect_object('destroy', array('gtk', 'main_quit'));
$window->connect('delete-event', 'delete_event');

$window->set_title('PHP Rules!');
$window->set_usize(150, 200);

/* Run the main loop. */


Actual result:
The instruction at "0x01c7e090" referenced memory at "0x01ca5170". The
memory could not be "read".

On exit of program, program runs successful until this point.


Edit this bug report at [url][/url]