ID: 28728 User updated by: steveh at brendata dot co dot uk Reported By: steveh at brendata dot co dot uk Status: Open Bug Type: DBX related Operating System: linux 2.4.22 PHP Version: 4CVS-20041106 New Comment:
Ok, I've upgraded freetds to 0.62.4 >From the SQL Profiler I can see that the use and the select is being executed on the SQL server. I've successfully run tests using the tsql utility provided with freetds, I'm now at a bit of a loss as to what else to test, it looks like a fairly basic failure? The major difference is that this server is sql2000, whereas our production bugs server is sql6.5(!) Previous Comments: ------------------------------------------------------------------------ [2004-06-14 12:16:49] steveh at brendata dot co dot uk Here's code that reproduces the issue along with the definition of the table (the table is currently empty). <?php function zsql_query($Sql) { $Link=dbx_connect(DBX_SYBASECT, "SALESTRACK", "SalesTracking", "sa", "password", DBX_PERSISTENT); $Result=dbx_query($Link,$Sql); dbx_close($Link); Return $Result; } function zdropdown($Variable,$QueryString,$Selected,$ExtraName="",$ExtraValue="",$SortColumn=2) { $Ret=""; $Result=zsql_query($QueryString." order by $SortColumn asc"); return $Ret; } echo zdropdown("dCM__DefaultInvoice_tblAddressID","select ID,Name from tblAddress",$dCM__DefaultInvoice_tblAddressID," ",-1); ?> I'm going to run some tests on freetds to make sure this isn't a freetds bug. ------------------------------------------------------------------------ [2004-06-11 12:21:52] [EMAIL PROTECTED] keep in feedback status until you've given proper feedback. ------------------------------------------------------------------------ [2004-06-11 11:14:33] steveh at brendata dot co dot uk Sybasect is fine as we're using it directly in our bug tracking system, this is the only system that uses dbx, producing sample code could be difficult, I'll see if I can strip it down to the really basic parts. ------------------------------------------------------------------------ [2004-06-11 10:50:50] [EMAIL PROTECTED] Can you check if using the sybasect ext directly doesn't have this problem? And can you provide some sample code? ------------------------------------------------------------------------ [2004-06-11 10:45:47] steveh at brendata dot co dot uk Here's the backtrace: #0 0x081fd020 in _zval_ptr_dtor (zval_ptr=0x863fbb8, __zend_filename=0x82351c0 "/usr/src/php4-STABLE-200406110630/ext/dbx/dbx_sybasect.c", __zend_lineno=198) at /usr/src/php4-STABLE-200406110630/Zend/zend_execute_API.c:289 #1 0x08099960 in dbx_sybasect_getcolumnname (rv=0xbfff94e4, result_handle=0xbfff951c, column_index=0, ht=2, return_value=0x84ffcf4, this_ptr=0x0, return_value_used=1) at /usr/src/php4-STABLE-200406110630/ext/dbx/dbx_sybasect.c:198 #2 0x08093729 in switch_dbx_getcolumnname (rv=0xbfff94e4, result_handle=0xbfff951c, column_index=0, ht=2, return_value=0x84ffcf4, this_ptr=0x0, return_value_used=1, dbx_module=0x863e8a8) at /usr/src/php4-STABLE-200406110630/ext/dbx/dbx.c:835 #3 0x08091d17 in zif_dbx_query (ht=2, return_value=0x84ffcf4, this_ptr=0x0, return_value_used=1) at /usr/src/php4-STABLE-200406110630/ext/dbx/dbx.c:489 #4 0x0821adf7 in execute (op_array=0x84e3d00) at /usr/src/php4-STABLE-200406110630/Zend/zend_execute.c:1635 #5 0x0821b02a in execute (op_array=0x84f7740) at /usr/src/php4-STABLE-200406110630/Zend/zend_execute.c:1679 #6 0x0821b02a in execute (op_array=0x84a8240) at /usr/src/php4-STABLE-200406110630/Zend/zend_execute.c:1679 #7 0x0821b02a in execute (op_array=0x84a72f4) at /usr/src/php4-STABLE-200406110630/Zend/zend_execute.c:1679 #8 0x08208980 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src/php4-STABLE-200406110630/Zend/zend.c:891 #9 0x081cf78a in php_execute_script (primary_file=0xbffffab0) at /usr/src/php4-STABLE-200406110630/main/main.c:1731 #10 0x0822ad62 in main (argc=2, argv=0xbffffb54) at /usr/src/php4-STABLE-200406110630/sapi/cli/php_cli.c:822 #11 0x402a9657 in __libc_start_main (main=0x822a138 <main>, argc=2, ubp_av=0xbffffb54, init=0x8076790 <_init>, fini=0x82308c0 <_fini>, rtld_fini=0x4000dc54 <_dl_fini>, stack_end=0xbffffb4c) at ../sysdeps/generic/libc-start.c:129 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/28728 -- Edit this bug report at http://bugs.php.net/?id=28728&edit=1