ID:               36229
 User updated by:  perry dot sebastian at gmail dot com
 Reported By:      perry dot sebastian at gmail dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: linux - SUSE 10
-PHP Version:      5.1.2
+PHP Version:      5.1.1
 New Comment:

I don't any problems with the code, either...

I installed 5.1.2 (the bug report should have indicated a version
number of 5.1.1). And now the following fatal error is being reported:

[debug info] -> size patterns[77], replacements[77] pagedata[13089]

Fatal error: Allowed memory size of 8388608 bytes exhausted at
/opt/php/php-5.1.2/ext/pcre/php_pcre.c:880 (tried to allocate 26179
bytes) in /srv/www/lampair/lib/PageMaker.php on line 578

Line 577 - 578 in PageMaker.php are:

577: if($carplinks) { print "size patterns[".count($patterns)."],
replacements[".count($replacements)."]
pagedata[".strlen($pagedata)."]<br>\n"; }
578: $pagedata = preg_replace($patterns, $replacements, $pagedata);

This fatal error with preg_replace was not reported under 5.1.1, so it
would seem likely that the failure to complete the output of the page
under 5.1.1 was related to the same error.


Previous Comments:
------------------------------------------------------------------------

[2006-01-31 15:44:22] [EMAIL PROTECTED]

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


I don't see any problems with this code.

------------------------------------------------------------------------

[2006-01-31 15:27:13] perry dot sebastian at gmail dot com

Description:
------------
Adding a line of code to a specific object class causes the web
application to terminate prematurely. A line of code such as "function
testthis() {}" will trigger this problem. When this line is commented
out, the application behaves as expected.
Code previously worked under PHP 4.4. 

Reproduce code:
---------------
<?php
// class DataCon is data container
class DataCon {
    //defined variables

    function __construct() {}

    function init( $args, &$dbh ) {
       // init object
    }

    // various functions for getting and setting data

# multiple
# lines of code
# commented out

}
?> 

Expected result:
----------------
Web page with printed output of application states at the top of the
page.

Actual result:
--------------
This problem seems to be isolated with this class file. I have turned
on STRICT for error reporting, but no error relevant to this object
comes back when the application is executed. I cleaned line endings,
changed function names, removed and added code, and the problem
persists. Apache does not report an error.
Premature termination is also very strange. It seems very inconsistent.
Initially an error occurred that flagged an included file for consuming
too much memory. This error stopped after the error was investigated
(and I have not been able to replicate this error). The failure appears
to "reach back" in the code execution and stop application output before
the point of failure (noted by various print statement track code
execution). Forcing an exit of the application before loading this
object class causes termination at the appropriate point - not before.



------------------------------------------------------------------------


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

Reply via email to