From:             zxc at zmail dot ru
Operating system: Windows 2000 Pro SP4
PHP version:      4.4.0
PHP Bug Type:     Apache related
Bug description:  Crash Apache 1.3.33

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 bug report at http://bugs.php.net/?id=34288&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=34288&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=34288&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=34288&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=34288&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=34288&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=34288&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=34288&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=34288&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=34288&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=34288&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=34288&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=34288&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=34288&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=34288&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=34288&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=34288&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=34288&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=34288&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=34288&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=34288&r=mysqlcfg

Reply via email to