473,394 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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_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
afterwards.

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?
cu
/gst

Jul 17 '05 #1
1 1733
"Guenther Starnberger" <sy*****@gmail.com> wrote in message
news:cg********@odah37.prod.google.com...
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_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
afterwards.

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?
cu
/gst


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.
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Ovid | last post by:
Hi, I'm trying to determine the cleanest way to override class data in a subclass. class Universe { public String name; private static double PI = 3.1415; Universe(String name) {
7
by: Alex VanderWoude | last post by:
Is there a way to override a method on a class whose source you cannot change in such a way that you can hook into that method's code? After doing some research, it appears that one way to do such...
3
by: Ali Eghtebas | last post by:
Hi, I have 3 questions regarding the code below: 1) Why can't I trap the KEYDOWN while I can trap KEYUP? 2) Is it correct that I use Return True within the IF-Statement? (I've already read...
9
by: James Marshall | last post by:
I'm writing a library where I want to override document.write(), but for all document objects; thus, I want to put it in the prototype. I tried Document.prototype.write= my_doc_write ; but it...
4
by: ORi | last post by:
Hi all ! There's a question I've been bothering for a while: I'm actually developing architectural frameworks for application developing and I think virtual methods, although needed because of...
17
by: Bob Weiner | last post by:
What is the purpose of hiding intead of overriding a method? I have googled the question but haven't found anything that makes any sense of it. In the code below, the only difference is that...
3
by: Amin Sobati | last post by:
Hi, I have two classes. Class2 inhertis Class1: ----------------------------- Public Class Class1 Public Overridable Sub MySub() End Sub End Class Public Class Class2
8
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
I have a RichTextBox (rtfTerminal below) in which I would like to replace the last line with the last line minus its last character (i.e., do a backspace). I tried the following code, wherein I...
10
by: r035198x | last post by:
The Object class has five non final methods namely equals, hashCode, toString, clone, and finalize. These were designed to be overridden according to specific general contracts. Other classes that...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.