ID:               41677
 User updated by:  bobson at rpg dot pl
-Summary:          Cannot redeclare found after allowed memory  exhausted
 Reported By:      bobson at rpg dot pl
 Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: Linux Gentoo
 PHP Version:      5.2.3
 New Comment:

No. There's no additional zend extensions, xcache or optymizers. Pure
PHP5 from gentoo emerge.


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

[2007-06-16 03:02:39] phpbugs at thequod dot de

Are you using an opcode cache like xcache, Zend Optimizer, 
eaccelerator, etc?

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

[2007-06-13 10:34:50] bobson at rpg dot pl

Description:
------------
I provide this issue as php5.2.3 because it probaby can be noticed on
this version too (dont found bugfix in changelog).

My configuration is lighttpd + php (on FastCGI).
PHP from getnoo emerge (PHP 5.2.2-pl1-gentoo).

First apears:
PHP Fatal error:  Allowed memory size of 18874368 bytes exhausted
(tried to allocate 7881777 bytes) in
/var/www/sites/partner/deny/lib/new/global_session_handing.php on line
171
(yes, there was bug)

After that php start to show such message:
PHP Fatal error:  Cannot redeclare clearme() in
/var/www/sites/partner/index.php on line 6

clearme() is simple function with if's and unset() for unset some vars
if exists.

So... I move function clearme() a several line (still first in file).
PHP said:
PHP Fatal error:  Cannot redeclare clearme() (previously declared in
/var/www/sites/partner/index.php:7) in /var/www/sites/partner/index.php
on line 19
( line 19 is end "}" of clearme() )

Then I move other simple function to begin of file, PHP said:
PHP Fatal error:  Cannot redeclare translatebeforeregexping()
(previously declared in /var/www/sites/partner/index.php:23) in
/var/www/sites/partner/index.php on line 18

How "previously declared" line can be higher than declaration line? 

When I require_once() library used in problematic script to simple php
file - PHP shows:
Cannot redeclare h2_ajaxvarencode() in
/usr/local/share/php/wdgHarvest3_HA/harvest_addons.php on line 4
(this is first function in this lib)

Sorry for not attaching code of index.php - copyright issues :/

There is no self inclusions. Function is first declaration in file.
After lighttpd restart problem disappear (is this pointing to some kind
of  interpreter stack problem?). There is hard to makes case study code
reproducing this problem.




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


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

Reply via email to