1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Commit Graph

249 Commits

Author SHA1 Message Date
George Schlossnagle
ef4573eaf2 white space changes (s/ /\t/g) 2002-10-23 07:12:13 +00:00
George Schlossnagle
c382dbbac6 fixed directory merging 2002-10-23 06:07:07 +00:00
George Schlossnagle
d9647606fb fixed return values for php_response_handler 2002-10-09 02:57:33 +00:00
George Schlossnagle
7adb8e0ba9 header code cleanup 2002-10-08 06:25:02 +00:00
George Schlossnagle
b85162590d sync with head. add optional content type param to send_http_header 2002-10-08 02:17:02 +00:00
George Schlossnagle
2306fe934d Cleaned up a bunch of code, fully integrated the class::method handler
code into a single stack per handlers (for correct interleaving).

Changed the syntax so that now they are of the form

phpUriHandler /filename
phpUriHandlerMethod Class::Method

This now works for all handlers including response handlers.
2002-08-30 19:12:28 +00:00
George Schlossnagle
b0e2b8604f added the ability to set handlers as class methods (classes will need to be
declared in a phpRequire statemenet, of course, or be otherwise available
at the hook run-time (builtins)).  This is currently only implemented
for the uri trans handler  it is usable as:

phpUriHandlerCodeRef MyClass::MyMethod

This can be greatly robustified from whre it stands now, but is a good proof
of concept (hopefully!)
2002-08-29 20:23:07 +00:00
George Schlossnagle
d44619a811 added all the sub_request methods and logging methods 2002-08-28 21:23:12 +00:00
George Schlossnagle
2bc1d055cb Added wrapper functions for the majority of the apache API_EXPORT functions
as class methods for the ApacheRequest objects.  broke sapi_activate
into two functions to allow for reading of headers/cookies separately
from request bodies (POST stuff).  Altered some of the send_headers code
in mod_php4.c to prevent sending headers twice (since a phpResponseHandler
needs to be able to have full freedom for setting headers using the
ap_*_header* functions.
2002-08-28 18:56:51 +00:00
George Schlossnagle
0a105b4130 added wrapper for ap_send_http_header so that phpResponseHandler is now
working.  Added protections to mod_php4's internal call to the same so
that headers cannot be accidentally sent twice.
2002-08-28 04:37:37 +00:00
George Schlossnagle
22528c9e59 This handler works much better when not commented out. :) 2002-08-28 03:55:42 +00:00
George Schlossnagle
4030dc1224 All handlers are now 'stacked' allowing for multiple handlers to be called in the
order they are listed in the httpd.conf for a section.  phpRequire is now supported (called out of the post-read request handler), and a first attempt at phpResponseHandler, a response-time type handler which is set by a

<Location blah>
SetHandler php-script
phpResponseHandler /tmp/foo.php
</Location>

To allow for the stacked handlers, the entirety of zend_stack.c was imported into mod_php4.c.  There is a patch pending to zend_stack.c to add the functionality so that all the redundant code can be removed.
2002-08-27 20:57:09 +00:00
George Schlossnagle
b185cac59d Replaced handler loading commands such that what was
php_value uri_handler /tmp/foo.php

is now

phpUriHandler	/tmp/foo.php

This fixes some bugs that caused handlers to be skipped or mysteriously 'unloaded',
reduces the number of calls to zend_alter_ini_entries that are necessary, as well
as allows for easier implementation of stacked handlers (which comes next).

Added 2 new hooks, phpPostReadHandler and phpHeaderHandler (going to the obvious places).
2002-08-27 14:41:53 +00:00
lukas schroeder
dc0ad431c8 - add interface functions for headers_in, headers_out and err_headers_out 2002-08-26 23:49:15 +00:00
George Schlossnagle
f05126e2cf Import of Lukas Schroeder's work to give php a full interface to apache 1.3.x's hook interface, and full class wrappers around the apache request object and it's interfaces. 2002-08-26 20:06:31 +00:00
SVN Migration
025580f68a This commit was manufactured by cvs2svn to create branch 'apache_hooks'. 2002-08-22 07:56:40 +00:00
Rasmus Lerdorf
15611c1885 Ok, get it onto the right branch
(cvs can get annoying sometimes)
2001-09-06 23:39:02 +00:00
Rasmus Lerdorf
2797cf1323 Apache request handler hook framework. So far only the uri hook is
implemented, but the others will be easy once I finish the uri translation
example.  The big things left to do is to create a proper $r request
object to be manipulated in user-space and also to verify that the hooks
don't steal the POST data such that it isn't available to the content
handler once it is finally called.  Or if we do steal it, make sure it
is somehow available to the content handler later on.

Comments and help with this stuff is more than welcome.  Check out these
files from the 'apache_hooks' branch to play along.
2001-09-06 09:53:34 +00:00
SVN Migration
22f9e24408 This commit was manufactured by cvs2svn to create branch 'apache_hooks'. 2001-08-31 22:03:25 +00:00
foobar
e29994166a WS 2001-08-31 22:03:24 +00:00
Zeev Suraski
6bba521dd3 API update 2001-08-31 14:34:40 +00:00
Daniel Beulshausen
ba761ce9b1 TSRMLS fixes 2001-08-14 17:05:53 +00:00
Thies C. Arntzen
e8e401bc2d ypo;-) 2001-08-14 08:33:21 +00:00
Zeev Suraski
6ecae422c4 Use zend_first_try 2001-08-08 14:01:22 +00:00
Sascha Schumann
480ffb3d75 more tsrm cleanup 2001-08-05 16:43:57 +00:00
Sascha Schumann
373b3e101e more tsrm cleanup -- output.c is not doing any fetches anymore 2001-08-05 15:55:43 +00:00
Sascha Schumann
8aef193056 more tsrm cleanup 2001-08-05 15:29:47 +00:00
Zeev Suraski
1159c84ab7 - TSRMLS_FETCH work
- whitespace fixes
2001-08-05 01:43:02 +00:00
Sebastian Bergmann
b99798fda0 Another one bites the dust. 2001-08-04 17:07:16 +00:00
Sebastian Bergmann
b5763a70a6 Remove duplicate TSRMLS_FETCH() call. 2001-08-04 17:02:43 +00:00
Zeev Suraski
12318a2068 Fix Apache/ZTS build 2001-08-01 22:53:26 +00:00
Zeev Suraski
d76cf1da18 More TSRMLS_FETCH work 2001-07-31 04:53:54 +00:00
Thies C. Arntzen
5f6e3db13f compile fix 2001-07-30 14:25:29 +00:00
Zeev Suraski
797a079a95 More TSRMLS_FETCH work, and a bit of cleanup 2001-07-30 06:18:13 +00:00
Zeev Suraski
7b1c400631 More TSRMLS_FETCH annihilation (Zend compatibility patch) 2001-07-30 04:58:07 +00:00
Zeev Suraski
1c25b8dd53 Avoid TSRMLS_FETCH()'s, and clean up a bit of stale extern's and layout on the way 2001-07-30 01:56:43 +00:00
Rasmus Lerdorf
15ae74d3ba Fix typo 2001-07-28 14:01:24 +00:00
Zeev Suraski
dde79b86c5 Build fix 2001-07-28 12:05:15 +00:00
Zeev Suraski
63829bc949 Some more fixes 2001-07-28 12:02:42 +00:00
Zeev Suraski
d87cc976e1 Redesigned thread safety mechanism - nua nua 2001-07-28 11:36:37 +00:00
Zeev Suraski
fe6f8712a4 - Get rid of ELS_*(), and use TSRMLS_*() instead.
- Move to the new ts_allocate_id() API
This patch is *bound* to break some files, as I must have had typos somewhere.
If you use any uncommon extension, please try to build it...
2001-07-27 10:16:41 +00:00
Zeev Suraski
536a53356d Get rid of the redundant global startup code 2001-07-24 20:30:37 +00:00
Sascha Schumann
36be1040eb Use synchronous php_request_shutdown in the standard case and
let the pool cleanup function only become effective, when an
error has occured.

This fixes the problem that the request_conn was already dead
when the request_shutdown was reached.
2001-07-23 01:03:22 +00:00
Zeev Suraski
6fa5ac832f Fix Apache build 2001-07-21 16:18:03 +00:00
Zeev Suraski
336004f4bc Improved bailout mechanism, supports nested bailouts a-la try..catch
Note:  You may *not* return directly from a catch block
2001-07-21 14:27:56 +00:00
Sascha Schumann
e843e8c5f0 Move PHP_TARGET_RDYNAMIC check to global acinclude.m4 and use it
in thttpd's config.m4.
2001-06-15 12:53:20 +00:00
Rasmus Lerdorf
81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Martin Kraemer
f2002d3e41 Oops, sorry. I should not have committed this ebcdic fix (which was none) 2001-06-01 12:58:41 +00:00
Sascha Schumann
1ad2a710ab Use EXTRA_LDFLAGS at this point.
I've confirmed that one can build a working Apache DSO module now
(AIX 4.2 with gcc 2.95.2 and Apache 1.3.12).
2001-05-23 21:23:16 +00:00
Martin Kraemer
c96d652843 Fix Basic auth (when under PHP control) for EBCDIC platforms 2001-05-23 15:24:53 +00:00