From:             bobson at rpg dot pl
Operating system: Linux Gentoo
PHP version:      5.2.3
PHP Bug Type:     Scripting Engine problem
Bug description:  Cannot redeclare found after allowed memory  exhausted

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 bug report at http://bugs.php.net/?id=41677&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=41677&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=41677&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=41677&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=41677&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=41677&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=41677&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=41677&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=41677&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=41677&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=41677&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=41677&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=41677&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=41677&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=41677&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=41677&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=41677&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=41677&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=41677&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=41677&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=41677&r=mysqlcfg

Reply via email to