#41530 [Opn->Fbk]: Apache stops printing php statements after looping through the array

From: Date: Tue, 29 May 2007 18:25:04 +0000
Subject: #41530 [Opn->Fbk]: Apache stops printing php statements after looping through the array
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-113160@lists.php.net to get a copy of this message
 ID:               41530
 Updated by:       tony2001@php.net
 Reported By:      ukirfan at yahoo dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Apache2 related
 Operating System: xp and linux
 PHP Version:      4.4.7
 New Comment:

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.




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

[2007-05-29 18:17:38] ukirfan at yahoo dot com

Description:
------------
Hi,

Apache stops printing php statements after looping through the array,
and does not reach a point where I print "hello there !"  message.
i need to output beyound the print statements in array, to execute
javascript in client browser. Please help !

try catch messages are not showing any error !
Note : all my pages work perfectly even with huge outputs, only this
multi-dimensional array output is the problem


Thanks 
Irfan Ahmed
 

Reproduce code:
---------------
here is the code below
<?php 

try{
 while( $localcount < $localcountfinal  ) {
							 if(($completeTreeLocal[$localcount]["node"]+0) != 50000 ){				
							 				print  $completeTreeLocal[$localcount]["routePath"];
	}

$localcount++;
 }
$_SESSION['completeTreeStruct'] =  serialize( $completeTreeLocal);	
 } catch (Exception $e) {
echo ' Caught exception: ',  $e->getMessage(), "\n";
}

print "hello there !";

?>




Expected result:
----------------
after printing strings from multidimensional array loops, must print
any other statement after loop, example "hello there"


 d.add( 1,
0,'RDD','mileStoneschangeEvent.php?MSTONE=RDD&node=1&parentIs=0&arrayIndex=0');

 d.add( 2,
0,'','mileStoneschangeEvent.php?MSTONE=&node=2&parentIs=0&arrayIndex=1');		


 d.add( 3, 0,'Design Approval','mileStoneschangeEvent.php?MSTONE=Design
Approval&node=3&parentIs=0&arrayIndex=2');

 d.add( 4, 0,'Commercials
Approval','mileStoneschangeEvent.php?MSTONE=Commercials
Approval&node=4&parentIs=0&arrayIndex=3');
.
.
.
.
.
 d.add( 20, 0,'Commercials
Approval','mileStoneschangeEvent.php?MSTONE=Commercials
Approval&node=4&parentIs=0&arrayIndex=19');
<---- stops here



Actual result:
--------------
 d.add( 1,
0,'RDD','mileStoneschangeEvent.php?MSTONE=RDD&node=1&parentIs=0&arrayIndex=0');

 d.add( 2,
0,'','mileStoneschangeEvent.php?MSTONE=&node=2&parentIs=0&arrayIndex=1');		


 d.add( 3, 0,'Design Approval','mileStoneschangeEvent.php?MSTONE=Design
Approval&node=3&parentIs=0&arrayIndex=2');

 d.add( 4, 0,'Commercials
Approval','mileStoneschangeEvent.php?MSTONE=Commercials
Approval&node=4&parentIs=0&arrayIndex=3');
.
.
.
.
.
.
.
.
n times 
and then print 

"hello there". or whatever print statement occurs later



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


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


Thread (4 messages)

« previous php.bugs (#113160) next »