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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 16:01:29 2024 UTC