Professional Web Applications Themes

#25505 [Opn->Fbk]: SQLExtendedFetch() vs SQLFetch() - PHP Development

ID: 25505 Updated by: [email]sniperphp.net[/email] Reported By: michaelc at mikeit dot com dot au -Status: Open +Status: Feedback Bug Type: ODBC related Operating System: Win32 PHP Version: 4.3.3 New Comment: What would '(gdb) bt' (bt, as in backtrace) output? That small part of it looks more like the MYOB crashes rather than PHP.. Previous Comments: ------------------------------------------------------------------------ [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 ...

  1. #1

    Default #25505 [Opn->Fbk]: SQLExtendedFetch() vs SQLFetch()

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

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



    Previous Comments:
    ------------------------------------------------------------------------

    [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

    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 this bug report at [url]http://bugs.php.net/?id=25505&edit=1[/url]
    sniper@php.net Guest

  2. #2

    Default #25505 [Opn->Fbk]: SQLExtendedFetch() vs SQLFetch()

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

    Not that I know of. It will require a recompile to insert this change.


    Previous Comments:
    ------------------------------------------------------------------------

    [2003-09-16 00:39:12] michaelc at mikeit dot com dot au

    Will the windows version heed windows system variables ?
    Will try the next time I boot across to win32.

    ------------------------------------------------------------------------

    [2003-09-11 23:30:06] [email]kalowskyphp.net[/email]

    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.

    ------------------------------------------------------------------------

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

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


    ------------------------------------------------------------------------

    [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

    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 this bug report at [url]http://bugs.php.net/?id=25505&edit=1[/url]
    kalowsky@php.net Guest

Similar Threads

  1. #25505 [Fbk->NoF]: SQLExtendedFetch() vs SQLFetch()
    By sniper@php.net in forum PHP Development
    Replies: 0
    Last Post: September 22nd, 11:17 AM
  2. #25505 [Fbk->Opn]: SQLExtendedFetch() vs SQLFetch()
    By michaelc at mikeit dot com dot au in forum PHP Development
    Replies: 0
    Last Post: September 16th, 04:41 AM
  3. #25505 [Fbk]: SQLExtendedFetch() vs SQLFetch()
    By kalowsky@php.net in forum PHP Development
    Replies: 0
    Last Post: September 12th, 03:31 AM
  4. #25505 [NEW]: SQLExtendedFetch() vs SQLFetch()
    By michaelc at mikeit dot com dot au in forum PHP Development
    Replies: 0
    Last Post: September 12th, 01:34 AM
  5. SQLColumns works but SQLFetch returns no data.
    By jim.brown in forum IBM DB2
    Replies: 1
    Last Post: August 4th, 03:40 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139