Justtechjobs.com Find a programming school near you






Online Campus Both


php4-beta | 199912

[PHP4BETA] Global variables "forgetting" their values in current CVS ? From: Hartmut Holzgraefe (hholzgra <email protected>)
Date: 12/20/99

something has changed since friday that makes my application
non-functional
producing incomplete output and even "Document contains no Data" pages

i have tracked it done to this part of code at the very end of the main
application script

...
191: // Kopf- und Fußteil vorbereiten
192: error_log(__FILE__.":".__LINE__." body: ".strlen($body)."\n",0);
193: $pagehead = getfile($templatedir . "/page/head.inc");
194: error_log(__FILE__.":".__LINE__." body: ".strlen($body)."\n",0);
195: $pagefoot = getfile($templatedir . "/page/foot.inc");
196:
197: error_log(__FILE__.":".__LINE__." body: ".strlen($body)."\n",0);
198: $have_imap = ($session_global["protocol"]=="IMAP4")?true:false;
199: error_log(__FILE__.":".__LINE__." body: ".strlen($body)."\n",0);
200:
201: // Ausgabe von Kopf, Körper und Fuß
202: error_log(__FILE__.":".__LINE__." body: ".strlen($body)."\n",0);
203: if(is_String($body))
204: {
...

this part of code produces the following output in .../logs/error_log:

[Mon Dec 20 11:44:13 1999] [error]
/home/hholzgra/public_html/webmail/service.php:192 body: 833
[Mon Dec 20 11:44:13 1999] [error]
/home/hholzgra/public_html/webmail/service.php:194 body: 833
[Mon Dec 20 11:44:13 1999] [error]
/home/hholzgra/public_html/webmail/service.php:197 body: 833
[Mon Dec 20 11:44:13 1999] [error]
/home/hholzgra/public_html/webmail/service.php:199 body: 0
[Mon Dec 20 11:44:13 1999] [error]
/home/hholzgra/public_html/webmail/service.php:202 body: 1
[Mon Dec 20 11:44:13 1999] Script:
'/home/hholzgra/public_html/webmail/service.php'
---------------------------------------
zend_execute_API.c(148) : Block 0x08243480 status:
Beginning: Cached (allocated on var.c:263, 12 bytes)
      End: OK
---------------------------------------
zend_execute.c(1962) : Freeing 0x0826FE00 (12 bytes),
script=/home/hholzgra/public_html/webmail/service.php
Last leak repeated 7 times

so the $body variable is destroyed by the assignment on line 198
and it even changed its value between lines 199 and 202 which
are identical error_log()-calls with nothing but a comment inbetween

further investigation shows that $body may loose its value as early
as between line 192 and 194 depending on the work the script has
done before, and sometimes it even may finnish without problems

but the problem is reproducabe: passing identical parameters makes
it loose $body in the same place in every run

any ideas ???

-- 
PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
To unsubscribe, e-mail: php4beta-unsubscribe <email protected>
For additional commands, e-mail: php4beta-help <email protected>
To contact the list administrators, e-mail: php4beta-admin <email protected>