Commit Graph

3098 Commits

Author SHA1 Message Date
Greg Beaver
e8ac7c11d1 MFB: Fixed potentially confusing error message on failure when no errors are logged 2008-04-28 22:37:45 +00:00
Dmitry Stogov
f3c82b0055 Optimized request startup sequence for php.ini without per dir and per host conf
igurations
2008-04-15 11:32:13 +00:00
Greg Beaver
b34cf3d86f MFB do not scan include_path with faulty plain_wrapper-based include_path fopen
# _fopen_with_path_rel probably needs to call out to regular php_stream_open, for exts that use it (it is exported)
2008-04-13 22:19:23 +00:00
Dmitry Stogov
977cc79398 Added ability to use stream wrappers in include_path 2008-03-27 10:33:52 +00:00
Scott MacVicar
56352d1a2f MFB 5.3: Rest of the changes for re2c merge 2008-03-26 14:46:17 +00:00
Johannes Schlüter
870ddcdb3e - New egg 2008-03-25 17:17:42 +00:00
Christopher Jones
7060c9574c oci8: Sync with 5.3 - version macro updates and DRCP tweaks 2008-03-25 02:25:03 +00:00
Antony Dovgal
4c7b5a89ba Change streams to not use mmap() when reading files (aka copying to memory).
There are two problems with mmap() in this case:
1) there is no performance gain since we allocate the memory anyways;
2) memcpy() may crash if somebody truncates this file at the same moment
(see http://dev.daylessday.org/diff/mmap.phps for example);

It seems to work fine with fpassthru(), though why it is so should be investigated.

Thanks to Andrey Vasilishin for the report and Anight for pressing this through =)
2008-03-24 16:28:08 +00:00
Dmitry Stogov
cee56e2022 Fixed ws and comment 2008-03-24 09:30:54 +00:00
Antony Dovgal
5b5c286d49 use correct flags 2008-03-22 12:56:07 +00:00
Marcus Boerger
384d50b37b - Settle to 4 MB, see internals@ archives 2008-03-21 19:37:32 +00:00
Marcus Boerger
12a66e0d1c - Fix comment 2008-03-21 18:20:51 +00:00
Marcus Boerger
a70a882df4 - Increase max mmap size to 8 MB 2008-03-21 17:12:38 +00:00
Antony Dovgal
f1fbb3fd21 [DOC] revert short tags to their previous state 2008-03-21 16:38:50 +00:00
Stanislav Malyshev
da40d5a172 MF5: make short_open_tag user-accessible 2008-03-20 17:31:17 +00:00
Rasmus Lerdorf
b911467d1d MFB
Here are the signal changes from the 5.3 branch that optimizes signal
handler registration and switches from longjmp to siglongjmp in order
to make signal mask handling consistent across different UNIX operating
systems.
2008-03-19 16:37:49 +00:00
Antony Dovgal
da036996be make use of zend_atol() 2008-03-19 12:40:48 +00:00
Felipe Pena
af9b1c3376 MFB: Fixed bug #44440 (st_blocks undefined under BeOS) 2008-03-15 10:34:12 +00:00
Antony Dovgal
6ec12a4794 check if return value of write() is -1 and abort upload in this case setting the correct error status 2008-03-14 13:10:22 +00:00
Dmitry Stogov
ab77e14ad2 Disable path resolution for filenames with stream wrappers
More careful check for relative pathes (./xxx and ../xxx)
2008-03-13 14:10:08 +00:00
Stanislav Malyshev
c5c4b858df MFB: add request_order INI variable to control $_REQUEST content
# if not set (default), variables_order still is used
# request_order accepts G,P and C
2008-03-12 20:53:04 +00:00
Antony Dovgal
ec101c1274 fix segfault - error_string may be NULL, in this case we have to follow the old behavior 2008-03-11 10:26:51 +00:00
Andrey Hristov
af5a93e552 char **error_message was passed but not used. This causes problems in cases
of getaddrinfo() failure, because the upper layers don't get the error.
  initialize a variable because we were reading initialized in case of error.
2008-03-10 19:55:43 +00:00
Etienne Kneuss
2660bd1de9 User error handlers no longer catch supressed errors 2008-03-08 22:17:32 +00:00
Pierre Joye
e0d8f5c8bc - MFB: #42505, new sendmail default path breaks on Novell (Guenter Knauf) 2008-03-05 21:20:14 +00:00
Dmitry Stogov
c8b1dbff23 Optimized require_once() and include_once() by eliminationg open() syscall on se
cond usage.
2008-03-05 13:35:02 +00:00
Felipe Pena
2818d4fc51 New way for check void parameters 2008-03-04 23:39:15 +00:00
Ilia Alshanetsky
94ee2269d6 MFB: Fixed bug #44233 (MSG_PEEK undefined under BeOS R5) 2008-02-27 00:30:49 +00:00
Marcus Boerger
6b58678c63 - Add E_DEPRECATED (Lars Strojny, Felipe Pena, Marcus) 2008-02-23 17:03:53 +00:00
Felipe Pena
b6fafb1a4d Fix build 2008-02-16 02:28:11 +00:00
Pierre Joye
48d86e7ad8 - [DOC] MFB: add PHP_MAJOR_VERSION, PHP_MINOR_VERSION, PHP_RELEASE_VERSION,
PHP_EXTRA_VERSION, PHP_VERSION_ID, PHP_ZTS and PHP_DEBUG constants
2008-02-15 15:09:56 +00:00
Marcus Boerger
602dd615e9 - Add %Z to *printf 2008-02-07 18:40:29 +00:00
Marcus Boerger
8954a96939 - WS 2008-02-07 12:45:42 +00:00
Jani Taskinen
ad6e9ad259 - Allow using any constants registered by PHP in php.ini too 2008-02-04 20:38:42 +00:00
Marcus Boerger
986eed1379 - Typo 2008-02-03 14:48:22 +00:00
Marcus Boerger
f2ce43983f - Rename dump_config_hash() to get_config_hash() as it doesn't dump 2008-02-03 14:35:29 +00:00
Marcus Boerger
bffdbbbfa4 - Fix build 2008-02-02 23:25:43 +00:00
Marcus Boerger
7671f2ec4a - Get rid of overoptimization 2008-01-30 23:43:05 +00:00
Dmitry Stogov
42a683d688 Imporoved PHP binary size and startup speed with GCC4 visibility control (Nuno) 2008-01-30 09:56:22 +00:00
Dmitry Stogov
6c51ef721f Fixed bug #43491 (Under certain conditions, file_exists() never returns) 2008-01-29 14:25:07 +00:00
Scott MacVicar
352c3a7f1b Fixed bug #43954 (Memory leak when sending the same HTTP status code more than once.) 2008-01-28 16:08:14 +00:00
Dmitry Stogov
6847c18150 Added garbage collector 2008-01-22 09:29:29 +00:00
Greg Beaver
184e934511 use correct macro 2008-01-13 22:55:02 +00:00
Greg Beaver
e54eb5513e clarify error message on why opening a stream wrapper failed for allow_url_include/allow_url_fopen, add test for allow_url_fopen 2008-01-12 15:50:17 +00:00
Sebastian Bergmann
9b620d50b4 Bump copyright year, 2 of 2. 2007-12-31 07:12:20 +00:00
Antony Dovgal
21fb4c1030 apply correct fix for bug #43522
fix Unicode streams too this time
2007-12-29 10:50:12 +00:00
Hannes Magnusson
2ea5df33a7 Update the class method documentation links 2007-12-29 02:21:25 +00:00
Hannes Magnusson
003bb5ceaa MFB5.3: Fixed bug#43105 (PHP seems to fail to close open files.) 2007-12-27 02:11:05 +00:00
Derick Rethans
b95520c0fd - Fixed typo. 2007-12-18 10:52:59 +00:00
Ilia Alshanetsky
0b6a51e539 MFB: Fixed bug #43580 (removed bogus declaration of a non-existent
php_is_url() function)
2007-12-13 00:27:43 +00:00
Ilia Alshanetsky
d963eaffcc MFB: Fixed bug #43522 (stream_get_line() eats additional characters) 2007-12-10 14:19:20 +00:00
Dmitry Stogov
8dbae457d5 Fixed crash because of uninitialized SG(sapi_headers).mimetype 2007-12-03 16:04:47 +00:00
Jani Taskinen
38d7b36439 - No zval is stored here 2007-11-26 16:34:07 +00:00
Jani Taskinen
4fc4814012 - Fixed bug #43365 (Several enums have trailing commas) 2007-11-26 10:58:28 +00:00
Dmitry Stogov
47dc82ecb9 Fixed bug #43128 (Very long class name causes segfault) 2007-11-22 13:33:53 +00:00
Hannes Magnusson
1727c712b6 - Add support for optional values
- Add support for = as seperator
2007-11-20 22:42:47 +00:00
Jani Taskinen
ad9605a722 - Allow using full path to load modules using "extension" directive 2007-11-09 16:26:55 +00:00
Jani Taskinen
ae2b2b1465 - Added support for [HOST=www.example.com] sections
# Works the same way as PATH, just the SERVER_NAME is matched with these
2007-11-09 16:02:50 +00:00
Rob Richards
5f7ece064d fix non ipv6 enabled win build 2007-11-06 10:56:53 +00:00
Marcus Boerger
c26e0d8ee7 - MFB ws 2007-11-06 10:54:29 +00:00
Jani Taskinen
13171134f8 - Nuke unused variables 2007-11-01 17:32:10 +00:00
Jani Taskinen
eb1a26c8b2 - Fixed bug #43137 (rmdir() and rename() do not clear statcache) 2007-10-31 13:22:18 +00:00
Dmitry Stogov
5138a3b575 Fixed bug #42722 (display_errors setting ignored for E_PARSE and HTTP 500 page) 2007-10-18 13:12:01 +00:00
Edin Kadribasic
8b3bfa7cf7 MFB: Fix build 2007-10-12 08:08:02 +00:00
Elizabeth Marie Smith
9e0894fa21 MFB 2007-10-10 23:23:54 +00:00
Scott MacVicar
7ba8a98fd3 Fix expand_filepath when including relative files, ideally you should test you code... 2007-10-09 10:04:19 +00:00
Jani Taskinen
c1c60fb7e2 ws + cs 2007-10-09 08:40:25 +00:00
Robert Thompson
d5192b04a4 Fix for bug 41822. expand_filepath() will now return a relative path under the specific situation where getcwd() returns NULL and the file is still readable. As far as I have been able to tell, this fix only applies to the Solaris OS where files in directories with (--x) cannot getcwd(). 2007-10-09 02:41:14 +00:00
Yiduo (David) Wang
95da0dc570 Added macros for managing zval refcounts and is_ref statuses 2007-10-07 05:15:07 +00:00
Antony Dovgal
277eb1feee ucnv_toUnicode() in ICU 3.8 requires target buffer size to be even, otherwise it bails out with U_ILLEGAL_ARGUMENT_ERROR
this commit fixes endless loop (due to the absence of error catching) and also fixes the cause of the error
2007-10-02 17:09:22 +00:00
Ilia Alshanetsky
6c4e9b52b9 MFB: Fixed bug #42785 (json_encode() formats doubles according to locale
rather then following standard syntax).
2007-10-01 15:25:01 +00:00
Ilia Alshanetsky
8c94e4045d MFB: Refactor code to make fixes for coverity issues #385 and #386 a bit
more obvious
2007-10-01 14:56:34 +00:00
Jani Taskinen
44cbb46246 - Added common getopt implementation to core.
- Added long-option feature to getopt().
- Made getopt() available on win32 systems.
Patch by: David Soria Parra <dsp@php.net>
[DOC]: These changes will be available from 5.3+
2007-10-01 12:32:39 +00:00
Jani Taskinen
69eafc407f - Fix warning 2007-10-01 12:26:55 +00:00
Jani Taskinen
0d0117bfdf - Fix win32 build. 2007-09-28 10:23:14 +00:00
Jani Taskinen
f964370a35 - Added ".htaccess" style user-defined php.ini files support for
CGI/FastCGI.
- Added support for special [PATH=/opt/httpd/www.example.com/] sections
  in php.ini. All directives set in these sections will not be able to be
  overridden in user-defined ini-files or during runtime in the specified
  path.

- Improved php.ini handling:
  . Added better error reporting for syntax errors in php.ini files
  . Allowed "ini-variables" to be used almost everywhere ini php.ini files
  . Allowed using alphanumeric/variable indexes in "array" ini options
  . Fixed get_cfg_var() to be able to return "array" ini options

- Fixed bug #27372 (parse error loading browscap.ini at apache startup)
- Fixed bug #42069 (parse_ini_file() allows using some non-alpha numeric
  characters)

@DOC Pierre promised to handle the manual part of this :D
2007-09-28 02:04:28 +00:00
Dmitry Stogov
8146078f7b Improved memory usage by movig constants to read only memory. (Dmitry, Pierre) 2007-09-27 18:28:44 +00:00
Dmitry Stogov
38673d1f6f Fixed crash on POST request after dl("mbstring.so") 2007-09-24 11:53:57 +00:00
Antony Dovgal
e69a0b7533 check for NULL (coverity issue #386) 2007-09-21 14:11:45 +00:00
Stanislav Malyshev
f9d32b3685 MFB: disallow setting mail.force_extra_parameters from .htaccess 2007-09-13 20:06:15 +00:00
Derick Rethans
f009a49ff4 - We have to store the original (allocated) pointer here as it was freed after
the pointer itself was modified, otherwise we'll get an invalid free error
  here.
2007-09-04 11:19:33 +00:00
Jani Taskinen
891a4478f2 ws 2007-08-31 08:35:07 +00:00
Jani Taskinen
210c7781fc ws fixes 2007-08-31 08:13:07 +00:00
Jani Taskinen
31dd0907c0 ws + apify cfg_get_entry 2007-08-31 08:09:41 +00:00
Jani Taskinen
239fd2f36f - Moved the php.ini related function protos where they belong 2007-08-31 07:47:41 +00:00
Jani Taskinen
55956bb99b ws 2007-08-31 07:43:28 +00:00
Derick Rethans
a416772467 - Fixed allow_url_fopen_list/allow_url_include_list handling by making sure
the pointers are initialized. Thanks to Sara.
2007-08-28 12:12:02 +00:00
Stanislav Malyshev
201388e5ab fix proto 2007-08-16 23:53:40 +00:00
Antony Dovgal
7390cf6e22 resolve dir before calling mktemp/mkstemp
this is tested by ext/standard/tests/file/tempnam_variation2.phpt
2007-08-10 10:13:07 +00:00
Antony Dovgal
77701c003a 'I32' and 'I' support (per request by Marcus) 2007-08-03 14:30:59 +00:00
Antony Dovgal
df4cdcfc8f fix folding 2007-08-03 09:51:05 +00:00
Antony Dovgal
996f1baaab add I64 support to spprintf() (snprintf() already has it) 2007-08-03 09:46:50 +00:00
Stanislav Malyshev
d4cc7daba2 MF5: fix for access control with .htaccess 2007-08-03 01:40:05 +00:00
Stanislav Malyshev
e1fc2a87bf revert wrong fix 2007-08-01 23:54:06 +00:00
Johannes Schlüter
9adbc5a88b - Fix #42164 Internal Sendmail Support is ALWAYS disabled 2007-08-01 12:49:23 +00:00
Dmitry Stogov
11c5577116 Fixed EOF handling in case of reading from file opened in write only mode. 2007-07-25 16:34:27 +00:00
Antony Dovgal
e15f25709a fix ZTS build 2007-07-24 20:14:03 +00:00
Dmitry Stogov
9343c54040 Fixed bug #41984 (Hangs on large SoapClient requests) 2007-07-24 14:25:07 +00:00
Jani Taskinen
e5b9fd0d6c - Changed "display_errors" php.ini option to accept "stderr" as value which
makes the error messages to be outputted to STDERR instead of STDOUT with
  CGI and CLI SAPIs.
2007-07-24 14:18:47 +00:00
Jani Taskinen
cc745f1724 fix folding 2007-07-24 13:29:39 +00:00
Jani Taskinen
562a0629e4 - Fix compile warnings 2007-07-21 01:41:55 +00:00
Antony Dovgal
eb5e7540b4 use constant 2007-07-19 10:03:17 +00:00
Antony Dovgal
e593d7d611 add comment (the code is not that obvious indeed) 2007-07-18 11:46:28 +00:00
Jani Taskinen
11a1fa5b92 - Use correct macro name 2007-07-18 09:04:37 +00:00
Jani Taskinen
497218eedf ws fix 2007-07-17 13:29:25 +00:00
Jani Taskinen
97abf9d5dc - Fixed bugs #36796, #36918, #41371 (stream_set_blocking() does not work) 2007-07-17 13:27:38 +00:00
Jani Taskinen
869a00ee3f - Removed leftovers from nuking safe-mode 2007-07-16 12:58:23 +00:00
Jani Taskinen
41c6375840 - Moved the old regex functions to it's own extension: ereg 2007-07-15 19:50:07 +00:00
Jani Taskinen
12361c16b1 MFB: free error messages + ws fix 2007-07-15 15:20:29 +00:00
Jani Taskinen
7faedf9646 - Unused macros removed 2007-07-15 15:09:36 +00:00
Johannes Schlüter
c91907a515 - Always enable mail() function 2007-07-11 17:39:04 +00:00
Dmitry Stogov
eb5dab85c9 Unicode support 2007-07-11 15:17:59 +00:00
Dmitry Stogov
922f3d5512 Fixed wrong warning 2007-07-11 14:32:54 +00:00
Jani Taskinen
8e399854e6 - No return value for void function 2007-07-11 10:23:47 +00:00
Sascha Schumann
ad31680f34 - fix concurrent reader/writer use case
(we read, while the other process writes -> if we don't try
   read we won't notice that the file has been growing.)
2007-07-10 20:13:29 +00:00
Stanislav Malyshev
9993892a18 check if write is allowed before writing to error log 2007-07-10 18:42:01 +00:00
Dmitry Stogov
1f8c608320 Fixed symlink("", "somthing") and link("", "somthing") in ZTS mode 2007-07-10 13:21:31 +00:00
Dmitry Stogov
da28d1e673 wrong comments 2007-07-09 16:42:45 +00:00
Dmitry Stogov
f766275b7a Added ability to create local or remote (URL) user streams
Local user streams must not be able to open(), URLs if allow_url_include is off
Implemented new function stream_is_local()
[
- stream_wrapper_register() extended with additional optional argument "flags"
  of type long. This time only one flag is implemented - STREAM_IS_URL, that
  means that userstream wrapper is remote (URL). By default stream is local.
- stream_is_local() is a new function that accepts stream and tell if this
  stream is local or remote (URL)
]
2007-07-03 10:22:55 +00:00
Dmitry Stogov
740f5957ba Restore big exponent letter in var_export() ('1e300' -> '1E300') 2007-06-25 08:39:23 +00:00
Derick Rethans
ad8eca0b05 - Added the H modifier to create non-locale-aware non-fixed-precision float
representations.
- Fixed var_export() to use the new H modifier so that it can generate
  parsable PHP code for floats again, independent of the locale.
2007-06-19 12:19:27 +00:00
Dmitry Stogov
e6209db14c HTTP 500 is sent to browser in case of PHP error instead of blank page 2007-06-15 09:20:53 +00:00
Dmitry Stogov
613b37a73e (wrong previous patch) 2007-06-15 07:32:17 +00:00
Dmitry Stogov
1e87928766 Prevent crash in case of wrong arguments to CRT functions (dtrftime()) on PHP complead by MS VC8 2007-06-15 07:28:49 +00:00
Antony Dovgal
a9f6f71460 check return value of *time_r() functions for NULL
more checks will follow
2007-06-07 08:46:32 +00:00
Antony Dovgal
b445a2eaa2 fix HTTP_RAW_POST_DATA in Unicode mode 2007-06-05 11:24:37 +00:00
Antony Dovgal
71d7ee6d33 port the max_input_nesting_level ini option to Unicode mode 2007-06-05 11:24:13 +00:00
Antony Dovgal
ecd414c3b8 no register_globals in HEAD 2007-06-04 07:56:39 +00:00
foobar
feab02f3ed - Improved the error message for exceeding max_input_nesting_level. 2007-06-03 16:53:37 +00:00
Ilia Alshanetsky
7d74c2c3e6 MFB: Improved fix for MOPB-02-2007 2007-06-03 16:19:55 +00:00
Antony Dovgal
cd7750e4ba fix #41518 (file_exists() warns of open_basedir restriction on non-existent file) 2007-06-01 13:33:48 +00:00
Ilia Alshanetsky
e844eaedbb MFB 2007-05-29 21:06:04 +00:00
Ilia Alshanetsky
373ae24839 MFB 2007-05-28 23:52:13 +00:00
Ilia Alshanetsky
66526cee92 MFB 2007-05-28 23:00:25 +00:00
Rasmus Lerdorf
5c0389a6f8 Optimize sapi_get_request_time() slightly making it use the cached time
and also checking if there is a server_context before trying to call
the request_time sapi hook.
2007-05-25 09:19:05 +00:00
Antony Dovgal
c66d75a933 use correct constant 2007-05-19 12:52:31 +00:00
Scott MacVicar
b0856d961f Fixed bug #41390 (Clarify error message with invalid protocol scheme syntax) 2007-05-15 13:01:47 +00:00
Antony Dovgal
f6a01b2ace use estrdup() and plug the leak 2007-05-14 12:19:25 +00:00
Hannes Magnusson
e7c7f95ecd Fixed bug#41361 (shell_exec() does not find binaries) 2007-05-12 16:06:07 +00:00
Hannes Magnusson
c85e26cb06 MFB - use php_strtok_r() rather than strsep() 2007-05-10 19:51:19 +00:00
Dmitry Stogov
0ddb071abb Fixed bug #41304 (compress.zlib temp files left) 2007-05-08 12:08:41 +00:00
Nuno Lopes
018e610436 update pcre symbols list 2007-05-07 15:43:21 +00:00
Antony Dovgal
47d3276cd7 removed unused highlight.bg ini option 2007-04-26 09:39:03 +00:00
Dmitry Stogov
00e9c1b1bf ZTS fix 2007-04-25 14:18:15 +00:00
Antony Dovgal
e6e242f418 MFB: Fix crashes when SAPI handlers are overriden in dl()-ed extensions 2007-04-25 11:19:10 +00:00
Hannes Magnusson
f1e35024fb - Don't pick up php.ini from cwd on BSDs
- "Resolve" (with the help of $PATH) to /path/to/php and pick up
	the php.ini from there
2007-04-25 10:02:23 +00:00
Dmitry Stogov
2918cda494 Fixed crash on win32 in case of negative size 2007-04-18 14:23:35 +00:00
Dmitry Stogov
98423baf13 Fixed crash 2007-04-18 13:53:32 +00:00
Dmitry Stogov
44ac45fd92 Fixed endless loop in open_basedir check 2007-04-18 11:59:03 +00:00
Rob Richards
c88e2b7618 MFB: add file locking under windows
change win build to use common clock compat files
2007-04-18 09:48:07 +00:00