ID: 13735 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Bogus Bug Type: Sybase-ct (ctlib) related Operating System: soliars,win2000 PHP Version: 4.2.1 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. Previous Comments: ------------------------------------------------------------------------ [2002-08-13 22:56:58] [EMAIL PROTECTED] Updating version number ------------------------------------------------------------------------ [2002-05-24 04:41:08] [EMAIL PROTECTED] Forgot to mention - original config was with RedHat 7.0 - newer (failed) config is with RedHat 7.1 ------------------------------------------------------------------------ [2002-05-24 04:38:17] [EMAIL PROTECTED] I've had a similar experience - the 0 returned is a failure notice, I believe. I got this error message when trying to connect ('db_name' is the name of the connection I use in the interfaces and hosts files): Notice: Connection failed to db_name,14224: Connection refused (errflg=2) in Unknown on line 0 I'm using PHP 4.2.1 with Apache 1.3.24, and have Sybase ase-11.0.3.3-6 and ocsd-10.0.4-6 installed. (Do I need *both* of these?) Never had this problem with an earlier combination of PHP 4.0.4pl1 and Apache 1.3.19 using the same ct lib files. I still haven't solved this one, so any help would be appreciated! ------------------------------------------------------------------------ [2001-10-18 09:47:44] [EMAIL PROTECTED] I defined the sybase procedure as following: ******************************************************* create proc circul.circul_hold @rec_ctrl_id char(10), @reader_barcode char(14), @department_id char(2), @user_id char(4), @list_no int output, @errmsg varchar(200) output as ...... *********************************************************** and I ececuted this proc in test.php as fllowing: <?php include "../include/connect.php"; .... $rec_ctrl_id='15400'; $barcode='21113000694135'; $departid='70'; $userid = 'web'; $sql = "declare @list_no2 int, @errmsg2 varchar(200) "; $sql.= "exec circul.circul_hold '$rec_ctrl_id','$barcode','$departid','$userid',@list_no =@list_no2 output,@errmsg=@errmsg2 output "; $sql.= "select list_no = @list_no2 , errmsg = @errmsg2"; $query=sybase_query($sql); if ($query){ $array = sybase_fetch_array($query); echo $array[list_no] .'<br>'; echo $array[errmsg] .'<br>'; } ... ?> I found that $array[list_no]=$array[list_no]=null,and sybase_num_rows($query)=1 and $array[0]= 0,which means only '0' returns (while the sybase proc excute succeed,it always return 0). But I execute $sql in SYBASE SQL ADVANTAGE ,I can get $array[list_no] and $array[errmsg] ,whilch are not null. Why?I have been confused for months. Please tell me the right way to execute sybase proc with output parameters in php as soon as possible. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=13735&edit=1