php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2008 Memory leak in pgsql.c
Submitted: 1999-08-09 12:53 UTC Modified: 1999-09-25 13:13 UTC
From: christophe dot massiot at mail dot dotcom dot fr Assigned:
Status: Closed Package: PostgreSQL related
PHP Version: 4.0 Latest CVS (09/08/1999) OS: Linux 2.0.36/Debian slink
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: christophe dot massiot at mail dot dotcom dot fr
New email:
PHP Version: OS:

 

 [1999-08-09 12:53 UTC] christophe dot massiot at mail dot dotcom dot fr
The following script using postgresql functions :

<?
  pg_connect("localhost", 5432, "", "", "webase3");
  $toto = pg_exec("select * from MEMBRE where login='MASSIOT'");
  pg_fetch_array($toto, 0);
?>

produces on pg_fetch_array() :

18:50 [webase3:p3] titi:~% php toto.php 
Content-Type: text/html

toto.php:  Freeing 0x080FADE8 (1 bytes), allocated in pgsql.c on line 915<br>
toto.php:  Last leak repeated 26 times

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-08-23 15:48 UTC] sas at cvs dot php dot net
Do you have magic quotes turned on?
 [1999-08-25 09:13 UTC] christophe dot massiot at mail dot dotcom dot fr
I think so, yes. Here is an extract from my php.ini file :

;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;
magic_quotes_gpc	=	On		; magic quotes for incoming GET/POST/Cookie data
magic_quotes_runtime=	Off		; magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_sybase	=	Off		; Use Sybase-style magic quotes (escape ' with '' instead of \')
track_vars			=	On		; enable $HTTP_GET_VARS[], $HTTP_POST_VARS[] and $HTTP_COOKIE_VARS[] arrays
; automatically add files before or after any PHP 3.0 document
auto_prepend_file	=
auto_append_file	=

 [1999-09-25 13:13 UTC] andi at cvs dot php dot net
Fixed in CVS by Zeev.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 07:01:35 2025 UTC