php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34288 Crash Apache 1.3.33
Submitted: 2005-08-28 15:27 UTC Modified: 2005-08-28 16:31 UTC
From: zxc at zmail dot ru Assigned:
Status: Not a bug Package: Apache related
PHP Version: 4.4.0 OS: Windows 2000 Pro SP4
Private report: No CVE-ID: None
 [2005-08-28 15:27 UTC] 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)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-28 16:31 UTC] sniper@php.net
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
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 07:01:30 2024 UTC