ID: 15267
Updated by: yohgaki
Old Summary: declare makes apacke crahs burn and die!!
Reported By: [EMAIL PROTECTED]
Old Status: Closed
Status: Open
Bug Type: Reproducible crash
Operating System: win 98
PHP Version: 4.1.1
New Comment:

It seems windows have this problem while linux does not.
reopenned.

Apache 1.3.22
PHP 4.1.1/Apache SAPI


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

[2002-01-29 08:54:32] [EMAIL PROTECTED]

It most defiantly does crash and burn! Unlike planes, apache does not
like to stay down. It tries to start itself back up, but is shot time
crashes again. After many tries, Apache eventually gets tired of this
and decides not to display the page.

It most defiantly does crash and burn! Unlike planes, apache does not
like to stay down. It tries to start itself back up, but is shot time
crashes again. After many tries, Apache eventually gets tired of this
and decides not to display the page.

Php 4.06 -apache 1.3.20 cashes 
php 4.06 -apache 1.3.22 internal server error
php 4.1.1-apache 1.3.22 crashes
everything else         dont know

I am not sure if it matters, but i am using php as an sapi.

Brendan

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

[2002-01-28 23:02:50] [EMAIL PROTECTED]

It seems this is fixed. 
Your script does not crash on my Linux

Please reopen if you still have problem with 4.2.0-dev.
(It may be win spcific problem?)

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

[2002-01-28 22:44:59] [EMAIL PROTECTED]

Apache crashes, burns and dies when i copy and paste the first
“declare” example in the php documentation....

dont ask me why it is happening. I am having troubles learning how to
use declare and ticks. may be declare or ticks is not causing the
problem.... beats the heck out of me.

php4.0.6 did the same thing with apache 1.3.20, but when i upgraded to
apache 1.3.22, it caused and internal server error. After i updated my
php to the current version, apache decided it liked to crash and burn
better.

It might be good idea to update the documentation to a different
example, one that does not crash.... just a thought. I know it might
not be possible.

The source code is as follows:

<pre>
<?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
declare (ticks=2) {
    for ($x = 1; $x < 50; ++$x) {
        echo similar_text (md5($x), md5($x*$x)), "&lt;br&gt;";
    }
}

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

good luck...

Brendan

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



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


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to