Commit Graph

869 Commits

Author SHA1 Message Date
Aaron Bannert
27a5b380cf PHP filters and Apache 2 aren't quite a perfect match yet, so we have
to do some trickery with the server_context to make sure it is always
valid within the current thread.

This patch makes sure the server_context is created in apache's
post_read_request hook phase, and then registeres a cleanup that
will NULL out the server context when the request goes out of scope.
Then, inside the output filters, if the server_context is null we
throw an error. Finally, instead of saving the output filter in
the server_context, now we store the entire request_rec pointer
in there.

POST bodies appear to be working now, although they are very inefficient.
The input filter is still just realloc()ing for whatever data comes
down the input pipe, and then sending this to PHP. This means that
we are doing some really nasty memory management on big POST bodies.
For now this it allows for unlimited input bodies, which means that
a big POST could potentially DoS a box by making it run out of memory.
We might want to put a limit on here just in case, at least until
we figure out how to consume input data more efficiently into php.
2002-04-11 19:25:08 +00:00
Aaron Bannert
caf7f3d4d2 Don't depend on the context provided by the filter (f->ctx) anymore. In
Apache 2 the input and output filter contexts are kept unique. We now
only depend on SG(server_context) for each request, and assume that
the same thread will process the entire request. At some point it
would be wise to separate the input and output contexts.
2002-04-11 17:34:17 +00:00
Aaron Bannert
d19fd6a0ad Return the number of bytes consumed, not the number of bytes left.
Suggested by:  Brian Havard <brianh@kheldar.apana.org.au>
2002-04-11 17:22:11 +00:00
Sebastian Bergmann
bdc27671cd Update README. 2002-04-11 17:01:51 +00:00
Sebastian Bergmann
38af983c80 Patch by Aaron Bannert <aaron@clove.org> and Cliff Woolley <jwoolley@virginia.edu>. 2002-04-11 06:01:54 +00:00
foobar
6958369295 Let people know this stuff is experimental. 2002-04-10 09:42:38 +00:00
Sterling Hughes
53fdf83f09 eekk -- and ssb thought my macro's were icky :) 2002-04-09 17:25:13 +00:00
Sterling Hughes
11acdb097d fix compile warnings 2002-04-09 06:13:00 +00:00
Sebastian Bergmann
777bc9f954 Fix output directory. 2002-04-06 15:45:00 +00:00
Sebastian Bergmann
b0eb69ecc0 Fix output directory. 2002-04-06 15:37:08 +00:00
Sebastian Bergmann
db840b8001 Fix Debug_TS build. 2002-04-06 08:57:06 +00:00
Wez Furlong
abc5a2cacb fix quoting 2002-04-02 16:45:10 +00:00
James Cox
99a68d4f83 just did... 2002-04-02 01:35:45 +00:00
James Cox
f3d107a180 updated the alert sent to the browser. removed the verbosity, and linked to more info. 2002-04-02 01:34:15 +00:00
Marko Karppinen
676afb33b8 Enable --with-apxs build on Mac OS X. We build an MH_BUNDLE instead of
an MH_DYLIB. As all PPC code is relocatable, we don't use the libtool
based shared build but go a static route. Goodbye libtool!
# I'm committing this to enable widespear testing.
# Anyone have any ideas on how to easily backport this to 4.2.0?
2002-03-30 03:17:25 +00:00
Marko Karppinen
60663c1f64 Prepare for MH_BUNDLE build on Mac OS X / Darwin 2002-03-29 19:25:55 +00:00
Doug MacEachern
eab1211ed1 adjust to recent apr bucket api changes 2002-03-29 15:42:18 +00:00
foobar
49ba2a983b WS fix 2002-03-27 22:49:21 +00:00
Marcus Boerger
406c665c13 recorrect las checkin 2002-03-27 21:01:26 +00:00
Marcus Boerger
f277bf0c5c allow other modes to work with -- correct
#original idea was to allow this *only* for PHP_MODE_STANDARD
2002-03-26 14:43:57 +00:00
Marcus Boerger
a2631c1f1d fix behaviour on --
#now php -- -i for scriptfile -i works
2002-03-26 11:22:20 +00:00
Alex Waugh
0f3b304506 Backslashes caused the build to fail with autoconf 2.52 2002-03-24 22:57:00 +00:00
Edin Kadribasic
62df9cf644 Override max_execution_time, setting it to unlimited. 2002-03-24 17:14:34 +00:00
Edin Kadribasic
9ecec88998 Documented -r and added TODO 2002-03-23 23:47:10 +00:00
Marcus Boerger
fdf9d3502a -removed -x
-error handling for illegal switch combinations
-corrected ws for one case block
2002-03-23 17:10:31 +00:00
Sebastian Bergmann
bfa05df3fd Nuke unused variables. 2002-03-23 13:13:15 +00:00
Marcus Boerger
122c18741c @Added new switch -x to CLI that enables execution of files without @scripting tags. (Marcus)
-Add -x
#Read follow up mail
2002-03-22 15:26:27 +00:00
Zeev Suraski
dcb44bf512 - Fix whitespace (guys, please try to stick with the php4 tree style as far
as indentation/newlines go, and also as far as using {} even on if's
  that have single statements)
- Fix Windows build
2002-03-19 19:15:40 +00:00
Shane Caraveo
c806dca62c add security impersonation feature for running under IIS security 2002-03-18 04:48:34 +00:00
Shane Caraveo
b84c61f314 Add impersonation feature for running under IIS 2002-03-18 04:46:32 +00:00
Shane Caraveo
4a8dda7d01 fix closing pipes
fix buffer overrun
2002-03-17 08:21:18 +00:00
Sebastian Bergmann
2ff115b01e Add note on which version of Apache 2 this SAPI module is compatible with. 2002-03-14 06:31:37 +00:00
Sebastian Bergmann
118761e11e Sync with Apache2 Filter API change. 2002-03-13 07:11:00 +00:00
Marcus Boerger
343b413cf8 -passing arguments to CLI, see: php -h 2002-03-11 16:25:32 +00:00
Ben Mansell
889988763f Instructions for using FastCGI-PHP with Apache 2002-03-11 14:34:56 +00:00
Ben Mansell
8154dbb7a2 Improved documentation for FastCGI SAPI. Documents the environment
variable tunings and the new command line usage.
2002-03-11 14:03:48 +00:00
Ben Mansell
8ac087a232 Add command line option to FastCGI SAPI to make it bind & listen to a
socket. This makes setting up 'remote' fastcgi much easier.
2002-03-11 13:37:25 +00:00
Sascha Schumann
a643a467e3 Add a note regarding which version we support 2002-03-11 12:28:16 +00:00
Sebastian Bergmann
3573a92c1a Fix warning, hope this is okay. 2002-03-11 07:58:52 +00:00
Shane Caraveo
c8f5565bf3 woohoo, take some credit! 2002-03-10 22:08:09 +00:00
Shane Caraveo
f3a60dd1a6 children should be zero by default, enable by setting PHP_FCGI_CHILDREN env var. 2002-03-10 21:52:00 +00:00
Shane Caraveo
79bb884eec combine fastcgi capability with regular cgi binary
include fastcgi library for ease of windows builds
NOTE: included fastcgi library is modified for thread safety, but
	fastcgi support in cgi_main.c is only written for single
	threaded serving.  This does not present any issue for using
	fastcgi.
2002-03-10 21:39:28 +00:00
Edin Kadribasic
7918fe45b4 Cleaned up previous commit.
#Oops, commited older patch the first time :)
2002-03-08 09:55:58 +00:00
Edin Kadribasic
61071e6b7b @- Added -r option to the CLI version of PHP which executes a piece of PHP
@  code directly from the commmand line. (Edin)
2002-03-08 09:47:52 +00:00
Sascha Schumann
9d9d39a0de Please welcome the new build system.
If you encounter any problems, please make sure to email sas@php.net
directly.

An introduction can be found on

http://schumann.cx/buildv5.txt
2002-03-07 14:20:02 +00:00
Derick Rethans
393cbe0ac3 - Put them back (and do it right) 2002-03-06 13:25:25 +00:00
Derick Rethans
c8740575c4 - Remove unused variables 2002-03-06 11:31:56 +00:00
Derick Rethans
a6738260af - Fix for bug #15572 (Patch by Ralf Nyrén <ralf.nyren@educ.umu.se>) 2002-03-04 17:46:19 +00:00
Sascha Schumann
a2065b8743 Reduce operations in the ub_write loop. 2002-03-04 08:25:20 +00:00
Sascha Schumann
66535c240e Free status line, initialize number_vec, correctly account for
the number of bytes in the document, avoid strcpy/strlen.
2002-03-04 08:22:33 +00:00