register_shutdown_function and timeouts

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • alex bazan

    register_shutdown_function and timeouts

    I came across this function as i got a problem with very long-running
    scripts which use transactions...

    in the php manual i do not see clearly stated if the function defined
    will be executed if a timeout is reached.

    It states:
    "Registers the function named by function to be executed when script
    processing is complete."

    So what happens when the script processing is uncomplete because of a
    timeout?

    In case the function does not get executed, is there a way to execute a
    function on timeout??

    alex.
  • Peter van Schie

    #2
    Re: register_shutdo wn_function and timeouts

    alex bazan wrote:[color=blue]
    > I came across this function as i got a problem with very long-running
    > scripts which use transactions...
    >
    > in the php manual i do not see clearly stated if the function defined
    > will be executed if a timeout is reached.
    >
    > It states:
    > "Registers the function named by function to be executed when script
    > processing is complete."
    >
    > So what happens when the script processing is uncomplete because of a
    > timeout?
    >[/color]

    The function you specify with register_shutdo wn_function gets executed
    on timeout or exit. Just note you cannot echo or print anything anymore
    after a timeout occured.

    Peter.
    --

    Comment

    • alex bazan

      #3
      Re: register_shutdo wn_function and timeouts

      En/na Peter van Schie ha escrit:[color=blue]
      > alex bazan wrote:
      >
      > The function you specify with register_shutdo wn_function gets executed
      > on timeout or exit. Just note you cannot echo or print anything anymore
      > after a timeout occured.
      >
      > Peter.[/color]

      thanks, i was aware about "outputting " :P

      Comment

      Working...