php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41530 Apache stops printing php statements after looping through the array
Submitted: 2007-05-29 18:17 UTC Modified: 2007-06-04 08:31 UTC
From: ukirfan at yahoo dot com Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 4.4.7 OS: xp and linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ukirfan at yahoo dot com
New email:
PHP Version: OS:

 

 [2007-05-29 18:17 UTC] 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


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-05-29 18:25 UTC] tony2001@php.net
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.


 [2007-06-04 05:22 UTC] ukirfan at yahoo dot com
i have by-passed this issue by using set of - single dimensional arrays, instead of associative arrays.


Thanks
Irfan
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jan 15 11:01:31 2025 UTC