Bug #39058 [Com]: Memory Leak

2013-05-10 Thread dbabits at gmail dot com
Edit report at https://bugs.php.net/bug.php?id=39058&edit=1

 ID: 39058
 Comment by: dbabits at gmail dot com
 Reported by:mpcribeiro at yahoo dot com
 Summary:Memory Leak
 Status: No Feedback
 Type:   Bug
 Package:Sybase-ct (ctlib) related
 Operating System:   Solaris 10
 PHP Version:5.1.6
 Block user comment: N
 Private report: N

 New Comment:

getting the same problem.

-PHP 5.4.3 (cgi-fcgi) (built: May  9 2013 17:03:23)
-built --with-sybase-ct=/path/to/freetds
-code:

$con = sybase_connect('server', 'user', 'pwd');
$q = sybase_query("select col=1", $con);

Output:
Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to 
allocate 30064771074 bytes)


Previous Comments:

[2009-09-23 04:45:09] gi_mike2002 at yahoo dot com

No movement on this since 2006?!

tsk, tsk...


[2008-06-24 14:55:08] jjsainzc at gmail dot com

I'm use freetds and php5.1.6

I have the same problem:

Source (part):

$connect_sybase_id=sybase_connect("Database","login","pass");

if ($connect_sybase_id)
echo "Conectado\n";
else
echo "No conectado\n";

if (sybase_select_db("Database"))
echo "Seleccionada la base\n";
else
echo "No pude seleccionar la base\n";


$query="SELECT field FROM DBA.tabla WHERE codigo=1";
$result = false;
$result = sybase_query($query);

if ($result) {
$r=sybase_fetch_row($result);
echo "Resultado\n";
print_r($r);
}
else echo "No pude hacer el query\n";
sybase_close($connect_sybase_id);



Result:

Fatal error: Allowed memory size of 209715200 bytes exhausted (tried to 
allocate 56 bytes) in /home/support/prueba.php on line 30


[2008-06-13 09:46:49] daniel dot buschke at nextiraone dot de

Noticed that mpcribeiro is using sybase bindings. I use freetds! So it is not a 
problem of the bindings, is it?


[2008-06-13 09:44:21] daniel dot buschke at nextiraone dot de

# php -v
PHP 5.2.6RC4-pl0-gentoo (cli) (built: Jun 13 2008 11:18:19)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

Still the same problem. Please reopen 'cause bug seems not fixed.

Let me know how I can provide further informations - if needed.


[2008-03-03 07:33:51] kristjan at laborint dot com

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 
256 bytes)

PHP:
PHP Version 5.2.5

System:
Linux z37 2.6.9-67.0.4.ELsmp #1 SMP Sun Feb 3 07:06:14 EST 2008 x86_64

Server API:
CGI/FastCGI

Sybase:
Client API Version $Id: dblib.c,v 1.244.2.1 2006/01/31 08:45:20 freddy77 Exp $




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

https://bugs.php.net/bug.php?id=39058


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=39058&edit=1


#39058 [Com]: Memory Leak

2009-09-22 Thread gi_mike2002 at yahoo dot com
 ID:   39058
 Comment by:   gi_mike2002 at yahoo dot com
 Reported By:  mpcribeiro at yahoo dot com
 Status:   No Feedback
 Bug Type: Sybase-ct (ctlib) related
 Operating System: Solaris 10
 PHP Version:  5.1.6
 New Comment:

No movement on this since 2006?!

tsk, tsk...


Previous Comments:


[2008-06-24 14:55:08] jjsainzc at gmail dot com

I'm use freetds and php5.1.6

I have the same problem:

Source (part):

$connect_sybase_id=sybase_connect("Database","login","pass");

if ($connect_sybase_id)
echo "Conectado\n";
else
echo "No conectado\n";

if (sybase_select_db("Database"))
echo "Seleccionada la base\n";
else
echo "No pude seleccionar la base\n";


$query="SELECT field FROM DBA.tabla WHERE codigo=1";
$result = false;
$result = sybase_query($query);

if ($result) {
$r=sybase_fetch_row($result);
echo "Resultado\n";
print_r($r);
}
else echo "No pude hacer el query\n";
sybase_close($connect_sybase_id);



Result:

Fatal error: Allowed memory size of 209715200 bytes exhausted (tried to
allocate 56 bytes) in /home/support/prueba.php on line 30



[2008-06-13 09:46:49] daniel dot buschke at nextiraone dot de

Noticed that mpcribeiro is using sybase bindings. I use freetds! So it
is not a problem of the bindings, is it?



[2008-06-13 09:44:21] daniel dot buschke at nextiraone dot de

# php -v
PHP 5.2.6RC4-pl0-gentoo (cli) (built: Jun 13 2008 11:18:19)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

Still the same problem. Please reopen 'cause bug seems not fixed.

Let me know how I can provide further informations - if needed.



[2008-03-03 07:33:51] kristjan at laborint dot com

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to
allocate 256 bytes)

PHP:
PHP Version 5.2.5

System:
Linux z37 2.6.9-67.0.4.ELsmp #1 SMP Sun Feb 3 07:06:14 EST 2008 x86_64

Server API:
CGI/FastCGI

Sybase:
Client API Version $Id: dblib.c,v 1.244.2.1 2006/01/31 08:45:20
freddy77 Exp $



[2007-05-13 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



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/39058

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



#39058 [Com]: Memory Leak

2008-06-24 Thread jjsainzc at gmail dot com
 ID:   39058
 Comment by:   jjsainzc at gmail dot com
 Reported By:  mpcribeiro at yahoo dot com
 Status:   No Feedback
 Bug Type: Sybase-ct (ctlib) related
 Operating System: Solaris 10
 PHP Version:  5.1.6
 New Comment:

I'm use freetds and php5.1.6

I have the same problem:

Source (part):

$connect_sybase_id=sybase_connect("Database","login","pass");

if ($connect_sybase_id)
echo "Conectado\n";
else
echo "No conectado\n";

if (sybase_select_db("Database"))
echo "Seleccionada la base\n";
else
echo "No pude seleccionar la base\n";


$query="SELECT field FROM DBA.tabla WHERE codigo=1";
$result = false;
$result = sybase_query($query);

if ($result) {
$r=sybase_fetch_row($result);
echo "Resultado\n";
print_r($r);
}
else echo "No pude hacer el query\n";
sybase_close($connect_sybase_id);



Result:

Fatal error: Allowed memory size of 209715200 bytes exhausted (tried to
allocate 56 bytes) in /home/support/prueba.php on line 30


Previous Comments:


[2008-06-13 09:46:49] daniel dot buschke at nextiraone dot de

Noticed that mpcribeiro is using sybase bindings. I use freetds! So it
is not a problem of the bindings, is it?



[2008-06-13 09:44:21] daniel dot buschke at nextiraone dot de

# php -v
PHP 5.2.6RC4-pl0-gentoo (cli) (built: Jun 13 2008 11:18:19)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

Still the same problem. Please reopen 'cause bug seems not fixed.

Let me know how I can provide further informations - if needed.



[2008-03-03 07:33:51] kristjan at laborint dot com

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to
allocate 256 bytes)

PHP:
PHP Version 5.2.5

System:
Linux z37 2.6.9-67.0.4.ELsmp #1 SMP Sun Feb 3 07:06:14 EST 2008 x86_64

Server API:
CGI/FastCGI

Sybase:
Client API Version $Id: dblib.c,v 1.244.2.1 2006/01/31 08:45:20
freddy77 Exp $



[2007-05-13 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



[2006-10-06 09:17:31] mpcribeiro at yahoo dot com

Fatal error: Allowed memory size of 209715200 bytes exhausted (tried to
allocate 1835103092 bytes) in
/data/www/ribeiros/syb/lib/lib_syb_sessions.php on line 66

Still with 5.1.6 and memory limit of 200Mb


I'm currently compiling the latest PHP 5.2* available from devs cvs...
lets see. Cheers



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/39058

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



#39058 [Com]: Memory Leak

2008-06-13 Thread daniel dot buschke at nextiraone dot de
 ID:   39058
 Comment by:   daniel dot buschke at nextiraone dot de
 Reported By:  mpcribeiro at yahoo dot com
 Status:   No Feedback
 Bug Type: Sybase-ct (ctlib) related
 Operating System: Solaris 10
 PHP Version:  5.1.6
 New Comment:

Noticed that mpcribeiro is using sybase bindings. I use freetds! So it
is not a problem of the bindings, is it?


Previous Comments:


[2008-06-13 09:44:21] daniel dot buschke at nextiraone dot de

# php -v
PHP 5.2.6RC4-pl0-gentoo (cli) (built: Jun 13 2008 11:18:19)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

Still the same problem. Please reopen 'cause bug seems not fixed.

Let me know how I can provide further informations - if needed.



[2008-03-03 07:33:51] kristjan at laborint dot com

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to
allocate 256 bytes)

PHP:
PHP Version 5.2.5

System:
Linux z37 2.6.9-67.0.4.ELsmp #1 SMP Sun Feb 3 07:06:14 EST 2008 x86_64

Server API:
CGI/FastCGI

Sybase:
Client API Version $Id: dblib.c,v 1.244.2.1 2006/01/31 08:45:20
freddy77 Exp $



[2007-05-13 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



[2006-10-06 09:17:31] mpcribeiro at yahoo dot com

Fatal error: Allowed memory size of 209715200 bytes exhausted (tried to
allocate 1835103092 bytes) in
/data/www/ribeiros/syb/lib/lib_syb_sessions.php on line 66

Still with 5.1.6 and memory limit of 200Mb


I'm currently compiling the latest PHP 5.2* available from devs cvs...
lets see. Cheers



[2006-10-06 08:59:03] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip





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/39058

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



#39058 [Com]: Memory Leak

2008-06-13 Thread daniel dot buschke at nextiraone dot de
 ID:   39058
 Comment by:   daniel dot buschke at nextiraone dot de
 Reported By:  mpcribeiro at yahoo dot com
 Status:   No Feedback
 Bug Type: Sybase-ct (ctlib) related
 Operating System: Solaris 10
 PHP Version:  5.1.6
 New Comment:

# php -v
PHP 5.2.6RC4-pl0-gentoo (cli) (built: Jun 13 2008 11:18:19)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies

Still the same problem. Please reopen 'cause bug seems not fixed.

Let me know how I can provide further informations - if needed.


Previous Comments:


[2008-03-03 07:33:51] kristjan at laborint dot com

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to
allocate 256 bytes)

PHP:
PHP Version 5.2.5

System:
Linux z37 2.6.9-67.0.4.ELsmp #1 SMP Sun Feb 3 07:06:14 EST 2008 x86_64

Server API:
CGI/FastCGI

Sybase:
Client API Version $Id: dblib.c,v 1.244.2.1 2006/01/31 08:45:20
freddy77 Exp $



[2007-05-13 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



[2006-10-06 09:17:31] mpcribeiro at yahoo dot com

Fatal error: Allowed memory size of 209715200 bytes exhausted (tried to
allocate 1835103092 bytes) in
/data/www/ribeiros/syb/lib/lib_syb_sessions.php on line 66

Still with 5.1.6 and memory limit of 200Mb


I'm currently compiling the latest PHP 5.2* available from devs cvs...
lets see. Cheers



[2006-10-06 08:59:03] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip





[2006-10-06 08:54:43] mpcribeiro at yahoo dot com

Description:

PHP 5.1.6 compiled and installed without issues.

However when procedures call sybase functions and after few minutes.
PHP complain with not enough memory. 

PHP seem unable to read all the script, also unable to address the
variables properly.

At beggining gave "fatal errors" due to lack of memory even with 200Mb
has memory limit (raised from its default value).

After recompiling php 5.1.6 for 2nd time, I'm now getting the following
errors, and lack of memory (200mb limit) message is now rare to appear.

Warning: Unknown list entry type in request shutdown (0) in
lib/lib_syb_sessions.php on line 61

Warning: Unknown list entry type in request shutdown (0) in
/lib/lib_syb_sessions.php on line 42


PHP 5.1.6 was compiled with the following parameters:

PHPHOME=/opt/php
APACHEHOME=/opt/apache
cat /dev/null > conf.log
export PATH=$PATH:/var/MailRoot/bin
./configure --prefix=$PHPHOME \
--bindir=$PHPHOME/bin \
--libdir=$PHPHOME/lib \
--with-config-file-path=$PHPHOME/conf \
--with-apache2=$APACHEHOME/ \
--with-apxs2=$APACHEHOME/bin/apxs \
--with-sfw=/usr/sfw \
--with-jpeg \
--with-jpeg-dir=/usr/local \
--with-png \
--with-png-dir=/usr/local \
--with-ftp \
--with-zlib-dir=/usr/local \
--enable-magic-quotes \
--enable-safe-mode \
--enable-sockets \
--enable-track-vars \
--enable-trans-sid \
--enable-memory-limit \
--enable-calendar \
--with-pgsql=/opt/pgsql \
--with-mysql-dir=/opt/mysql \
--with-sybase-ct=$SYBASE/$SYBASE_OCS \
--enable-static=sybase-ct \
--enable-mbstring

I have reviewed the procedure few times and I can't find any glitch
that could cause such behaviour.

I'm now compiling the latest 5.2* from dev's cvs to see if this issue
is solved. Cheers

Reproduce code:
---
function
syb_list_processes($DBase,$DBusr,$DBpwd,$SID,$SN,$SYBSN,$ORDER) {
putenv("SYBASE=/opt/sybase");
putenv("SYBPLATFORM=solaris");
putenv("LC_ALL=default");
putenv("DSQUERY=SYBASE");
$lg=read_session_id($SID,'login');
if(!$ORDER) {
$ORDER='suid';
}
   
$SYBusr=syb_get_sadetails($DBase,$DBusr,$DBpwd,$SN,$SYBSN,'sausr');
   
$SYBpwd=syb_get_sadetails($DBase,$DBusr,$DBpwd,$SN,$SYBSN,'sapwd');
[EMAIL PROTECTED]("$SYBSN","$SYBusr","$SYBpwd");
if($ORDER=="") {
$ORDER='suid';
}
switch ($ORDER) {
case 'cpu':

#39058 [Com]: Memory Leak

2008-03-02 Thread kristjan at laborint dot com
 ID:   39058
 Comment by:   kristjan at laborint dot com
 Reported By:  mpcribeiro at yahoo dot com
 Status:   No Feedback
 Bug Type: Sybase-ct (ctlib) related
 Operating System: Solaris 10
 PHP Version:  5.1.6
 New Comment:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to
allocate 256 bytes)

PHP:
PHP Version 5.2.5

System:
Linux z37 2.6.9-67.0.4.ELsmp #1 SMP Sun Feb 3 07:06:14 EST 2008 x86_64

Server API:
CGI/FastCGI

Sybase:
Client API Version $Id: dblib.c,v 1.244.2.1 2006/01/31 08:45:20
freddy77 Exp $


Previous Comments:


[2007-05-13 01:00:01] php-bugs at lists dot php dot net

No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".



[2006-10-06 09:17:31] mpcribeiro at yahoo dot com

Fatal error: Allowed memory size of 209715200 bytes exhausted (tried to
allocate 1835103092 bytes) in
/data/www/ribeiros/syb/lib/lib_syb_sessions.php on line 66

Still with 5.1.6 and memory limit of 200Mb


I'm currently compiling the latest PHP 5.2* available from devs cvs...
lets see. Cheers



[2006-10-06 08:59:03] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip





[2006-10-06 08:54:43] mpcribeiro at yahoo dot com

Description:

PHP 5.1.6 compiled and installed without issues.

However when procedures call sybase functions and after few minutes.
PHP complain with not enough memory. 

PHP seem unable to read all the script, also unable to address the
variables properly.

At beggining gave "fatal errors" due to lack of memory even with 200Mb
has memory limit (raised from its default value).

After recompiling php 5.1.6 for 2nd time, I'm now getting the following
errors, and lack of memory (200mb limit) message is now rare to appear.

Warning: Unknown list entry type in request shutdown (0) in
lib/lib_syb_sessions.php on line 61

Warning: Unknown list entry type in request shutdown (0) in
/lib/lib_syb_sessions.php on line 42


PHP 5.1.6 was compiled with the following parameters:

PHPHOME=/opt/php
APACHEHOME=/opt/apache
cat /dev/null > conf.log
export PATH=$PATH:/var/MailRoot/bin
./configure --prefix=$PHPHOME \
--bindir=$PHPHOME/bin \
--libdir=$PHPHOME/lib \
--with-config-file-path=$PHPHOME/conf \
--with-apache2=$APACHEHOME/ \
--with-apxs2=$APACHEHOME/bin/apxs \
--with-sfw=/usr/sfw \
--with-jpeg \
--with-jpeg-dir=/usr/local \
--with-png \
--with-png-dir=/usr/local \
--with-ftp \
--with-zlib-dir=/usr/local \
--enable-magic-quotes \
--enable-safe-mode \
--enable-sockets \
--enable-track-vars \
--enable-trans-sid \
--enable-memory-limit \
--enable-calendar \
--with-pgsql=/opt/pgsql \
--with-mysql-dir=/opt/mysql \
--with-sybase-ct=$SYBASE/$SYBASE_OCS \
--enable-static=sybase-ct \
--enable-mbstring

I have reviewed the procedure few times and I can't find any glitch
that could cause such behaviour.

I'm now compiling the latest 5.2* from dev's cvs to see if this issue
is solved. Cheers

Reproduce code:
---
function
syb_list_processes($DBase,$DBusr,$DBpwd,$SID,$SN,$SYBSN,$ORDER) {
putenv("SYBASE=/opt/sybase");
putenv("SYBPLATFORM=solaris");
putenv("LC_ALL=default");
putenv("DSQUERY=SYBASE");
$lg=read_session_id($SID,'login');
if(!$ORDER) {
$ORDER='suid';
}
   
$SYBusr=syb_get_sadetails($DBase,$DBusr,$DBpwd,$SN,$SYBSN,'sausr');
   
$SYBpwd=syb_get_sadetails($DBase,$DBusr,$DBpwd,$SN,$SYBSN,'sapwd');
[EMAIL PROTECTED]("$SYBSN","$SYBusr","$SYBpwd");
if($ORDER=="") {
$ORDER='suid';
}
switch ($ORDER) {
case 'cpu': $SORTORDER="DESC";
break;
case 'physical_io': $SORTORDER="DESC";
break;
case 'memusage':$SORTORDER="DESC";
break;
case 'cmd': $SORTORDER="DESC";
break;
default:$SORTORDER="";