Overriding/Replacing a method in the PHP installation.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guenther  Starnberger

    Overriding/Replacing a method in the PHP installation.

    Hello,

    Is there a possibility to 'override' a method e.g. in the php.ini?

    The reason I want to do this is, that depending on the value of
    session.cache_l imiter specific HTTP headers ("Cache-control") are sent
    when calls to session_start are made. Because of some browser bugs we
    need to modify these headers before they are sent to the browser. This
    would be possibily with a simple 'header' call if this call is made
    after session_start.

    The problem now is that we run numerous 3rd party scripts which we
    don't want to modify - an ideal solution would be if it was possible to
    override session_start, so that our implementation of session_start
    calls the original session_start function and sets the headers
    afterwards.

    If this is not possible, would it be possible to import a modified
    session_start method via auto_prepend_fi le which does these things -
    how can i reference the 'original' session_start method in this case?
    cu
    /gst

  • Chung Leong

    #2
    Re: Overriding/Replacing a method in the PHP installation.

    "Guenther Starnberger" <sysfrog@gmail. com> wrote in message
    news:cgb1pl$v41 @odah37.prod.go ogle.com...[color=blue]
    > Hello,
    >
    > Is there a possibility to 'override' a method e.g. in the php.ini?
    >
    > The reason I want to do this is, that depending on the value of
    > session.cache_l imiter specific HTTP headers ("Cache-control") are sent
    > when calls to session_start are made. Because of some browser bugs we
    > need to modify these headers before they are sent to the browser. This
    > would be possibily with a simple 'header' call if this call is made
    > after session_start.
    >
    > The problem now is that we run numerous 3rd party scripts which we
    > don't want to modify - an ideal solution would be if it was possible to
    > override session_start, so that our implementation of session_start
    > calls the original session_start function and sets the headers
    > afterwards.
    >
    > If this is not possible, would it be possible to import a modified
    > session_start method via auto_prepend_fi le which does these things -
    > how can i reference the 'original' session_start method in this case?
    > cu
    > /gst
    >[/color]

    Nope, it's not possible. I would suggest turning on output buffering in an
    auto-prepend file, then changing the HTTP headers in a auto-append file.


    Comment

    Working...