Skip Menu |

This queue is for tickets about the PHP-Interpreter CPAN distribution.

Report information
The Basics
Id: 14245
Status: resolved
Worked: 4 hours (240 min)
Priority: 0/
Queue: PHP-Interpreter

People
Owner: george [...] omniti.com
Requestors: rconover [...] infogears.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.0
Fixed in: (no value)



Subject: Memory Leak for each Interpreter Instance
Hi, It would appear the interpreter leaks memory for each instance created, using this script shows growing memory usage: #!/usr/bin/perl use strict; use warnings; use PHP::Interpreter; for (my $i = 0; $i < 100000; $i++) { my $foo; my $p = PHP::Interpreter->new({OUTPUT => \$foo}); $p->include("test.php"); undef $p; undef $foo; } All that the "test.php" file includes is this: "This is just a test php file." I'm using this as my php: $ php -v PHP 5.1.0RC1 (cli) (built: Aug 20 2005 14:36:33) Copyright (c) 1997-2005 The PHP Group Zend Engine v2.1.0-dev, Copyright (c) 1998-2005 Zend Technologies $ perl -v This is perl, v5.8.7 built for i686-linux $ uname -a Linux synthesis 2.6.11-1.14_FC3 #1 Thu Apr 7 19:23:49 EDT 2005 i686 i686 i386 GNU/Linux Is there an easy way to fix this leak? Thanks, Rusty
This is fixed in version control (or rather, fixed as well as it can be atm - part of the bug is in PHP). Check the next version of the package, or check out the most recent at: http://svn.perl.org/modules/PHP-Sandwich/trunk