[PHP-DEV] Bug #11489 Updated: Sybase query result is getting destructed

2001-07-23 Thread pwmoosman

ID: 11489
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Sybase-ct (ctlib) related
Operating System: Solaris
PHP Version: 4.0.5
New Comment:

I was able to reproduce this problem in version 4.0.6. But, I was unable to reproduce 
it in the current cvs tree.
However, after looking at the mysql, and sybase (not sybase_ct) modules. I concluded 
that adding a reference to the global database connecting should be there. So I 
modified php_sybase_ct.c


Previous Comments:


[2001-06-28 01:16:27] [EMAIL PROTECTED]

Cannot reproduce with CVS.



[2001-06-14 10:15:16] [EMAIL PROTECTED]

The following script produces the following error the second time 
getAppName/sybase_fetch_row is called.

Error (warning):

   /users/pmoosman/test_data/test1.php(26) : Warning - 3 is not a valid Sybase result 
resource

Script:

?php

function getConnect()
{
  $db = sybase_connect('','yyy','zzz');
  return $db;
}


function getAppName($app_id) 
{

  // static $db;

  $sql = select name from web_apps where application_id=$app_id;

  $db = getconnect();

  $result = sybase_query($sql, $db);

  $row = sybase_fetch_row($result); 

  // sybase_free_result($result);

  return $row[0];
}

getAppName(23);
getAppName(23);

?


Note: If I uncomment the static $db line, the error (warning) goes away.



I ran PHP in a debugger and it looks like the sybase connection is getting destructed 
when the sybase_query results are getting assigned to $result.







Edit this bug report at http://bugs.php.net/?id=11489edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11489 Updated: Sybase query result is getting destructed

2001-07-23 Thread pwmoosman

ID: 11489
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Status: Feedback
Status: Closed
Bug Type: Sybase-ct (ctlib) related
Operating System: Solaris
PHP Version: 4.0.5


Previous Comments:


[2001-06-28 01:16:27] [EMAIL PROTECTED]

Cannot reproduce with CVS.



[2001-06-14 10:15:16] [EMAIL PROTECTED]

The following script produces the following error the second time 
getAppName/sybase_fetch_row is called.

Error (warning):

   /users/pmoosman/test_data/test1.php(26) : Warning - 3 is not a valid Sybase result 
resource

Script:

?php

function getConnect()
{
  $db = sybase_connect('','yyy','zzz');
  return $db;
}


function getAppName($app_id) 
{

  // static $db;

  $sql = select name from web_apps where application_id=$app_id;

  $db = getconnect();

  $result = sybase_query($sql, $db);

  $row = sybase_fetch_row($result); 

  // sybase_free_result($result);

  return $row[0];
}

getAppName(23);
getAppName(23);

?


Note: If I uncomment the static $db line, the error (warning) goes away.



I ran PHP in a debugger and it looks like the sybase connection is getting destructed 
when the sybase_query results are getting assigned to $result.







Edit this bug report at http://bugs.php.net/?id=11489edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11594: preg_replace is not working with backslash $

2001-06-20 Thread PWMoosman

From: [EMAIL PROTECTED]
Operating system: Solaris
PHP version:  4.0.5
PHP Bug Type: PCRE related
Bug description:  preg_replace is not working with backslash $

I'm trying to use preg_replace to replace $ with \$.

Here is a sample script:

?

$data = '$_hello_$world';

$data = preg_replace('/\$/i','\$',$data);
print data : $data\n;

?


I expect the script to output \$_hello_\$world. However, version 4.0.5 is outputing 
$_hello_$world.

This worked in version 4.0.4

It possible this bug is related to bug# 10668




-- 
Edit Bug report at: http://bugs.php.net/?id=11594edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #11489: Sybase query result is getting destructed

2001-06-18 Thread pwmoosman

From: [EMAIL PROTECTED]
Operating system: Solaris
PHP version:  4.0.5
PHP Bug Type: Sybase-ct (ctlib) related
Bug description:  Sybase query result is getting destructed

The following script produces the following error the second time 
getAppName/sybase_fetch_row is called.

Error (warning):

   /users/pmoosman/test_data/test1.php(26) : Warning - 3 is not a valid Sybase result 
resource

Script:

?php

function getConnect()
{
  $db = sybase_connect('','yyy','zzz');
  return $db;
}


function getAppName($app_id) 
{

  // static $db;

  $sql = select name from web_apps where application_id=$app_id;

  $db = getconnect();

  $result = sybase_query($sql, $db);

  $row = sybase_fetch_row($result); 

  // sybase_free_result($result);

  return $row[0];
}

getAppName(23);
getAppName(23);

?


Note: If I uncomment the static $db line, the error (warning) goes away.



I ran PHP in a debugger and it looks like the sybase connection is getting destructed 
when the sybase_query results are getting assigned to $result.




-- 
Edit Bug report at: http://bugs.php.net/?id=11489edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]