[phpa] Re: Headers already sent problem

Hi,

> > and your code works if you disable phpa?
>
> Sure. Just have a look at the attached file.

Listar messed up the attachement, so here's the code again.


<?php
require_once "Benchmark/Timer.php";
/** Settings for benchmarking */
define ("BENCHMARK", true);
if (BENCHMARK){
   $timer = new Benchmark_Timer;
   $timer->start();
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
  <title>[phpa]</title>
</head>
<body>
<p>
<?php
for ($i = 200001; $i <= 300000; $i++){
        printf ("%s, ", $i);
}
?>
</p>
<p><a href="index.php">index.php</a></p>
</body>
</html>
<?php
/** Stop benchmark */
if (BENCHMARK){
    $timer->stop();
    printf ("<p>Time elapsed: %s</p>", $timer->timeElapsed());
}
?>


The same file works with Zend Accelerator 2.0 without any problems, wihout 
having turned output buffering on.

How is phpa working internally that it needs output buffering to work?


Cheers,
Andreas


-- 
Andreas Otto <andreas@xxxxxxxxxx>
Using PHP on Windows? www.php4win.de
 

------------------------------------------------------------------------
  www.php-accelerator.co.uk           Home of the free PHP Accelerator

To post, send email to phpa@xxxxxxxxxxxxx
To unsubscribe, email phpa-request@xxxxxxxxxxxxx with subject unsubscribe


Other related posts: