#22403 [Asn]: PHP crashes when executing a sql procedure without parameters
ID: 22403 User updated by: cesararnold at yahoo dot com dot br Reported By: cesararnold at yahoo dot com dot br Status: Assigned Bug Type: Sybase-ct (ctlib) related Operating System: * PHP Version: 4.3.2-dev Assigned To: thekid New Comment: I´m sorry. I´m not a php developer and wouldn´t get access to php c code. Is there a patch available on php.net ? Thanks. Previous Comments: [2004-01-18 12:01:27] [EMAIL PROTECTED] Please try out the patch available at http://sitten-polizei.de/php/bug_22403.patch This should fix it. [2003-07-15 09:58:18] cesararnold at yahoo dot com dot br Hi, seems to be a question that is causing problems to more users, crasing different web servers, and others OS than the initial related case. So, is there a response that sounds better coming from the php maintenance group ? Thanks. [2003-07-15 07:28:49] daniel dot beet at accuratesoftware dot com I am experiencing crashes with Apache 1.3.26, IBM HTTP (1.3.19.5) IIS 5, PHP 4.3.2 Sybase 12.5 on Windows 2000. This occurs when executing a stored procedure, but when the user does not have execute privilages. I get the following error in the error log: PHP Warning: sybase_query(): Sybase: Server message: EXECUTE permission denied on object STORED_PROC, database DATABASE, owner dbo (severity 14, procedure STORED_PROC) in c:\cvsdata\test\test_db_connection.php on line 177 Then the webserver crashes restarts. This is not ideal. Line 177 has the function sybase_query() If I change the query to a SP that the user does have execute privilages on, everything works OK. If I cause a deliberate error such as execution a SP that does not exist, the error is returned as normal with no crash. Has anyone else seen this behaviour? [2003-06-23 06:22:15] v at sas dot nsk dot su Hello! I got same problem with PHP4.2.3 and Sybase 11.9.2 under Linux (sybase as sybase-ct module). If I make wring paramthers when call Stored procdure (such as types mismatch), I got seg fault instead error message. Linux/Mandrake 7.2 Apache 1.3.27 PHP 4.3.2. NB: I never seen this seg faults in PHP 4.2.3 Waiting for fix. vladimir. [2003-06-02 14:58:46] cesararnold at yahoo dot com dot br Hi, we still waiting for the fix. Sometimes we must restart the web server and this is causing some problems to the users and mainly for our customers. What to say to the customers when web server stops sometimes regarding a php error ? I got more info if can help. The problem happens not only when the procedure receives null parameters for non null arguments. If, in a procedure code, for example, I create a temporary table and it have fields that does not accept null values and, when inserting rows with null values into non null fields, the same problem happens. PHP stops the web server. Sybase just returns error (-6) advising that the field does not accept null values ... We know that this is a error on the logics of the procedure and can be fixed by the programmer, fixing the code and recompiling the procedure and so on. We know that you are doing the best, but on my single oppinion, it's a problem to be fixed urgently. Are there any news about this bug fix ? Thanks again. 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/22403 -- Edit this bug report at http://bugs.php.net/?id=22403edit=1
#22403 [Asn]: PHP crashes when executing a sql procedure without parameters
ID: 22403 Updated by: [EMAIL PROTECTED] Reported By: cesararnold at yahoo dot com dot br Status: Assigned Bug Type: Sybase-ct (ctlib) related Operating System: * PHP Version: 4.3.2-dev Assigned To: thekid New Comment: Please try out the patch available at http://sitten-polizei.de/php/bug_22403.patch This should fix it. Previous Comments: [2003-07-15 09:58:18] cesararnold at yahoo dot com dot br Hi, seems to be a question that is causing problems to more users, crasing different web servers, and others OS than the initial related case. So, is there a response that sounds better coming from the php maintenance group ? Thanks. [2003-07-15 07:28:49] daniel dot beet at accuratesoftware dot com I am experiencing crashes with Apache 1.3.26, IBM HTTP (1.3.19.5) IIS 5, PHP 4.3.2 Sybase 12.5 on Windows 2000. This occurs when executing a stored procedure, but when the user does not have execute privilages. I get the following error in the error log: PHP Warning: sybase_query(): Sybase: Server message: EXECUTE permission denied on object STORED_PROC, database DATABASE, owner dbo (severity 14, procedure STORED_PROC) in c:\cvsdata\test\test_db_connection.php on line 177 Then the webserver crashes restarts. This is not ideal. Line 177 has the function sybase_query() If I change the query to a SP that the user does have execute privilages on, everything works OK. If I cause a deliberate error such as execution a SP that does not exist, the error is returned as normal with no crash. Has anyone else seen this behaviour? [2003-06-23 06:22:15] v at sas dot nsk dot su Hello! I got same problem with PHP4.2.3 and Sybase 11.9.2 under Linux (sybase as sybase-ct module). If I make wring paramthers when call Stored procdure (such as types mismatch), I got seg fault instead error message. Linux/Mandrake 7.2 Apache 1.3.27 PHP 4.3.2. NB: I never seen this seg faults in PHP 4.2.3 Waiting for fix. vladimir. [2003-06-02 14:58:46] cesararnold at yahoo dot com dot br Hi, we still waiting for the fix. Sometimes we must restart the web server and this is causing some problems to the users and mainly for our customers. What to say to the customers when web server stops sometimes regarding a php error ? I got more info if can help. The problem happens not only when the procedure receives null parameters for non null arguments. If, in a procedure code, for example, I create a temporary table and it have fields that does not accept null values and, when inserting rows with null values into non null fields, the same problem happens. PHP stops the web server. Sybase just returns error (-6) advising that the field does not accept null values ... We know that this is a error on the logics of the procedure and can be fixed by the programmer, fixing the code and recompiling the procedure and so on. We know that you are doing the best, but on my single oppinion, it's a problem to be fixed urgently. Are there any news about this bug fix ? Thanks again. [2003-04-18 20:37:54] [EMAIL PROTECTED] Have been able to reproduce with sybase libraries. As these are not available on FreeBSD, I use FreeTDS, which does not produce a status result in this situation (return status = -6) but rather issues a CS_CMD_FAIL instantly. I know where the problem is (php_sybase_finish_results), fixing it is not trivial though (I've already given it a first shot but gave up after the supposed fix caused a segfault in another place:)). I'll do my best and see if I can include the fix in 4.3.2. 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/22403 -- Edit this bug report at http://bugs.php.net/?id=22403edit=1
#22403 [Asn]: PHP crashes when executing a sql procedure without parameters
ID: 22403 User updated by: cesararnold at yahoo dot com dot br Reported By: cesararnold at yahoo dot com dot br Status: Assigned Bug Type: Sybase-ct (ctlib) related Operating System: * PHP Version: 4.3.2-dev Assigned To: thekid New Comment: Hi, seems to be a question that is causing problems to more users, crasing different web servers, and others OS than the initial related case. So, is there a response that sounds better coming from the php maintenance group ? Thanks. Previous Comments: [2003-07-15 07:28:49] daniel dot beet at accuratesoftware dot com I am experiencing crashes with Apache 1.3.26, IBM HTTP (1.3.19.5) IIS 5, PHP 4.3.2 Sybase 12.5 on Windows 2000. This occurs when executing a stored procedure, but when the user does not have execute privilages. I get the following error in the error log: PHP Warning: sybase_query(): Sybase: Server message: EXECUTE permission denied on object STORED_PROC, database DATABASE, owner dbo (severity 14, procedure STORED_PROC) in c:\cvsdata\test\test_db_connection.php on line 177 Then the webserver crashes restarts. This is not ideal. Line 177 has the function sybase_query() If I change the query to a SP that the user does have execute privilages on, everything works OK. If I cause a deliberate error such as execution a SP that does not exist, the error is returned as normal with no crash. Has anyone else seen this behaviour? [2003-06-23 06:22:15] v at sas dot nsk dot su Hello! I got same problem with PHP4.2.3 and Sybase 11.9.2 under Linux (sybase as sybase-ct module). If I make wring paramthers when call Stored procdure (such as types mismatch), I got seg fault instead error message. Linux/Mandrake 7.2 Apache 1.3.27 PHP 4.3.2. NB: I never seen this seg faults in PHP 4.2.3 Waiting for fix. vladimir. [2003-06-02 14:58:46] cesararnold at yahoo dot com dot br Hi, we still waiting for the fix. Sometimes we must restart the web server and this is causing some problems to the users and mainly for our customers. What to say to the customers when web server stops sometimes regarding a php error ? I got more info if can help. The problem happens not only when the procedure receives null parameters for non null arguments. If, in a procedure code, for example, I create a temporary table and it have fields that does not accept null values and, when inserting rows with null values into non null fields, the same problem happens. PHP stops the web server. Sybase just returns error (-6) advising that the field does not accept null values ... We know that this is a error on the logics of the procedure and can be fixed by the programmer, fixing the code and recompiling the procedure and so on. We know that you are doing the best, but on my single oppinion, it's a problem to be fixed urgently. Are there any news about this bug fix ? Thanks again. [2003-04-22 08:50:30] cesararnold at yahoo dot com dot br Great ! We'll wait for you. Thanks. [2003-04-18 20:37:54] [EMAIL PROTECTED] Have been able to reproduce with sybase libraries. As these are not available on FreeBSD, I use FreeTDS, which does not produce a status result in this situation (return status = -6) but rather issues a CS_CMD_FAIL instantly. I know where the problem is (php_sybase_finish_results), fixing it is not trivial though (I've already given it a first shot but gave up after the supposed fix caused a segfault in another place:)). I'll do my best and see if I can include the fix in 4.3.2. 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/22403 -- Edit this bug report at http://bugs.php.net/?id=22403edit=1
#22403 [Asn]: PHP crashes when executing a sql procedure without parameters
ID: 22403 User updated by: cesararnold at yahoo dot com dot br Reported By: cesararnold at yahoo dot com dot br Status: Assigned Bug Type: Sybase-ct (ctlib) related Operating System: * PHP Version: 4.3.2-dev Assigned To: thekid New Comment: Hi, we still waiting for the fix. Sometimes we must restart the web server and this is causing some problems to the users and mainly for our customers. What to say to the customers when web server stops sometimes regarding a php error ? I got more info if can help. The problem happens not only when the procedure receives null parameters for non null arguments. If, in a procedure code, for example, I create a temporary table and it have fields that does not accept null values and, when inserting rows with null values into non null fields, the same problem happens. PHP stops the web server. Sybase just returns error (-6) advising that the field does not accept null values ... We know that this is a error on the logics of the procedure and can be fixed by the programmer, fixing the code and recompiling the procedure and so on. We know that you are doing the best, but on my single oppinion, it's a problem to be fixed urgently. Are there any news about this bug fix ? Thanks again. Previous Comments: [2003-04-22 08:50:30] cesararnold at yahoo dot com dot br Great ! We'll wait for you. Thanks. [2003-04-18 20:37:54] [EMAIL PROTECTED] Have been able to reproduce with sybase libraries. As these are not available on FreeBSD, I use FreeTDS, which does not produce a status result in this situation (return status = -6) but rather issues a CS_CMD_FAIL instantly. I know where the problem is (php_sybase_finish_results), fixing it is not trivial though (I've already given it a first shot but gave up after the supposed fix caused a segfault in another place:)). I'll do my best and see if I can include the fix in 4.3.2. [2003-04-14 20:55:39] cesararnold at yahoo dot com dot br Bingo ! The output is below: PHP Version: 4.3.2-dev OS : Windows NT SAO-IRINEU 5.0 build 2195 SAPI : isapi Sybase : Adaptive Server Enterprise/11.9.2/1075/P/Linux Intel/Linux 2.2.5 i586/OPT/Mon Jul 12 09:51:46 1999 Query: exec tempdb..test *** Caught Sybase Server Message #201 [Severity 16, state 2] at line 0 'Procedure test expects parameter @param, which was not supplied.' PHP has encountered an Access Violation at 01EB36C9 At this point the PHP stopped and IIS too, exactly as we have posted. It was necessary to stop and restart the www service manually. Thanks again for your great help. [2003-04-12 10:27:51] [EMAIL PROTECTED] Can you show me the output of this script: ?php /* Test script for http://bugs.php.net/bug.php?id=22403 * * SQL needed * == * use tempdb * go * create proc test (@param int) * as * begin * select @param * select @param + 1 * return @param * end * go */ header('Content-type: text/plain'); error_reporting(E_ALL); function sybase_message($msgnumber, $severity, $state, $line, $text) { printf( *** Caught Sybase Server Message #%d [Severity %d, state %d] at line %d\n'%s'\n, $msgnumber, $severity, $state, $line, chop($text) ); } function sybase_exec() { echo str_repeat('-', 72).\n; $args= func_get_args(); $query= array_shift($args); foreach ($args as $arg) { $query.= ' '.((NULL === $arg) ? 'NULL' : $arg); } printf( Query: %s\n, $query); flush(); $h= sybase_query($query); printf( Return: %s\n, var_export(is_resource($h), 1)); flush(); if (!$h) return; while ($data= sybase_fetch_assoc($h)) { var_dump($data); flush(); } } sybase_set_message_handler('sybase_message'); sybase_min_server_severity(11); sybase_connect('...', '...', '...'); // FILL IN PLEASE:) printf( PHP Version: %s\n. OS : %s\n. SAPI : %s\n. Sybase : %s\n, phpversion(), php_uname(), PHP_SAPI, array_shift(sybase_fetch_row(sybase_query('select @@version'))) ); sybase_exec('exec tempdb..test'); sybase_exec('exec tempdb..test', NULL); sybase_exec('exec tempdb..test', 1); sybase_exec('exec tempdb..test', 'foo'); printf(\n=== Done\n); ? [2003-03-28 14:54:50] cesararnold at yahoo dot com dot br Hi, first of all, thanks for your tests... I'm sorry but I forgot to say that it's happening on IIS 5.0, not on Apache. Thanks again.