ID: 43578 Updated by: j...@php.net Reported By: schulmat at cms dot hu-berlin dot de -Status: Analyzed +Status: Feedback Bug Type: Sybase-ct (ctlib) related Operating System: Solaris 9/10 PHP Version: 5.2.5 Assigned To: thekid New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [2008-11-09 10:47:01] the...@php.net I added a testcase for this bug but am currently not able to reproduce this issue. See: http://cvs.php.net/viewvc.cgi/php-src/ext/sybase_ct/tests/bug43578.phpt?revision=1.1.2.1&view=markup&pathrev=PHP_5_3 ------------------------------------------------------------------------ [2007-12-12 10:28:24] schulmat at cms dot hu-berlin dot de Description: ------------ The problem can reproduced on Solaris 9 and Solaris 10. If I compile php with ./configure \ --prefix=/usr/local/wwwbin/php-5.2.5 \ --with-apxs2=/usr/local/wwwbin/apache/bin/apxs \ (Apache 2.2.6) --with-sybase-ct=/opt/csw (freetds-version 0.64 from blastwave) and perform this simple query: select DC_Rights from Resource R where R.Resource_ID = 123; (DC_Rights type text, Resource_ID = 123 exists, should return "(empty) not NULL, works via tsql) i get "Incurred fault #6". Reproduce code: --------------- <?php require("DBConnection.cls.php"); // database connection $db=new DBConnection(); // new object $test = "set textsize 262144"; echo $test."<br />"; //$db->submitQuery($test); flush(); $query = "select DC_Rights from Resource R where R.Resource_ID = 122"; // expected Result: NULL flush(); $res_id = $db->submitQuery($query); // works! $query = "select DC_Rights from Resource R where R.Resource_ID = 123"; // expected Result: "" flush(); $res_id = $db->submitQuery($query); // doesn't work. Apache: Segmentation fault (11) echo "done!"; flush(); exit(); ?> Expected result: ---------------- set textsize 262144 select DC_Rights from Resource R where R.Resource_ID = 122 select DC_Rights from Resource R where R.Resource_ID = 123 done! Actual result: -------------- Output: Warning: sybase_connect() [function.sybase-connect]: Sybase: Server message: Changed client character set setting to 'iso_1'. (severity 10, procedure N/A) in /usr/local/htdocs/DBConnection.cls.php on line 7 Warning: sybase_connect() [function.sybase-connect]: Sybase: Server message: Changed database context to 'metadb'. (severity 10, procedure N/A) in /usr/local/htdocs/DBConnection.cls.php on line 7 Warning: sybase_select_db() [function.sybase-select-db]: Sybase: Server message: Changed database context to 'metadb'. (severity 10, procedure N/A) in /usr/local/htdocs/DBConnection.cls.php on line 10 set textsize 262144 select DC_Rights from Resource R where R.Resource_ID = 27397 select DC_Rights from Resource R where R.Resource_ID = 20676 truss output php-cli: time() = 1197455005 pollsys(0xFFBFE900, 1, 0x00000000, 0x00000000) = 1 read(4, "FD\0\0\002\0\0\0\0", 9) = 9 time() = 1197455005 time() = 1197455005 sigaction(SIGPIPE, 0xFFBFEBA0, 0xFFBFEC40) = 0 pollsys(0xFFBFEBE8, 1, 0x00000000, 0x00000000) = 1 write(4, "0F01\018\0\0\0\0 !\0\0\0".., 24) = 24 sigaction(SIGPIPE, 0xFFBFEBA0, 0xFFBFEC40) = 0 time() = 1197455005 pollsys(0xFFBFEA08, 1, 0x00000000, 0x00000000) = 1 read(4, "0401\0 r\0\0\0\0", 8) = 8 time() = 1197455005 time() = 1197455005 pollsys(0xFFBFEA08, 1, 0x00000000, 0x00000000) = 1 read(4, "E3\00F0106 m e t a d b06".., 106) = 106 time() = 1197455005 write(1, "\n W a r n i n g : s y".., 177) = 177 Warning: sybase_select_db(): Sybase: Server message: Changed database context to 'metadb'. (severity 10, procedure N/A) in /usr/local/htdocs/DBConnection.cls.php on line 10 write(1, " s e l e c t D C _ R i".., 64) = 64 time() = 1197453664 sigaction(SIGPIPE, 0xFFBFEBA0, 0xFFBFEC40) = 0 pollsys(0xFFBFEBE8, 1, 0x00000000, 0x00000000) = 1 write(4, "0F01\0 J\0\0\0\0 !\0\0\0".., 74) = 74 sigaction(SIGPIPE, 0xFFBFEBA0, 0xFFBFEC40) = 0 time() = 1197453664 pollsys(0xFFBFEA08, 1, 0x00000000, 0x00000000) = 1 read(4, "0401\0 ;\0\0\0\0", 8) = 8 time() = 1197453664 time() = 1197453664 pollsys(0xFFBFEA08, 1, 0x00000000, 0x00000000) = 1 read(4, "EE\0 !\001\t D C _ R i g".., 51) = 51 time() = 1197453664 write(1, " s e l e c t D C _ R i".., 64) = 64 time() = 1197453664 sigaction(SIGPIPE, 0xFFBFEBA0, 0xFFBFEC40) = 0 pollsys(0xFFBFEBE8, 1, 0x00000000, 0x00000000) = 1 write(4, "0F01\0 J\0\0\0\0 !\0\0\0".., 74) = 74 sigaction(SIGPIPE, 0xFFBFEBA0, 0xFFBFEC40) = 0 time() = 1197453664 pollsys(0xFFBFEA08, 1, 0x00000000, 0x00000000) = 1 read(4, "0401\0 W\0\0\0\0", 8) = 8 time() = 1197453664 time() = 1197453664 pollsys(0xFFBFEA08, 1, 0x00000000, 0x00000000) = 1 read(4, "EE\0 !\001\t D C _ R i g".., 79) = 79 time() = 1197453664 Incurred fault #6, FLTBOUNDS %pc = 0xFEC40E48 siginfo: SIGSEGV SEGV_MAPERR addr=0x004DE000 Received signal #11, SIGSEGV [default] siginfo: SIGSEGV SEGV_MAPERR addr=0x004DE000 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43578&edit=1