Overriding/Replacing a method in the PHP installation.

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

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_limiter 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

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

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

Quoted text here. Click to load it

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.

Site Timeline