ID:               34288
 Updated by:       [EMAIL PROTECTED]
 Reported By:      zxc at zmail dot ru
-Status:           Open
+Status:           Bogus
 Bug Type:         Apache related
 Operating System: Windows 2000 Pro SP4
 PHP Version:      4.4.0
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #26771


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

[2005-08-28 15:27:24] zxc at zmail dot ru

Description:
------------
Crash Apache 1.3.33 IF PHP 4.4.0 installed as module.

Reproduce code:
---------------
I try to run "Example 16-3. Profile a section of PHP code" from PHP
manual (http://ru.php.net/manual/en/control-structures.declare.php):

<?php
// A function that records the time when it is called
function profile($dump = FALSE)
{
   static $profile;

   // Return the times stored in profile, then erase it
   if ($dump) {
       $temp = $profile;
       unset($profile);
       return $temp;
   }

   $profile[] = microtime();
}

// Set up a tick handler
register_tick_function("profile");

// Initialize the function before the declare block
profile();

// Run a block of code, throw a tick every 2nd statement

// >>> START -- if delte this lines
declare(ticks=2) {
   for ($x = 1; $x < 50; ++$x) {
       echo similar_text(md5($x), md5($x*$x)), "<br />;";
   }
}
// >>> END -- It will be ok, don't crash.


// Display the data stored in the profiler
print_r(profile(TRUE));
?> 

If PHP 4.4.0 installed as CGI, it's ok, Apache 1.3.33 don't crash.

Expected result:
----------------
Result of this script, don't crash Apache 1.3.33

Actual result:
--------------
Crash Apache 1.3.33 (PHP installed as module)


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


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

Reply via email to