ID: 46798 Updated by: [EMAIL PROTECTED] Reported By: v dot orlov at ulab dot ru -Status: Open +Status: Feedback Bug Type: MSSQL related Operating System: FreeBSD 6.3 PHP Version: 5.2.7 New Comment:
What is the value of NewsID when a query is executed, is it NULL? Previous Comments: ------------------------------------------------------------------------ [2008-12-08 17:49:33] v dot orlov at ulab dot ru Description: ------------ When exec simple queries to 'MS SQL 2000' I encounter warnings about memory leaks in apache error log, see below. Versions: System FreeBSD 6.3 i386 freetds-0.64_2 (from ports) apache 1.3.41 php 5.2.6 (5.2.7 has been removed from distribution) suhosin patch 5.2.6-0.9.6.2 apache & php builded manually (not from ports) Note: without suhosin patch call mssql_query crashing apache (segfault). Reproduce code: --------------- ./configure --with-mssql=/usr/local --with-unixODBC --with-apxs=/www/bin/apxs --enable-session --with-iconv --with-mm --with-pcre-regex --with-pcre-dir --with-gd --with-png-dir --prefix=/www --enable-debug code like: msql_connect("dbserver") $res = mssql_query("select NewsID from News"); Expected result: ---------------- workable mssql module Actual result: -------------- error log with suhosin patch and --debug flag /root/apache-install/php-5.2.6/Zend/zend_variables.h(35) : Block 0x08123528 status: /root/apache-install/php-5.2.6/Zend/zend_variables.c(36) : Actual location (location was relayed) Beginning: OK (allocated on /root/apache-install/php-5.2.6/ext/mssql/php_mssql.c:980, 5 bytes) Start: OK End: Overflown (magic=0x00000000 instead of 0xFBA28207) 1 byte(s) overflown --------------------------------------- [Mon Dec 8 19:55:01 2008] Script: '/usr/local/www/infopin/index.php' --------------------------------------- /root/apache-install/php-5.2.6/Zend/zend_variables.h(35) : Block 0x08123498 status: /root/apache-install/php-5.2.6/Zend/zend_variables.c(36) : Actual location (location was relayed) Beginning: OK (allocated on /root/apache-install/php-5.2.6/ext/mssql/php_mssql.c:980, 5 bytes) Start: OK End: Overflown (magic=0x00000000 instead of 0xFBA28207) 1 byte(s) overflown --------------------------------------- [Mon Dec 8 19:55:01 2008] Script: '/usr/local/www/infopin/index.php' /root/apache-install/php-5.2.6/ext/mssql/php_mssql.c(980) : Freeing 0x0810F1B0 (5 bytes), script=/usr/local/www/infopin/index.php Last leak repeated 16 times === Total 17 memory leaks detected === ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46798&edit=1