From: michaelc at mikeit dot com dot au
Operating system: Win32
PHP version: 4.3.3
PHP Bug Type: ODBC related
Bug description: SQLExtendedFetch() vs SQLFetch()

Description:
------------
Trying to write a php gtk frontend to a MYOB (manage your own business)
database.

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

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:
---------------
<?php

if (!class_exists('gtk')) {
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')
dl('php_gtk.dll');
else
dl('php_gtk.so');
}

function delete_event()
{
return false;
}

$connectionstring = odbc_connect("MYOB","michaelc","") or
die(odbc_error());

$query = "SELECT * FROM Cards";

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

odbc_close($connectionstring);

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


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

/* Run the main loop. */
Gtk::main();

?>

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 bug report at [url]http://bugs.php.net/?id=25505&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=25505&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=25505&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=25505&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=25505&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=25505&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=25505&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=25505&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=25505&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=25505&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=25505&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=25505&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=25505&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=25505&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=25505&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=25505&r=gnused[/url]