Commit Graph

731 Commits

Author SHA1 Message Date
Zeev Suraski
4e55747a2b Add JIT initialization for _SERVER and _ENV
(it's less important for the others, even though it should be fairly
easy now too)
2003-03-02 10:19:15 +00:00
Rasmus Lerdorf
ca2a28774a MFB: Get rid of a redundant syscall on non-Windows 2003-02-26 22:19:01 +00:00
Derick Rethans
424c41a72e - Added an extra ini setting with which extra commands can be forced to
the sendmail deamon on a per-vhost base. The value in this ini setting
  will override all extra commands passed as the 5th parameter to mail()
  and will work in Safe Mode.
@- Added an extra ini setting (mail_force_extra_paramaters) which forces
@  the addition of the specified parameters to be passed as extra
@  parameters to the sendmail binary. These parameters will always replace
@  the value of the 5th parameter to mail(), even in safe mode. (Derick)
2003-02-26 20:04:16 +00:00
Harald Radi
53d70b2c14 prevent xdebug from crashing 2003-02-19 16:17:15 +00:00
Wez Furlong
e52aac940f Implement simple stream support in the ZE scanners. 2003-02-18 09:37:54 +00:00
Zeev Suraski
4934744b93 Win32 build improvements 2003-02-17 13:29:59 +00:00
foobar
3a94aeae72 - Fix unsetting of open_basedir, safe_mode_exec_dir and user_dir with
"php_admin_value <ini option> none"
- Fixes bug #22220
2003-02-15 20:22:19 +00:00
Harald Radi
f8e014b228 MFPHP_4_3 2003-01-29 00:49:09 +00:00
Ilia Alshanetsky
a7ac507ade Fixed bug #21499 (more descriptive message in the event of require/include
failure).
2003-01-08 02:44:09 +00:00
Zeev Suraski
968f3f9a12 Remove unnnecessary initialization 2003-01-05 16:11:10 +00:00
Sebastian Bergmann
2c5d4b8c23 Bump year. 2002-12-31 15:59:15 +00:00
Ilia Alshanetsky
5bad812dad A better, strtok() free implementaion of php_disable_functions(). 2002-12-16 15:43:52 +00:00
Marcus Boerger
4ce4a1c32c php_error -> php_error_docref 2002-12-05 21:53:25 +00:00
Marcus Boerger
b7cd48efdd Make it possible to test language features like newly introduced 'abstract'
independantly from debug mode.
2002-11-21 14:56:06 +00:00
Marcus Boerger
c41b6b2967 Allow error_prepend and error_append being empty as used in run-test.php 2002-11-19 14:11:50 +00:00
Sebastian Bergmann
51e4dbaba0 Fix ZTS build. 2002-11-18 06:04:06 +00:00
George Schlossnagle
99c7ddc3a8 added support functions for the apache_hooks SAPI 2002-11-18 00:59:23 +00:00
Ilia Alshanetsky
f14b742392 Fixed bug #20466. 2002-11-17 22:52:47 +00:00
Zeev Suraski
d372861f03 Unify handling of error_reporting - fix bug #16137 2002-11-17 13:26:38 +00:00
Ilia Alshanetsky
8ed36bc318 Changed max_input_time PHP_INI_SYSTEM|PHP_INI_PERDIR because ini_set() will
already be too late, the POST/GET/COOKIE processing occures before the script
gets parsed.
Changed the default value to -1. If users have previously (older PHPs)
adressed the problem by setting timeout to a large value, we can avoid breaking
their script by detecting the -1 and using timeout_seconds instead of
max_input_time when setting the 'input' timeout.
2002-11-12 14:40:00 +00:00
Ilia Alshanetsky
bb14455e62 Added missing zend_lineno initilization. 2002-11-10 19:28:51 +00:00
foobar
609992baeb ws fixes 2002-11-10 02:48:22 +00:00
Stig Bakken
cd72343bb3 * honor track_errors ini setting in php_verror() 2002-11-10 02:09:26 +00:00
Ilia Alshanetsky
728eacbf52 A better fix for bug #20110. 2002-10-28 03:45:21 +00:00
Sterling Hughes
29a344b384 remove $_FILES from $_REQUEST as per php-dev conversation... 2002-10-28 02:46:09 +00:00
Derick Rethans
7592362b4c - Allow the report_memleak setting to be set everywhere 2002-10-24 16:56:59 +00:00
Sascha Schumann
2909e5c9c9 centralize #include "build-defs.h" and drop (sometimes inconsistent) other
instances
2002-10-24 13:15:49 +00:00
Moriyoshi Koizumi
fdc91ccc73 Renaming the functions. 2002-10-23 18:32:55 +00:00
Derick Rethans
d54f58d164 - Trying to clean up this mess :) 2002-10-23 09:35:21 +00:00
Derick Rethans
273d5e04d2 - No reason why implicit_flush should not be settable from a script 2002-10-23 09:31:33 +00:00
Hartmut Holzgraefe
8b7e9d7774 some changes to how request input data (Content-Lenght >0) is handled
- webdav-specific stuff removed (should be handled using httpd.conf
  LIMIT or equivalents)
- always_populate_raw_post_data now working on any method, not just
  POST (and webdav methods with allow_webdav_methods), when
	Content-Length is greater zero
- raw input data is also available using php://input stream,
  this way one doesn't have to care about memory_limit
- input data is now always consumed (although maybe ignored,
  this fixes we had withproblems with keep-alive connections
@ raw POST data is now available as php://input stream (hartmut)
2002-10-21 16:41:06 +00:00
Ilia Alshanetsky
b9efd22339 Fixed bug #16880. Added an ini option max_input_time that allows the user
to specify how much time a script may spend parsing input data (POST, GET, etc..).
2002-10-21 13:09:29 +00:00
Masaki Fujimoto
a6ecdca0ef fixed highlight related bugs (in case shift_jis input/output filters are enabled) 2002-10-20 02:57:40 +00:00
Ilia Alshanetsky
5ce6d653b8 Fixed bug #19921. (memory leak introduced by me in rev 1.492) 2002-10-16 16:52:08 +00:00
Sascha Schumann
5e97e66abb Nuke warning 2002-10-04 19:20:13 +00:00
Rasmus Lerdorf
989a61ed98 As discussed, add --with-config-file-scan-dir compile-time switch defining
a directory which will be scanned for *.ini files after the main php.ini
file has been parsed.  This makes it much easier to automatically deploy
a modular PHP since adding extensions which have their own ini switches can
now be done by simply dropping a foo.ini file in the right directory and
restarting.  A list of parsed ini files is maintained and shown on the
phpinfo page.
2002-10-04 04:47:35 +00:00
Zeev Suraski
d58c3dda96 Guys, please keep K&R. 2002-10-03 11:18:39 +00:00
Ilia Alshanetsky
7f18442882 Fixed a mem leak inside the path resolving code. 2002-09-29 22:16:29 +00:00
foobar
7aaa6bd77d ws fix 2002-09-29 19:22:39 +00:00
Ilia Alshanetsky
3f8ec7e764 Fixed bug #13936 2002-09-28 20:13:28 +00:00
Sascha Schumann
6816ba4b32 We are about to enter 2003, sending two-digit years does not make too
much sense anymore.  According to an article from '98, only Netscape 3.x was
affected anyway.
2002-09-25 16:11:31 +00:00
Wez Furlong
696e0a2301 Implement persistent streams. (for pfsockopen).
Juggle some includes/definitions.
Tidy up streams use in ext/standard/file.c
2002-09-25 15:25:12 +00:00
Sander Roobol
90407dbf3e Changing the magic_quotes_gpc setting has no effect at USER level
# this partially fixes the #19526 shit
2002-09-20 18:07:48 +00:00
Zeev Suraski
3ae3eb06e9 Fix connection_status() 2002-09-19 15:54:23 +00:00
Zeev Suraski
76312b4508 another startup initialization fix - only ISAPI and CGI SAPI's tested,
minor compile buglets might occur in other SAPIs, but should be trivial
to fix...
2002-09-18 21:57:42 +00:00
Zeev Suraski
31429c60db Call zend_post_startup() - use local copies of the function, class and
constant tables in the startup thread
2002-09-17 09:07:10 +00:00
Anantha Kesari H Y
fa94fc6384 NetWare related changes/modifications 2002-09-09 11:17:40 +00:00
Sebastian Bergmann
714c19fe66 Per discussion on #php.bugs (+1 from at least Derick and Jani), revert double_buffering. 2002-09-01 11:33:19 +00:00
Wez Furlong
2a71d7d5bb Respect safe mode setting when opening scripts and things for the ZE. 2002-08-23 17:39:20 +00:00
Christian Stocker
9495fb9d7d @ - Added php.ini option "allow_webdav_methods" to allow handling of
@   WebDAV http requests within PHP scripts. (chregu)
# More methods (for DeltaV) will follow.
2002-08-22 07:48:23 +00:00
Marcus Boerger
2a443b2e77 Changed handling of output buffer sizes.
@Added php.ini option "double_buffering" that forces an additional first
@output buffer and improved handling of buffer sizes. (Marcus)
2002-08-20 19:49:37 +00:00
Marcus Boerger
3408366776 -allow changing html_errors any time changing display_errors is already
-use sizeof for strftime call
-removed unused #define
-mention CODING_STANDARDS as documentation
2002-08-19 18:40:28 +00:00
Marcus Boerger
968721bc55 allow target anchor only for docref parameter 2002-08-13 09:37:51 +00:00
Marcus Boerger
1134977baf fix for extension = ""
make php_verror available
2002-08-12 20:12:31 +00:00
Wez Furlong
1861f1bae3 Minor fix for html_errors=on in php_error_docref. 2002-08-11 09:52:06 +00:00
Marcus Boerger
9c8ba935d6 Improved handling of output buffers (see news)\n#No trim for the string parameter... 2002-08-09 22:29:58 +00:00
Marcus Boerger
2e29e53e00 docref shall either be NULL or a reference to a manual page without an
extension or an external reference starting with 'http://'.
2002-08-09 21:57:03 +00:00
Marcus Boerger
e11e0b0ec0 No missleading 2002-08-08 22:11:24 +00:00
Marcus Boerger
976a91a55b Say FIXME to non function calls and non TSRM builds. Both will currentls
not show a default reference.
2002-08-08 19:36:49 +00:00
Marcus Boerger
88c385e817 rename php_error_func<n> to php_error_docref and support Wez idea
that solves ToDo requirement to point to PHP Manual in error messages.
2002-08-08 19:12:27 +00:00
Marcus Boerger
e50228ab5b -new functions php_error_func<0> to support unified error messages
#read followup
2002-08-07 18:29:36 +00:00
Rui Hirokawa
7527bf0c58 made sapi_register_treat_data() to support multibyte input encoding translation without MBSTR_ENC_TRANS and changed php_treat_data to php_default_treat_data. 2002-08-02 06:53:48 +00:00
foobar
2dbd41869c Allow setting post_max_size and upload_max_filesize in .htaccess files too 2002-07-25 17:31:34 +00:00
Stefan Esser
3e05678842 do not dtor empty elements 2002-07-25 09:33:26 +00:00
Derick Rethans
9ae8c39bab - set_time_limit() now returns whether it succeeded in changing the time
limit.
2002-07-17 08:06:43 +00:00
foobar
ed58d3a235 - Added predefined constants for the upload errors.
- Removed the debugging error (not useful for end-users)
2002-07-12 01:49:58 +00:00
Derick Rethans
6819ee3624 - Fix for bug #18283
#- It doesn't work from within a script anyways
2002-07-11 19:38:08 +00:00
foobar
2afacbf1cf These two can not be set in script. (so that they would have any effect) 2002-07-08 06:51:41 +00:00
foobar
4b321b0430 Fix win32 build. 2002-07-01 09:00:00 +00:00
Sander Roobol
d325d07b1a Main script should not be parsed when (include|require)_once()'ed, #17720
# Derick, MFH?
2002-06-30 13:38:16 +00:00
Derick Rethans
d812929d2f - Implement Andrei's request for disabling memory leak reporting in debug
builds.
#- Andrei: I can show you the logs :)
2002-06-26 19:43:46 +00:00
Marcus Boerger
761e234a43 -unlimited php_printf 2002-06-23 00:57:01 +00:00
foobar
d2f2ed76d1 Use correct macro for boolean ini values. 2002-06-19 00:18:40 +00:00
Stig Bakken
40ab700677 @New constants: PHP_PREFIX and PHP_SHLIB_SUFFIX (Stig) 2002-06-07 12:19:26 +00:00
Markus Fischer
b04656ad40 - Finish implementation of custom smtp port (introduces "smtp_port" ini config). 2002-06-02 17:13:48 +00:00
Zeev Suraski
2260e1742d - Centralize html_puts() again
- Revolutionize phpinfo()'s speed
2002-05-13 08:46:24 +00:00
Sascha Schumann
f866bdc368 Simplify even more 2002-05-12 15:30:44 +00:00
Sascha Schumann
5c4ae13670 Simplify white space handling in php_html_puts.
If we encounter a ' ', we will look for the next non-' ' and set p
accordingly.
2002-05-12 15:22:11 +00:00
Sascha Schumann
a769454d79 reenable php_html_puts 2002-05-12 14:48:22 +00:00
Zeev Suraski
bf97148978 Centralize html_puts() logic - php_html_puts() remains as an API wrapper 2002-05-11 12:41:33 +00:00
Zeev Suraski
77f41212f6 Removing HTMLization of ' ' wasn't ok, it didn't deal with series of spaces
properly.  Turn series of spaces into &nbsp;'s.
2002-05-11 12:17:53 +00:00
Zeev Suraski
5af649efbd Revert to the old php_ini.c, and reimplement the binary-path searching.
Should now also work under UNIX (CLI/CGI)
2002-05-11 03:41:17 +00:00
foobar
773da954f8 ws fix 2002-05-09 19:58:39 +00:00
Rui Hirokawa
f30b722f14 Added conversion support from script character encoding to internal character encoding. This feature is very useful for japanese who uses Shift_JIS encoding because some of characters in Shift_JIS are including '0x5c' and it causes some troubles on Zend parser. This patch is made by Masaki Fujimoto. 2002-05-08 12:33:44 +00:00
Yasuo Ohgaki
f61b795a8f Make Content-Type output always correct.
# Flushing buffer is needed to be fixed properly anyway...
2002-05-02 01:58:12 +00:00
Wez Furlong
479aa767f5 revert... 2002-04-30 00:17:48 +00:00
Wez Furlong
37411dd674 Implement context option setting API.
Add/amend debugging code for sockets.
Add a flag that will help the http wrapper optimize itself when
it is not being used for include/require.
2002-04-30 00:16:00 +00:00
Wez Furlong
e1d0a14790 Implement stream context and status notification system.
Bump the BC for zlib notice to a warning
# See my RFC to php-dev a few days ago
2002-04-10 22:42:32 +00:00
Marcus Boerger
bd9cf79efb new ini setting log_errors_max_len
@-New ini setting log_errors_max_len controls maximum length for error
@ messages. Set it to 0 for infinite. Default is 1024 (old behaviour) (Marcus)
2002-04-10 01:27:44 +00:00
foobar
14a6bc6d69 upload_max_filesize can only be set in php.ini 2002-04-08 07:58:47 +00:00
Marcus Boerger
ddc6437e32 new feature ignoring repeated error messages (defaults to old behaviour)
@You can now disable logging of repeated error messages with two new ini settings ignore_repeated_errors, ignore_repeated_source. @(Marcus)
2002-04-06 18:49:59 +00:00
Wez Furlong
7990d742e5 Improve behaviour of the stream casting operation.
Improve interaction with fopencookie.
2002-03-19 23:29:37 +00:00
Wez Furlong
14a3911866 fix for bug #16168 2002-03-19 17:49:02 +00:00
Wez Furlong
c9d5e13738 TSRMLS related work on streams, as discussed with Zeev.
# Should be the last "broad" commit for a while
# Don't forget to make clean ; make
2002-03-18 18:54:32 +00:00
Zeev Suraski
73e79322ba Fix the build and all of the outstanding VC++ warnings 2002-03-18 08:05:28 +00:00
Wez Furlong
d2d8762267 Streams now make more use of the memory manager, so tracking down
leaking streams should be easier.
# I hate these big commits
2002-03-17 22:50:59 +00:00
Wez Furlong
bed04279c3 Hopefully fix resource usage so that we have no leaks and don't segfault. 2002-03-16 14:39:51 +00:00
Wez Furlong
6beb1e37a8 work around apache segfault for the moment 2002-03-16 13:50:17 +00:00
Wez Furlong
28d6981152 more *'s 2002-03-16 01:58:13 +00:00
Wez Furlong
0f65280cb5 New PHP streams... 2002-03-15 21:03:08 +00:00
foobar
f30a9f1c86 - Commented out the space escaping. Works now as it did before. 2002-03-09 00:24:02 +00:00
foobar
f57fe2a8df - Fixed the phpinfo() tables not to blow up when using very long
configure line.
2002-03-07 22:18:09 +00:00
Derick Rethans
9c5b4a6c25 - Some more speed (and more consistency)
#- I had some spare time Sascha :)
2002-03-04 19:08:17 +00:00
Sascha Schumann
b4d5aa5c50 Supply php_html_puts which escapes a whole string.. now fully works in ZTS
mode, too.
2002-03-04 18:46:55 +00:00
Edin Kadribasic
ab57683ea0 Added PHP_SAPI constant which contains the name of running SAPI.
@- Added PHP_SAPI constant which contains the name of running SAPI. (Edin)
2002-03-01 19:29:35 +00:00
Yasuo Ohgaki
82a8d372e5 Added ob_get_status() to get array of buffers and it's status.
(DO NOT document this function yet)

Fixed crash bug with ob_end_*() function. ob_end_*() will not delete
buffers that may not be deleted.

php_start_ob_buffer() and php_ob_set_internal_handler() takes parameter for
if the buffer created may be deleted or not.

Added 3rd parameter "bool erase" to ob_start(). If FALSE, buffer may not be
deleted until script finshes.

Changed ob_*() function that have void return type to bool. All ob_*()
functions return TRUE for success, FALSE for failure.

@ - Added ob_get_status() to get array of buffers and it's status. (Yasuo)
@ - Fixed crash bug with ob_end_*() function. ob_end_*() will not delete
@   buffers that may not be deleted. (Yasuo)
@ - Added 3rd parameter "bool erase" to ob_start(). If FALSE, buffer may not be
@   deleted until script finshes. (Yasuo)
@ - Changed ob_*() function that have void return type to bool. All ob_*()
@   functions return TRUE for success, FALSE for failure. (Yasuo)
2002-03-01 03:05:50 +00:00
Andi Gutmans
c456da514c - Hopefully fix the shutdown_memory_manager() stuff. Part of my previous
- patch seems to have gotten lost
2002-02-26 19:38:41 +00:00
Sebastian Bergmann
1b32da412d TSRM Cleanup. 2002-02-26 19:31:21 +00:00
Andi Gutmans
a306665717 - Pass shutdown_memory_manager the TSRMLS context. 2002-02-26 18:59:27 +00:00
Derick Rethans
86fa2d3937 - Let php_execute_script return 0 on failure and 1 on sucess, and change
SAPIs accordingly. (Andrei, Derick)
2002-02-14 20:16:08 +00:00
Yasuo Ohgaki
0bf51b81bd register_globals=off is defualt for 4.2.0 2002-02-05 06:31:53 +00:00
Edin Kadribasic
4972fac567 Ignore register_globals for $argc and $argv under CLI SAPI. 2002-01-31 00:05:07 +00:00
Yasuo Ohgaki
34cfada447 Make --enable-safe-mode useful
# It seems this option is broken for a long time.
@ Fix --enable-safe-mode. This configure option was not working.
2002-01-19 03:15:03 +00:00
Derick Rethans
645a94cd5e - Make an E_NOTICE error type show 'Notice' instead of 'Warning'. 2002-01-10 16:00:08 +00:00
Edin Kadribasic
1788410a56 Added argc and argv in request_info needed for the new cli sapi.
Modified registering $argc and $argv to support cli sapi.
2002-01-06 13:58:05 +00:00
Zeev Suraski
8e5e7efc5b Freeing that TLS is just too complicated. Since we're shutting
down anyway, remove it for now (it did not exist in 4.0.6)
2001-12-16 22:45:57 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Bernd Roemer
99639f5812 Allow unserializer_callback_func to be turned off. 2001-12-02 17:31:11 +00:00
Derick Rethans
06cdf297a8 - Adding a callback mechanism to the unserializer. (patch by Bernd
Roemer <berndr@bonn.edu>)
#- An explainatory e-mail will be send to php-dev
2001-11-26 21:04:21 +00:00
Sterling Hughes
b91a66699c Z_TYPE(filehandle)?? ok.. whatever... ;) 2001-11-26 18:57:44 +00:00
Zeev Suraski
312a226707 Fix set_time_limit() to affect only the current request (fix bug #13711) 2001-11-19 14:59:38 +00:00
Derick Rethans
a0bbfb590c - <br> -> <br /> 2001-10-06 20:13:39 +00:00
Jeroen van Wolffelaar
c033288573 Back-substitute for Z_* macro's. If it breaks some extension (the script isn't optimal, it parses for example var->zval.value incorrect) please let me know. 2001-09-25 21:58:48 +00:00
Derick Rethans
78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
Zeev Suraski
6bba521dd3 API update 2001-08-31 14:34:40 +00:00
Zeev Suraski
ab48027b3e Fix unclean shutdown value 2001-08-30 13:38:33 +00:00
Thies C. Arntzen
3510482971 move php_shutdown_config further down 2001-08-16 09:40:05 +00:00
Zeev Suraski
e077c6bc28 Make it possible to enable chunked output buffering without providing
an output handling function
2001-08-11 22:55:00 +00:00
Zeev Suraski
f47962c7c0 Implement import_request_variables() 2001-08-08 20:05:37 +00:00
Zeev Suraski
c31ba75577 Put it in the wrong case... 2001-08-08 19:15:38 +00:00
Zeev Suraski
6fdf6b4c82 - Fix precedence of the variables order in $_FORM
- Rename $_FORM to $_REQUEST for now
2001-08-08 18:26:03 +00:00
Zeev Suraski
5eb9495b1b - Implement $_FORM
- Update phpinfo()
- Update NEWS
2001-08-08 17:16:20 +00:00
Zeev Suraski
7f4453f4c1 - Implement new short names - $_GET, $_POST, $_COOKIE, $_SERVER, $_ENV and $_FILES
- Use the Zend Engine infrastructure - make these variables available in
  all functions
2001-08-08 16:36:04 +00:00
Sascha Schumann
b349df6364 some more eliminate-fetches-or-escalate-them-at-least 2001-08-05 16:21:33 +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
Zeev Suraski
2ec440078a Get rid of a couple of bogus persist_alloc()'s, and some cleanup 2001-08-03 07:15:14 +00:00
Zeev Suraski
b1de7fc900 More TSRMLS_FETCH annihilation. Enough for today... 2001-07-31 07:09:49 +00:00
Zeev Suraski
bc42c37513 More TSRMLS_FETCH work. Got it under 400 now. 2001-07-31 06:28:05 +00:00
Zeev Suraski
d76cf1da18 More TSRMLS_FETCH work 2001-07-31 04:53:54 +00:00
Zeev Suraski
c43806f415 Zend compatibility patch 2001-07-30 08:24:42 +00:00
Zeev Suraski
797a079a95 More TSRMLS_FETCH work, and a bit of cleanup 2001-07-30 06:18:13 +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
Zeev Suraski
d87cc976e1 Redesigned thread safety mechanism - nua nua 2001-07-28 11:36:37 +00:00
Sascha Schumann
30892690b3 Remove superfluous returns 2001-07-28 00:44:19 +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
076f4f5136 Unbreak various tests and transparent session id rewriting for now. This
has been tested extensively.  Most SAPI modules (Apache 1.x, 2.0, thttpd,
AOLserver, CGI, TUX, Caudium, Roxen, NSAPI, Phttpd, Pi3web, Servlet)
call php_request_shutdown() right after php_execute_script (or
equivalent functionality), so that output is possible under an
overwhelmingly number of web-servers.
2001-07-23 14:05:26 +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
Zeev Suraski
13ac04b8e5 Avoid getting bailouts on text output during shutdown. Text output is now
'officially' disabled during shutdown (this doesn't change the Apache module
behavior, but may change behavior of other server modules, in which it was
possible to emit output during shutdown;  I think it's a good step towards
consistency, though)
2001-07-20 13:59:00 +00:00
Rasmus Lerdorf
9bc97ac865 Add always_populate_raw_post_data ini directive and default it to 0 to
maintain current behaviour.  If this is turned on then $HTTP_RAW_POST_DATA
is always populated with a copy of the raw post data.
@ - Add config option (always_populate_raw_post_data) which when enabled
@   will always populate $HTTP_RAW_POST_DATA regardless of the post mime
@   type (Rasmus)
2001-07-17 16:46:07 +00:00
Zeev Suraski
d1ac05a850 Fix warning 2001-07-15 19:14:25 +00:00
Zeev Suraski
54d6837b4b 2nd bug in the same line 2001-07-15 12:22:11 +00:00
Zeev Suraski
c77ed81803 remove bogus & 2001-07-15 12:02:58 +00:00
Zeev Suraski
ee19afea96 Make bailouts valid at request_startup 2001-07-15 11:53:18 +00:00
James E. Flemer
771e3e498f o Fixed Bug #12121: chdir and safe_mode
- [ main/safe_mode.h ] added new checkuid mode:
    CHECKUID_ALLOW_ONLY_FILE: skips directory check if file check
	fails

  - [ ext/standard/dir.c ] changed php_checkuid() to use
    CHECKUID_ALLOW_ONLY_FILE instead of CHECKUID_ALLOW_ONLY_DIR

  - [ main/safe_mode.c ] added code for new checkuid mode

o Fixed Bug #12119: safe mode owner check can be bypassed with symlink
  - [ main/safe_mode.c ] use VCWD_REALPATH to resolve destination
    of symlink before trimming filename

o New Feature: safe_mode_include_dir (php.ini directive)
  - Allows bypassing UID/GID checks when including files
    from the directory in safe_mode_include_dir and its
	subdirectories. (safe_mode must be on, directory must
	also be in include_path or full path must be used when
	including)

o Fixed Feature: safe_mode_gid (php.ini directive)
  - Correctly check (and report) UID/GID bits on directories

o Changed include() fall back to scripts cwd implementation
  - CWD added to the (local) search path in php_fopen_with_path()
    instead of seperate case. [ main/fopen_wrappers.c ]
2001-07-13 18:21:21 +00:00
Sascha Schumann
3dd33fdede Fix xmlrpc_error:number handling 2001-07-13 16:08:39 +00:00
Sascha Schumann
a2ce3c7068 Allow errors to be returned as XMLRPC fault packets.
Submitted by: Matt Allen <matt@investigationmarketplace.com>
2001-07-10 15:59:33 +00:00
Rasmus Lerdorf
934e10c7dc Add getmygid() and safe_mode_gid ini directive to allow safe mode to do
a gid check instead of a uid check.
@ - Add getmygid() and safe_mode_gid ini directive to allow safe mode to do
@ a gid check instead of a uid check. (James E. Flemer, Rasmus)
2001-07-09 17:36:04 +00:00
Zeev Suraski
551f1831a7 Fix a major thread safety bug in the output mechanism
@- Fixed a major memory corruption bug in the thread safe version (Zeev)
2001-07-02 18:17:10 +00:00
Zeev Suraski
a13252b601 - Fix leak in case of a syntax error
- Be more verbose in lint mode
2001-06-21 13:47:26 +00:00
Zeev Suraski
167dcb00be Remove redundant code from lint mode, it should now do only what it needs to do
and not anything else, and should no longer leak.
2001-06-21 09:24:53 +00:00
Rasmus Lerdorf
81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Rasmus Lerdorf
25c3a3a39d vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
Andrei Zmievski
171c425641 A little clean, merge two if statements. 2001-06-01 15:01:29 +00:00
foobar
128df6ead7 Fixed: http://www.php.net/bugs.php?id=10733&edit=1 2001-05-08 20:11:46 +00:00
foobar
d8ab8ea544 Fixed bug: #7227. Now the correct strings (if set) are shown. 2001-05-06 15:22:22 +00:00
Daniel Beulshausen
0a121f855c make pgsql build under win32 again 2001-04-30 14:23:41 +00:00
Andi Gutmans
4c823e8a89 - Change macros from V_ to VCWD_ because of AIX name clash 2001-04-30 12:45:02 +00:00
Andi Gutmans
02b9292ff2 - Update to work with latest Zend
PR:
Submitted by:
Reviewed by:
Obtained from:
2001-04-29 12:58:50 +00:00
Stig Bakken
073fa0ee73 * define PEAR_EXTENSION_DIR as well 2001-04-25 21:46:40 +00:00
Stig Bakken
2cf1b8d345 * expanded the following constants and made them available in PHP:
DEFAULT_INCLUDE_PATH
  PEAR_INSTALL_DIR
  PHP_EXTENSION_DIR
  PHP_BINDIR
  PHP_LIBDIR
  PHP_DATADIR
  PHP_SYSCONFDIR
  PHP_LOCALSTATEDIR
  PHP_CONFIG_FILE_PATH
* no longer generating pear/PEAR.php
* fixed some tests
* some more installer work
2001-04-22 01:09:14 +00:00
foobar
c34d2b91da Added new configuration directives:
arg_separator.input and arg_separator.output
2001-04-04 20:46:26 +00:00
Zeev Suraski
9db5589161 Recode delayed loading in a much simpler way (switched back to php_ini.c 1.49) 2001-03-17 23:35:32 +00:00
Frank M. Kromann
4578c9af93 Removing a compiler warning 2001-03-07 16:33:13 +00:00
Zeev Suraski
c64fe7fbe1 Fix non-thread safe mode 2001-03-04 01:45:19 +00:00
Andi Gutmans
eb6ba01d1c - Fix copyright notices with 2001 2001-02-26 06:11:02 +00:00
Sascha Schumann
c2fb53bed7 Finish fopen-wrappers rename. 2001-02-23 22:07:16 +00:00
Andi Gutmans
9a28132876 - Fix indentation and remove comment. 2001-02-22 11:30:53 +00:00
Shane Caraveo
09c7116f6e zend_compile_file returns a NULL on error, check for that before
calling destroy_op_array unless we like crashes :-)
2001-02-21 20:50:49 +00:00
Hartmut Holzgraefe
b14d2cc0dc will now initialize dynamic extensions *after* static ones 2001-02-21 01:43:15 +00:00
Zeev Suraski
93f4fa8d73 cleanup time... 2001-01-13 13:16:56 +00:00
Zeev Suraski
7b7d1d962d Remove some more useless code 2001-01-13 13:14:49 +00:00
Zeev Suraski
fc1cdda10d Remove stale code 2001-01-13 13:10:50 +00:00
Zeev Suraski
7235542cee Change get_ini_entry to get_configuration_directive 2001-01-07 18:38:38 +00:00
Zeev Suraski
bd0ac7fe14 Many patches. I hope I remember them all:
- Make sapi_module available to external modules (PHPAPI)
- Make the php.ini path reported in phpinfo() always point to
  real full path of the php.ini file
- Optimized the ISAPI module not to read unnecessary server
  variables and read necessary variables at most once.
2001-01-02 22:49:31 +00:00
Zeev Suraski
338b9b0819 - Make the INI mechanism thread safe (fix necessary API changes from Zend)
- Make the Win32 non-TS configuration build again
2000-12-27 15:43:05 +00:00
Zeev Suraski
2672602e30 Output buffering was being enabled all the time - fixed 2000-11-29 01:02:27 +00:00
Zeev Suraski
888f376e4c Very initial work on chunked output buffering. It's really unoptimized at
this time, and it can crash under some circumstances, but that's the
concept...
2000-11-23 18:43:18 +00:00
Sascha Schumann
0222f92358 Return the exit status from php_execute_script() 2000-11-22 04:23:26 +00:00
Frank M. Kromann
19555e57a8 removing compiler warning by including credits.h 2000-11-20 22:31:38 +00:00
Zeev Suraski
0f7f5c2c0e - Import Jade Nicoletti's transparent gzip encoding support as an output
handler.  Works quite nicely!
- Fix buglets in output buffering
- Add output_handler INI directive
2000-11-13 18:54:37 +00:00
Zeev Suraski
9e40204f00 @- In CGI mode, $HTTP_SERVER_VARS now includes all of the environment variables
@  as well (Zeev)
2000-11-07 18:25:29 +00:00
Sascha Schumann
43ff395b65 Const'ify part of sapi_request_info.
query_string, post_data, path_translated, request_uri, auth_user,
auth_password and argv0 are modified, so they cannot become const.
2000-11-02 15:47:02 +00:00
Zeev Suraski
e8e3be00d5 Fix a few warnings 2000-11-02 14:18:34 +00:00
Hartmut Holzgraefe
00b8b66132 generalization of image handling in phpinfo 2000-10-31 17:21:52 +00:00
Zeev Suraski
fc466bebd8 Fix memory_limit build problem 2000-10-31 12:46:07 +00:00
Sascha Schumann
13183ed5c3 Add php_handle_aborted_connection()
Call this from your SAPI module to signal an aborted connection.
2000-10-29 16:00:42 +00:00
Zeev Suraski
19dad410ec Fix Windows build 2000-10-29 11:56:42 +00:00
Zeev Suraski
1fd09132c2 Initial steps to move the INI mechanism to the Zend engine 2000-10-29 11:38:26 +00:00
Sascha Schumann
3b02d88b8e Initialize auth_(user|password) to NULL, if data was not suitable. 2000-10-27 10:28:57 +00:00
Sascha Schumann
85b52234e4 Utility function for sapi modules (it is not in SAPI.c, because it
relies on php_base64_encode).
2000-10-27 10:16:54 +00:00
Sascha Schumann
f367b3dfc8 Move some code to php_handle_special_queries(). 2000-10-26 21:16:12 +00:00
Sascha Schumann
5583203e91 Move some initialization code from php_execute_script() to
php_request_startup() where it should be. AFAICT, it does not
cause any problems, but please it test it with your favorite SAPI
module.
2000-10-26 18:32:38 +00:00
Andrei Zmievski
7b4983c8f8 Mega-patch to get better resource information for modules.
* Fixed a bug in zend_rsrc_list_get_rsrc_type()
  * Switched register_list_destructors() to use
    zend_register_list_destructors_ex() instead
  * Updated all relevant modules to provide the resource type name
    to register_list_destructors() call
  * Updated var_dump() to output resource type name instead of number

@- Made resource type names visible, e.g. var_dump() and
@  get_resource_type() display "file" for file resources. (Andrei)
2000-10-20 18:25:16 +00:00
Zeev Suraski
98bbb11780 Fix a crash in CGI mode, in case no file is provided 2000-10-17 18:12:31 +00:00
Hartmut Holzgraefe
6d5f1d97f8 now it works for me as CGI and APXS, with or without --enable-debug ... 2000-10-13 10:04:17 +00:00
Hartmut Holzgraefe
cae27179ce fopen wrappers cleanup
- comfiguration is now done by an ini parameter
    instead of a compile time option
  - the implementations of the three standard wrappers
    now live in seperate files in ext/standard
  - the compiler is happy again, no more warnings
2000-10-13 00:09:31 +00:00
Andi Gutmans
d37b140601 - Fix VC++ warning 2000-10-03 14:43:04 +00:00
Andi Gutmans
2622eba31d - Cleanup some output functions 2000-09-30 16:13:48 +00:00
Zeev Suraski
ec4a36ec12 complementary PHP patch 2000-09-27 19:46:47 +00:00
Stanislav Malyshev
1ccac6ed55 Add additional parameter to parse_str for saving result (thanks to
John Bafford <dshadow@zort.net>)
@ Added second parameter for parse_str to save result (John Bafford)
2000-09-11 14:50:26 +00:00
Derick Rethans
eba1b6221d - Fixed missing parameter in php_atoi 2000-09-09 23:21:44 +00:00
Zeev Suraski
b7ecaacd07 More security-related (control) patches:
- Avoid displaying errors during startup, unless display_startup_errors is enabled.
- Implemented post_size_max limit.  Defaults to 8MB.
- Implemented file_uploads on/off directive (defaults to on).
2000-09-09 15:02:15 +00:00
Stanislav Malyshev
522aec4443 Never trust snprintf return value 2000-09-08 12:52:05 +00:00
Stanislav Malyshev
6426d1c9ce Fix crash on very long error messages
Manual for snprintf says:
       If  the output was truncated, the return value is -1, oth-
       erwise it is the number of characters stored, not  includ-
       ing the terminating null.
And that's a blatant lie - in reality, libc 2.1 always returns number of
characters that _would be_ stored. I hate those libc bugs. Now we should go
and check every place we trusted snprintf return value.
2000-09-08 12:32:29 +00:00
Stanislav Malyshev
df5e0cb0a5 Fix syslog call 2000-09-08 12:07:21 +00:00
Zeev Suraski
4647bbb71a broken logic fixed. I'm getting old 2000-09-05 20:50:41 +00:00
Zeev Suraski
eb32144902 - Remove track_vars - it is now always on
- Make the various $HTTP_*_VARS[] arrays be defined always,
  even if they're empty
- Fix Win32 build and warnings
2000-09-05 19:06:29 +00:00
Zeev Suraski
cf8e389799 @- Added support for an optional output handler function for output
@  buffering.  This enables transparent rendering of XML through XSL,
@  transparent compression, etc. (Zeev)
2000-09-02 18:03:58 +00:00
Zeev Suraski
e065c308e9 - Fix dir.c
- Begin cleanup of php_error_cb()
2000-09-01 12:06:52 +00:00
Sascha Schumann
df273c9d01 Hopefully last round of fixing varargs use.
We don't need to create the log message twice, and by doing it only
once we also avoid the orig_args trap.
2000-09-01 09:54:32 +00:00
Stanislav Malyshev
ed3c85261b Make main.c compile again 2000-08-31 16:15:31 +00:00
Zeev Suraski
0bc2bb05d4 Safer shutdown process. Continue to shut down even if we bail out in the middle of a certain part. 2000-08-31 16:02:51 +00:00
Zeev Suraski
47f8af85f5 This is no longer relevant... 2000-08-30 18:06:17 +00:00
Zeev Suraski
0e482b1b30 - Truly fix varargs handling - the current situation was a sure-fire crash in most platforms
(the older code worked, even though it didn't compile well for some very odd reason, probably
  a compiler bug;  The new code would cause PHP to crash if both display_errors/log_errors and
  track_errors were enabled)
2000-08-30 18:02:00 +00:00
Stig Bakken
1b4d8c0fb6 @Added PHP API for Zend's ticks
Added PHP API for registering tick functions.  Ticks is a per-instruction
callback in Zend that allows us to implement cooperative multitasking
within PHP.  Example:

In extension code:

php_add_tick_function(my_tick_func);

void my_tick_func(int count) {
    php_printf("[tick %d]", count);
}

In PHP code:
<?php

declare(ticks = 1) {
    print "there should be two ticks here.\n";
}

?>
2000-08-29 09:18:48 +00:00
Sascha Schumann
e783d75ed3 sizeof(old_cwd) evaluated to sizeof(char *) after last commit, so old_cwd
was not set correctly.
2000-08-27 20:51:30 +00:00
Andi Gutmans
ecbc0255d9 - Use do_alloca()/free_alloca() for old_cwd. This will ensure speed in
- non-ISAPI environments but in ISAPI will use emalloc()/efree() to save
- stack space. MS only gives us 10KB those bastards.
2000-08-27 19:56:22 +00:00
Andi Gutmans
827672cd78 - Reverting Sascha's patch although I don't like doing these kind of things
- but as it is Sascha who has reverted a zillion patches I don't feel that
- bad about it :)
- The patch is morally incorrect and it actually also has a crash bug which
- I won't point out because it shouldn't be there.
- SG(path_translated) should be set by the SAPI module correctly and if it
- isn't the SAPI module should be fixed and not add code to PHP. There is
- enough special case code in PHP and I would like to clean it up and not
- add more.
- Last but not least, old_cwd takes 4KB of stack space. We should probably
- malloc() it because in ISAPI we only have 10KB of stack space.
2000-08-27 19:51:50 +00:00
Sascha Schumann
390d1cd1b7 Initializing new_path once is enough 2000-08-27 19:40:21 +00:00
Sascha Schumann
3f969d0b84 If a SAPI module does not pass an absolute path as primary_file to
php_execute_script(), we will now change the filename to point to
the absolute path.
2000-08-27 19:38:18 +00:00
Andi Gutmans
39770d99ea - Try and fix problem with opening wrong file. 2000-08-27 18:01:17 +00:00
Sascha Schumann
8e0ae5d152 Cleaning up some mess 2000-08-21 09:50:53 +00:00
Andi Gutmans
c799959568 - Change PHP_SEPARATOR to PHP_DIR_SEPARATOR 2000-08-20 19:56:24 +00:00
Andi Gutmans
80d878279b - Sascha's patch should make PHP in VIRTUAL_DIR mode also change to the
- right directory so this shouldn't be needed anymore.
2000-08-20 18:12:16 +00:00
Sascha Schumann
1d68a02df3 The status quo in PHP is that the current directory is initialized
to the directory where the executing script is located.

Since this needs to be implemented for all SAPI modules anyway, this
change moves the functionality to php_execute_script() and gets rid
of the per-module code.
2000-08-20 14:29:00 +00:00
Sascha Schumann
ce635bdb3c Fix varargs handling. The assignments are not necessary at all and
cause problems on various platforms, so we get rid of them.
2000-08-15 17:05:37 +00:00
Zeev Suraski
c9dca64075 Sync with Zend 2000-08-15 16:46:43 +00:00
Stanislav Malyshev
5090b1e8d5 Fix zend_fiel_handle handling. Should fix URL include
and various opened_path inconsistencies.
2000-08-13 18:00:50 +00:00
Zeev Suraski
a6c6f6a5c3 Update to be consistent with the new Zend API 2000-08-09 19:23:53 +00:00
Zeev Suraski
97893e6a19 Reverse this patch - it really shouldn't be in the error handler, but in the place
that generates the error...
2000-08-06 21:42:54 +00:00
Hartmut Holzgraefe
b04a02660e changed default sendmail flags from '-t' to '-t -i' (bugid#5374) 2000-08-04 22:42:11 +00:00
Hartmut Holzgraefe
b59e98b87c "undefined function" error message will now suggest similar named
functions as jikes compiler for java does (typo protection)
2000-08-01 07:57:19 +00:00
Zeev Suraski
52ff887db5 Made ob_start() and friends reentrant. It's now possible to implement this
long-requested functionality, now that output buffering is re-entrant:

function eval_ret($code)
{
	ob_start();
	eval($code);
	$retval = ob_get_contents();
	ob_end_clean();
	return $retval;
}
2000-07-29 14:46:09 +00:00
Zeev Suraski
d8a4278ab4 - Update .dsp's
- Make non ZTS Win32 build again
2000-07-29 10:48:57 +00:00
Hartmut Holzgraefe
1a7f851985 added '-l' option to command line / CGI version for 'syntax check only'
plus a little cleanup and rearranging in command line option parsing

@ CGI aka. command line version has now an option '-l' for syntax check
@   without execution (Hartmut)
2000-07-28 15:21:20 +00:00
Stig Bakken
7bb67a6200 @Set default include_path so PEAR files can be reached (Stig) 2000-07-18 11:02:28 +00:00
Zeev Suraski
aa8d04a87c Fix disable_functions feature 2000-07-13 17:52:00 +00:00