Commit Graph

4750 Commits

Author SHA1 Message Date
Joe Watkins
c370024c2c
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix php-fpm.service.in
2017-01-05 06:54:37 +00:00
Joe Watkins
b037c43497
Merge branch 'pull-request/1256' into PHP-7.0
* pull-request/1256:
  Fix php-fpm.service.in
2017-01-05 06:54:19 +00:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Nikita Popov
52da05c535 Merge branch 'PHP-7.1' 2017-01-01 21:17:00 +01:00
Nikita Popov
a5027d43dd Merge branch 'PHP-7.0' into PHP-7.1 2017-01-01 21:09:27 +01:00
Nikita Popov
935b5cb11e Flush stderr on win32 in cli_log_message
This allows us to unfork a bunch of tests for Windows.
2017-01-01 21:09:02 +01:00
Joe Watkins
5a15c9470c
Merge branch 'pull-request/2117'
* pull-request/2117:
  Allow to configure php-fpm slow log trace callers limit
2017-01-01 15:47:36 +00:00
Xinchen Hui
40727d7ce9 Merge branch 'PHP-7.1'
* PHP-7.1:
  define php_ap_map_http_request_error function for older httpd only
  add old versions of httpd support
  typo fixed
  bug fixed #61471 in apache2handler
2016-12-29 15:56:38 +08:00
Xinchen Hui
716fa9c24d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  define php_ap_map_http_request_error function for older httpd only
  add old versions of httpd support
  typo fixed
  bug fixed #61471 in apache2handler
2016-12-29 15:56:26 +08:00
Xinchen Hui
a8931df672 Merge branch 'bugfix_timeout_61471' of https://github.com/axot/php-src into PHP-7.0
* 'bugfix_timeout_61471' of https://github.com/axot/php-src:
  define php_ap_map_http_request_error function for older httpd only
  add old versions of httpd support
  typo fixed
  bug fixed #61471 in apache2handler
2016-12-29 15:46:47 +08:00
Zheng SHAO
587497e3a9 define php_ap_map_http_request_error function for older httpd only 2016-12-29 16:07:05 +09:00
Zheng SHAO
d92606a4be add old versions of httpd support 2016-12-29 00:41:56 +09:00
Nikita Popov
1bf67622f8 Merge branch 'PHP-7.1' 2016-12-27 21:52:56 +01:00
Nikita Popov
937115f8c5 Merge branch 'PHP-7.0' into PHP-7.1 2016-12-27 21:52:33 +01:00
Mitch Hagstrand
2d51267c07 Makes the sapi web server and curl tests more reliable
1. Increased the time for the sapi/cli/tests/php_cli_server.inc to accept connections.
2. sapi/cli/tests/php_cli_server.inc has errors messages and a `stop` function.
3. bug67429.phpt uses the `stop` function to shutdown the webserver before starting a new one.
4. Removed ext/curl/tests/bug48203_multi-win32.phpt test now that ext/curl/tests/bug48203_multi.phpt
   runs on Windows also.
2016-12-27 21:52:05 +01:00
Anatol Belski
758af77e9d Path handling related refactorings
Primarily related to the path handling datatypes, to avoid unnecessary
casts, where possible. Also some rework to avoid code dup. Probably
more places are to go, even not path related, primarily to have less
casts and unsigned integers where possible. That way, we've not only
less warnings and casts, but are also safer with regard to the
integer overflows. OFC it's not a panacea, but still significantly
reduces the vulnerability potential.
2016-12-22 14:56:47 +01:00
Anatol Belski
afb6ca2566 Finish remaining replacement uint => uint32_t
Tthe core should be normalized now, no uints anymore
2016-12-22 14:32:02 +01:00
Bob Weinand
5d7ce72747 Merge branch 'PHP-7.1' 2016-12-22 00:42:05 +01:00
Bob Weinand
728502fc29 Merge branch 'PHP-7.0' into PHP-7.1 2016-12-22 00:40:54 +01:00
Bob Weinand
3b2b080cbc Fixed bug #73704 (phpdbg shows the wrong line in files with shebang) 2016-12-22 00:39:24 +01:00
Bob Weinand
942d4d5614 Merge branch 'PHP-7.1' 2016-12-21 02:43:04 +01:00
Bob Weinand
7e2146293b Merge branch 'PHP-7.0' into PHP-7.1 2016-12-21 02:42:38 +01:00
Bob Weinand
becda86ae5 Fix issue with -- in phpdbg command line 2016-12-21 02:42:23 +01:00
Bob Weinand
c3ee875aec Merge branch 'PHP-7.1' 2016-12-20 20:18:53 +01:00
Bob Weinand
8b06b7e266 Fixed bug #73794 (Crash (out of memory) when using run and # command separator) 2016-12-20 20:18:36 +01:00
Bob Weinand
e4db84f231 Merge branch 'PHP-7.1' 2016-12-20 19:49:25 +01:00
Bob Weinand
3273f15412 Fix segfault in ZTS mode when just printing and exiting in phpdbg 2016-12-20 19:49:04 +01:00
Zheng SHAO
fb98907d2d typo fixed 2016-12-17 20:26:09 +09:00
Zheng SHAO
9b65a10256 bug fixed #61471 in apache2handler 2016-12-17 13:37:58 +09:00
Nikita Popov
ef1ed6ab8e Merge branch 'PHP-7.1' 2016-12-14 18:11:51 +01:00
Nikita Popov
33e96c9d63 Merge branch 'PHP-7.0' into PHP-7.1 2016-12-14 18:11:43 +01:00
Nikita Popov
f99bf70360 Partially fix bug #70492
The libmagic portion is missing.
2016-12-14 18:11:27 +01:00
Bob Weinand
b149001ffd Merge branch 'PHP-7.1' 2016-12-06 18:30:50 +01:00
Bob Weinand
43f88f25bb Merge branch 'PHP-7.0' into PHP-7.1 2016-12-06 18:30:37 +01:00
Bob Weinand
7e12b5da71 Fixed issue getting executable lines from custom wrappers
See also krakjoe/phpdbg#161
2016-12-06 18:29:48 +01:00
Christoph M. Becker
143ee76fe4 Merge branch 'PHP-7.1' 2016-12-03 14:20:00 +01:00
Christoph M. Becker
c20299ddc4 Merge branch 'PHP-7.0' into PHP-7.1 2016-12-03 14:18:56 +01:00
Christoph M. Becker
a8ec79e27f Merge branch 'PHP-5.6' into PHP-7.0 2016-12-03 14:18:00 +01:00
Adrien Crivelli
cf2496140d Fix minor typo 2016-12-03 14:15:52 +01:00
Nuno Lopes
d5a2af6d1c Merge branch 'PHP-7.0' of https://git.php.net/push/php-src into PHP-7.0 2016-11-30 14:41:26 -05:00
Bob Weinand
c406d1e9b5 Merge branch 'PHP-7.1' 2016-11-30 11:45:36 +01:00
Bob Weinand
e37412e19c Merge branch 'PHP-7.0' into PHP-7.1 2016-11-30 11:45:18 +01:00
Bob Weinand
344ef050aa Fix run-tests.php to always include TEST_PHPDBG_EXECUTABLE if phpdbg available 2016-11-30 11:44:10 +01:00
Bob Weinand
7631c8766e Merge branch 'PHP-7.1' 2016-11-30 02:57:34 +01:00
Bob Weinand
7aaa1a876e Merge branch 'PHP-7.0' into PHP-7.1 2016-11-30 02:57:16 +01:00
Bob Weinand
b73a3afff3 Fixed bug #73615 (phpdbg without option never load .phpdbginit at startup) 2016-11-30 02:56:47 +01:00
Yoshio HANAWA
26e80982a2 Fix help messages 2016-11-27 19:16:00 +09:00
Nikita Popov
5af586bec5 Remove more PHP 6 leftovers from tests 2016-11-24 22:39:39 +01:00
Kalle Sommer Nielsen
8efbcf18a1 Remove this old obsolete code 2016-11-21 15:18:55 +01:00
Bob Weinand
e3feeba3ae Merge branch 'PHP-7.1' 2016-11-20 19:20:48 +01:00
Bob Weinand
110a6cc6c0 Merge branch 'PHP-7.0' into PHP-7.1 2016-11-20 19:20:09 +01:00
Bob Weinand
bc30206b8a Revert "Revert "Remove a few unused write warning""
This reverts commit ff5a65d26b.

(With zend_ prefix now)
2016-11-20 19:18:50 +01:00
Nikita Popov
d512f21930 Merge branch 'PHP-7.1' 2016-11-20 19:10:29 +01:00
Nikita Popov
c58378619b Merge branch 'PHP-7.0' into PHP-7.1 2016-11-20 19:10:03 +01:00
Nikita Popov
ff5a65d26b Revert "Remove a few unused write warning (backport from master, oops)s"
This reverts commit c65d24eaa3.
2016-11-20 19:09:05 +01:00
Bob Weinand
b7fee22e73 Merge branch 'PHP-7.0' into PHP-7.1 2016-11-20 14:18:54 +01:00
Bob Weinand
c65d24eaa3 Remove a few unused write warning (backport from master, oops)s 2016-11-20 14:17:14 +01:00
Bob Weinand
d37482679a Remove a few unused write warnings 2016-11-20 14:15:02 +01:00
Joe Watkins
893a27d632 make it possible to show specific help pages without interactive session 2016-11-20 05:26:46 +00:00
Joe Watkins
56f9a93939 make it possible to show specific help pages without interactive session 2016-11-20 05:25:42 +00:00
Joe Watkins
7753d10457 make it possible to show specific help pages without interactive session 2016-11-20 05:24:14 +00:00
Anatol Belski
b6ed31959c Merge branch 'PHP-7.1'
* PHP-7.1:
  extend skipif
2016-11-18 02:26:44 +01:00
Anatol Belski
b2b63ce993 extend skipif
This test won't pass on Windows. The main reason is that the multiline
input is not really possible to create on cmd. But also, because of the
single quotes. And without multiline data piping, it doesn't make sense.
2016-11-18 02:23:17 +01:00
Dmitry Stogov
e5d76c956a Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed test
  Updated NEWS
  Improvement for bug73297
  Simplify ext/standard/tests/http/bug73297.phpt
  http_fopen_wrapper.c - bug#73297 Skip past "100 Continue" responses
  Add failing test for bug#73297
  Updated NEWS
  Improvement for bug73297
  Simplify ext/standard/tests/http/bug73297.phpt
  http_fopen_wrapper.c - bug#73297 Skip past "100 Continue" responses
  Add failing test for bug#73297
2016-11-17 16:00:07 +03:00
Dmitry Stogov
79d9c12bf9 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed test
  Updated NEWS
  Improvement for bug73297
  Simplify ext/standard/tests/http/bug73297.phpt
  http_fopen_wrapper.c - bug#73297 Skip past "100 Continue" responses
  Add failing test for bug#73297
  Updated NEWS
  Improvement for bug73297
  Simplify ext/standard/tests/http/bug73297.phpt
  http_fopen_wrapper.c - bug#73297 Skip past "100 Continue" responses
  Add failing test for bug#73297
2016-11-17 15:59:35 +03:00
Dmitry Stogov
3817a2e6d5 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed test
  Updated NEWS
  Improvement for bug73297
  Simplify ext/standard/tests/http/bug73297.phpt
  http_fopen_wrapper.c - bug#73297 Skip past "100 Continue" responses
  Add failing test for bug#73297
2016-11-17 15:58:38 +03:00
Dmitry Stogov
c2d6ffb85f Fixed test 2016-11-17 15:57:40 +03:00
Nuno Lopes
d26b8804d0 fix gcov coverage 2016-11-16 15:11:07 -05:00
Nuno Lopes
7032ed37c0 fix gcov coverage 2016-11-16 15:08:42 -05:00
Nuno Lopes
5e5e071214 fix gcov coverage 2016-11-16 15:07:16 -05:00
Bob Weinand
882bcb7240 Merge branch 'PHP-7.1' 2016-11-13 18:31:20 +01:00
Bob Weinand
6834b7344d Merge branch 'PHP-7.0' into PHP-7.1 2016-11-13 18:30:49 +01:00
Bob Weinand
22a43551a2 Fix passing of wrong values in bp export 2016-11-13 18:30:23 +01:00
Bob Weinand
5a4bad7b5f Merge branch 'PHP-7.1' 2016-11-13 13:22:50 +01:00
Bob Weinand
ef657978b2 Merge branch 'PHP-7.0' into PHP-7.1 2016-11-13 13:22:35 +01:00
Bob Weinand
ba75d4c50b Properly escape all filenames when exporting breakpoints 2016-11-13 13:22:06 +01:00
Mitch Hagstrand
57c0773cd7 Fix phpdbg breakpoint restoring after execution completes 2016-11-13 12:44:25 +01:00
Bob Weinand
1e65d0ea67 Merge branch 'PHP-7.1' 2016-11-13 12:26:13 +01:00
Bob Weinand
dbd504eaa9 Fix phpdbg ZTS shutdown with USE_ZEND_ALLOC 2016-11-13 12:25:43 +01:00
Joe Watkins
6c7e795c15 phpdbg standard input changes 2016-11-13 08:00:15 +00:00
Joe Watkins
a2bc7cf9ca Merge branch 'master' of git.php.net:/php-src 2016-11-12 17:30:41 +00:00
Joe Watkins
6c0e1ca4fa update phpdbg with stdin code change 2016-11-12 17:30:16 +00:00
Andrea Faulds
3ed8b7a87b Use "Standard input code" instead of "php://stdin" 2016-11-12 17:26:20 +00:00
Andrea Faulds
a103aa2dbd Show "php://stdin" instead of "-" in error messages 2016-11-12 17:26:20 +00:00
Kalle Sommer Nielsen
2104bea5d7 Remove Netware support
If this does not break the Unix system somehow, I'll be amazed. This should get most of it out, apologies for any errors this may cause on non-Windows ends which I cannot test atm.
2016-11-12 11:20:01 +01:00
Michele Locati
33301d5bae Add VT100 support for Windows
Fix function names prefix

Use Unicode version of GetFinalPathNameByHandle

Use EG(windows_version_info) instead of RtlGetVersion

Use the specified handle_id instead of STD_OUTPUT_HANDLE

Switch from stream name to stream resource

Allow running tests capturing only stdout and/or stderr

Add tests for stream_vt100_support function

Export Win32 console functions

Fix x64 build

Use zend_long instead of long long, use GetConsole instead of GetFinalPathNameByHandleW to check if a handle is a valid console stream

Always use zend_long on any platform

Use _get_osfhandle to determine the standard handle

Accept stream names

Raise warnings in case of invalid stream parameter

Return true if disabling VT100 support on a not-console/redirected stream or on old Windows versions

Remove php_win32_console_os_supports_vt100

Differentiate stdin vs stdout/stderr

Simplify setting flag

Allow avoid piping STDIN

Let stream_vt100_support accept only resources

Fix run-tests

Revert console flags in case of failure

Simplify logic of stream_vt100_support when setting the flag

Return true if succeeded, false otherwise

Drop support for STDIN

More comprehensive tests for stream_vt100_support

Remove old tests

Fix name of included file and use absolute paths

Enable ENABLE_VIRTUAL_TERMINAL_PROCESSING on Windows by default

Remove tests for stream_vt100_support

Split stream_vt100_support into stream_isatty+sapi_windows_vt100_support

Add tests for stream_isatty

Add tests for sapi_windows_vt100_support

Return null from stream_isatty is neither Windows nor Posix

Fallback to S_ISCHR if neither Windows nor Posix

Avoid defining argc since it's only used once

Better comment about php_win32_console_fileno_is_console

Use events instead of cNumberOfEvents

Do not restore previous console mode

We need to restore previous console mode on failing SetConsole calls only for STDIN

Don't configure STDOUT/STDERR on Windows with PHP_CLI_WIN32_NO_CONSOLE
2016-10-28 19:23:00 +02:00
Anatol Belski
6c55c39d8e Merge branch 'PHP-7.1'
* PHP-7.1:
  yet another uninitialized pointer
2016-10-27 02:46:18 +02:00
Anatol Belski
931ea5c872 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  yet another uninitialized pointer
2016-10-27 02:45:48 +02:00
Anatol Belski
e586c7c612 yet another uninitialized pointer 2016-10-27 02:42:30 +02:00
Anatol Belski
c3f08add5e Merge branch 'PHP-7.1'
* PHP-7.1:
  fix uninitialized pointer
2016-10-27 02:20:35 +02:00
Anatol Belski
4e3eb4a5f8 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix uninitialized pointer
2016-10-27 02:20:12 +02:00
Anatol Belski
b9993c8b6c fix uninitialized pointer 2016-10-27 02:15:14 +02:00
Anatol Belski
5e480021a7 Merge branch 'PHP-7.1'
* PHP-7.1:
  Better fix for bug #73360
  Revert "Fixed bug #73360 Unable to work in root with unicode chars"
2016-10-21 21:34:09 +02:00
Anatol Belski
2860fd40d6 Better fix for bug #73360
This also fixes the TS issue. And, it also reveals that there's an
issue in the VCWD_* API to be possibly addressed.
2016-10-21 21:29:35 +02:00
Anatol Belski
fbf46d36ca Revert "Fixed bug #73360 Unable to work in root with unicode chars"
This reverts commit 64fee0aecb.
2016-10-21 20:15:16 +02:00
Anatol Belski
04bba0c078 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #73360 Unable to work in root with unicode chars
2016-10-21 16:00:49 +02:00
Anatol Belski
64fee0aecb Fixed bug #73360 Unable to work in root with unicode chars 2016-10-21 15:22:59 +02:00
Joe Watkins
caa9ed28cc Merge branch 'pull-request/2097' 2016-10-17 16:05:32 +01:00
Joe Watkins
96ed946b2b Merge branch 'pull-request/2097' 2016-10-17 16:03:12 +01:00
Joe Watkins
63166412a2 Merge branch 'pull-request/2097' 2016-10-17 16:02:51 +01:00
Bob Weinand
efcbeb0603 Merge branch 'PHP-7.1' 2016-10-16 15:46:44 +02:00
Bob Weinand
f8c2089651 Merge branch 'PHP-7.0' into PHP-7.1 2016-10-16 15:46:33 +02:00
Bob Weinand
d82da7de3a Fixed bug #71234 (INI files are loaded even invoked as phpdbg -n --version) 2016-10-16 15:41:37 +02:00
Bob Weinand
b1c6299b34 Merge branch 'PHP-7.1' 2016-10-16 13:48:25 +02:00
Bob Weinand
47bd3d982e Merge branch 'PHP-7.0' into PHP-7.1 2016-10-16 13:48:13 +02:00
Bob Weinand
e93eaee164 Fixed bug #70776 (Simple SIGINT does not have any effect) 2016-10-16 13:47:49 +02:00
Bob Weinand
0399a43265 Merge branch 'PHP-7.1' 2016-10-16 12:34:20 +02:00
Bob Weinand
601ab6e9d0 Fix searching for catch blocks
Since PHP-7.1 catch blocks are addressed with relative byte difference between two catch blocks as opposed to absolute opcode number
2016-10-16 12:34:10 +02:00
Bob Weinand
8af4882193 Merge branch 'PHP-7.1' 2016-10-14 12:25:34 +02:00
Bob Weinand
386aff451b Merge branch 'PHP-7.0' into PHP-7.1 2016-10-14 12:25:16 +02:00
Bob Weinand
466870e2b0 Fix memory leak when compiling files in phpdbg 2016-10-14 12:24:28 +02:00
Bob Weinand
990e2ce2a0 Ignore non-executable opcodes in line mode of phpdbg_end_oplog()
(cherry picked from commit d14498a475)
2016-10-14 02:03:46 +02:00
Anatol Belski
5ce2230266 use already exported symbol
(cherry picked from commit ce3e792c2c)
2016-10-14 02:01:22 +02:00
Bob Weinand
f40c03168e Merge remote-tracking branch 'origin/PHP-7.0' into PHP-7.1
(cherry picked from commit 457e686262)
2016-10-14 01:54:18 +02:00
Nikita Popov
6baaccc9b6 Merge branch 'PHP-7.0' into PHP-7.1
(cherry picked from commit 9669ec707a)
2016-10-14 01:53:25 +02:00
Bob Weinand
06df34072e Fix accidental PHPDBG_ABI break
(cherry picked from commit 671d8054f8)
2016-10-14 01:50:48 +02:00
Bob Weinand
11e7447e04 Merge branch 'PHP-7.0' into PHP-7.1
(cherry picked from commit 37ae5f3931)
2016-10-14 01:48:03 +02:00
Bob Weinand
1630934070 Merge branch 'PHP-7.0' into PHP-7.1 2016-10-13 14:10:19 +02:00
Bob Weinand
d14498a475 Ignore non-executable opcodes in line mode of phpdbg_end_oplog() 2016-10-13 14:09:56 +02:00
Anatol Belski
afbb3b858a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  use already exported symbol
  Revert "export symbol missing by phpdbg"
2016-10-13 10:08:10 +02:00
Anatol Belski
ce3e792c2c use already exported symbol 2016-10-13 09:55:37 +02:00
Bob Weinand
457e686262 Merge remote-tracking branch 'origin/PHP-7.0' into PHP-7.1 2016-10-12 22:57:41 +02:00
Bob Weinand
fe49fd7dad Update NEWS
Also add missing include.inc test file
2016-10-12 22:54:32 +02:00
Nikita Popov
9669ec707a Merge branch 'PHP-7.0' into PHP-7.1 2016-10-12 22:46:28 +02:00
Nikita Popov
fe378c27cc Fix phpdbg tests after lineno change 2016-10-12 22:41:59 +02:00
Bob Weinand
671d8054f8 Fix accidental PHPDBG_ABI break 2016-10-12 22:16:11 +02:00
Bob Weinand
37ae5f3931 Merge branch 'PHP-7.0' into PHP-7.1 2016-10-12 20:19:10 +02:00
Bob Weinand
5aae01104f Add stdin command and -s command line parameter to phpdbg
This allows reading the initial script file from stdin instead of being forced to put the script into a file in order to run it with phpdbg.
Especially important for programmatic execution of phpdbg.

Also adding tests/include_once.phpt and tests/set_exception_handler.phpt as I seem to have forgotten to git add them sometime long ago...
2016-10-12 20:15:49 +02:00
Bob Weinand
d7474e13bd Merge branch 'PHP-7.1' 2016-10-06 10:36:40 +02:00
Bob Weinand
c9d3b9fb47 Use better fix for preventing too early freeing of interned strings
Works also with opcache now - just prevent zend_interned_strings_restore completely - zend_interned_strings_dtor will take care as phpdbg only ever uses one single request cycle per module cycle
2016-10-06 10:36:25 +02:00
Bob Weinand
38beb0e8d8 Merge branch 'PHP-7.1' 2016-10-05 12:22:39 +02:00
Bob Weinand
abfd811ea4 Merge branch 'PHP-7.0' into PHP-7.1 2016-10-05 12:20:06 +02:00
Bob Weinand
4790da5475 Update run command for allowing STDIN 2016-10-05 12:14:02 +02:00
Bob Weinand
eaff72f31b Remove phpdbg fix targeting 7.1 which landed in 7.0 2016-10-05 12:08:20 +02:00
Bob Weinand
007cf7d7d3 Merge branch 'PHP-7.1' 2016-10-03 12:55:45 +02:00
Bob Weinand
8fcc938e56 Merge branch 'PHP-7.0' into PHP-7.1 2016-10-03 12:55:23 +02:00
Bob Weinand
8908df690f Fix crash on Linux due to double fclose() 2016-10-03 12:55:06 +02:00
Bob Weinand
29941e1811 Merge branch 'PHP-7.1' 2016-10-02 12:46:45 +01:00
Bob Weinand
f58cf8b24d Merge branch 'PHP-7.0' into PHP-7.1 2016-10-02 12:46:22 +01:00
Bob Weinand
417a8ef6b4 Fix run command args passing when inmidst execution 2016-10-02 12:45:20 +01:00
Bob Weinand
1c74398520 Merge branch 'PHP-7.1' 2016-10-01 19:14:46 +01:00
Bob Weinand
3fe1010cee Merge branch 'PHP-7.0' into PHP-7.1 2016-10-01 19:14:26 +01:00
Bob Weinand
9d537951c5 Add proper escape sequences and reading stdin from file in phpdbg run command 2016-10-01 19:05:19 +01:00
Bob Weinand
948c1a912a Merge branch 'PHP-7.1' 2016-10-01 10:47:53 +01:00
Bob Weinand
a5129bcb5b Merge branch 'PHP-7.0' into PHP-7.1 2016-10-01 10:47:31 +01:00
Bob Weinand
3280a29ee5 Fix invalid access to interned strings after they are freed in phpdbg 2016-10-01 10:46:21 +01:00
Bob Weinand
b1a1902a0f Merge branch 'PHP-7.1' 2016-09-28 13:26:49 +02:00
Bob Weinand
e5d75d7268 Add phpdbg generator command 2016-09-28 13:26:08 +02:00
Julien Pauli
983f1e3618 Merge branch 'PHP-7.1'
* PHP-7.1:
  Formatting. Fix possible memory corruption in FPM SHM management
  fix every work call mmap
2016-09-23 13:54:46 +02:00
Julien Pauli
974ba6be7a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Formatting. Fix possible memory corruption in FPM SHM management
  fix every work call mmap

Conflicts:
	sapi/fpm/fpm/fpm_scoreboard.c
2016-09-23 13:54:22 +02:00
Julien Pauli
fbf87a8082 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Formatting. Fix possible memory corruption in FPM SHM management
  fix every work call mmap
2016-09-23 13:53:22 +02:00
Julien Pauli
a22175b06f Formatting. Fix possible memory corruption in FPM SHM management 2016-09-23 13:52:58 +02:00
tom916
807004a446 fix every work call mmap
fix fpm_scoreboard_free
2016-09-23 13:52:58 +02:00
Anatol Belski
8f256bebef Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  update NEWS
  phpdbg next command must stop when leaving function
2016-09-23 11:25:33 +02:00
Bob Weinand
a137a1e255 Merge branch 'PHP-7.0' 2016-09-23 03:29:56 +02:00
Bob Weinand
cf35dae6e2 phpdbg next command must stop when leaving function 2016-09-23 03:29:37 +02:00
George Wang
6f7479251b Merge branch 'PHP-7.1' 2016-09-19 10:52:58 -04:00
George Wang
248ef30abe Merge branch 'PHP-7.0' into PHP-7.1 2016-09-19 10:50:21 -04:00
George Wang
ca24c58e65 Merge branch 'PHP-5.6' into PHP-7.0 2016-09-19 10:49:26 -04:00
George Wang
56fa36b0a8 Fix wrong year in previous commit. 2016-09-19 10:46:46 -04:00
Anatol Belski
b1f33db39f backport 59444347 and 3d7343f6 2016-09-08 17:46:53 +02:00
Oleg Efimov
ba65b37b26 Allow to configure php-fpm slow log trace callers limit 2016-09-06 12:27:57 +03:00
Stanislav Malyshev
013425fa37 Merge branch 'PHP-7.1'
* PHP-7.1:
  phpdbg: couple of network function return checks. Possible overflow when copy the socket_path configuration.
2016-09-04 23:24:36 -07:00
Stanislav Malyshev
8c16f2262f Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  phpdbg: couple of network function return checks. Possible overflow when copy the socket_path configuration.
2016-09-04 23:24:31 -07:00
David Carlier
19350b6b73 phpdbg: couple of network function return checks. Possible
overflow when copy the socket_path configuration.
2016-09-04 23:18:51 -07:00
Nikita Popov
57180cd306 Merge branch 'PHP-7.1' 2016-09-03 23:31:20 +02:00
Nikita Popov
f1bfd7fe00 Merge branch 'PHP-7.0' into PHP-7.1 2016-09-03 23:31:05 +02:00
Nikita Popov
1ae2d074f8 Fix bug #72996 2016-09-03 23:30:23 +02:00
Anatol Belski
3e938cd8a9 Merge branch 'PHP-7.1'
* PHP-7.1:
  fix dealloc mismatch
2016-08-29 13:49:20 +02:00
Anatol Belski
0e709fe42d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix dealloc mismatch
2016-08-29 13:43:08 +02:00
Anatol Belski
eac7f4b670 fix dealloc mismatch 2016-08-29 12:46:23 +02:00
George Wang
698b88fb17 Merge branch 'PHP-7.1' 2016-08-28 22:32:42 -04:00
George Wang
0a09eecfcc code cleanup. 2016-08-28 22:31:08 -04:00
George Wang
413bd261ec Merge branch 'PHP-7.0' into PHP-7.1 2016-08-28 22:29:38 -04:00
George Wang
ca1eb585ee Merge branch 'PHP-5.6' into PHP-7.0
Conflicts:
	sapi/litespeed/lsapi_main.c
2016-08-28 22:23:28 -04:00
George Wang
c73bcbefbd Added .user.ini support.
Added LSPHPRC support.
update LiteSpeed SAPI version to 6.10 .
2016-08-28 21:49:30 -04:00
Sara Golemon
fd8e203fa2 Add .gitignore for fpm generated files 2016-08-21 12:53:01 -07:00
Stanislav Malyshev
d6a43a8562 Fix bug #72836 - integer overflow in base64_decode caused heap corruption 2016-08-16 22:55:41 -07:00
Matthias Endler
ad8b99c888 Fix some typos in PHP FPM configuration
[skip ci]
2016-08-15 22:50:14 +02:00
Anatol Belski
53034feda5 pull ps_title behind the logic to support the current codepage 2016-08-11 13:38:28 +02:00
Nikita Popov
2fbfa7f62e Merge branch 'PHP-7.0' into PHP-7.1 2016-08-09 15:35:04 +02:00
Nikita Popov
842e408c67 Don't copy mime types in CLI server
This is both unnecessary and causes leaks in valgrind.
2016-08-09 15:34:03 +02:00
Christoph M. Becker
b0558b3004 Merge branch 'PHP-7.0' into PHP-7.1 2016-07-28 17:00:54 +02:00
Christoph M. Becker
95190db84d Merge branch 'PHP-5.6' into PHP-7.0 2016-07-28 16:54:36 +02:00
Christoph M. Becker
6e886f07a8 Fix #72676: Test cli_process_title_unix fails on AIX
Patch provided by matthieu dot sarter dot external at atos dot net.
2016-07-28 16:51:45 +02:00
Remi Collet
d5ad4b8b14 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  FPM: add test for CVE-2016-5385
2016-07-22 09:37:00 +02:00
Remi Collet
9622f973a5 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  FPM: add test for CVE-2016-5385
2016-07-22 09:36:36 +02:00
Remi Collet
fb4a6dc0f1 FPM: add test for CVE-2016-5385 2016-07-22 09:35:09 +02:00
Anatol Belski
88d86aeb53 add missing header to fix build 2016-07-19 01:30:07 +02:00
Anatol Belski
2349332b66 correct macro names 2016-07-17 12:33:26 +02:00
Bob Weinand
517bbb14fd Disable optimizer when it conflicts with phpdbg tests 2016-07-13 10:22:00 +02:00
Bob Weinand
7a125a4409 Remove bogus zend_signal_shutdown symbol from header 2016-07-13 01:05:32 +02:00
Bob Weinand
d08cb90462 Cleanup zend_/signal usage in phpdbg.c 2016-07-13 00:37:25 +02:00
Bob Weinand
ef6d0c8b6d Fix phpdbg ZTS watchpoint+shutdown sequences & opcache+watchpoints 2016-07-12 20:50:51 +02:00
Julien Pauli
556cbfb6c3 Merge branch 'PHP-7.0'
* PHP-7.0:
  Updated NEWS
  Updated NEWS
  Fix #72575: using --allow-to-run-as-root should ignore missing user directive
2016-07-12 10:38:51 +02:00
Julien Pauli
3c356aa7cb Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Updated NEWS
  Fix #72575: using --allow-to-run-as-root should ignore missing user directive
2016-07-12 10:38:22 +02:00
gooh
fb49f137ec Fix #72575: using --allow-to-run-as-root should ignore missing user
directive

Trying to start PHP-FPM with the --allow-to-run-as-root flag will not
work when the user directive is not given in the FPM worker pool
configuration. Parsing the config will fail. Consequently, FPM cannot
start.

The check is in place to prevent FPM from getting started with root
privileges by accident. Prior to #61295 the check would also prevent
any non-root user to start PHP-FPM without a user directive present.

This patch adds an additional check to the config parser, checking for
the --allow-to-run-as-root flag to be present. If so, parsing will no
longer abort for root users even if the user directive is missing.

I will also update the PHP docs since they still state the user
directive is a mandatory setting which it is not since #61295.
2016-07-12 10:36:17 +02:00
Bob Weinand
b00376884e Rewrite watchpoints to be much more stable
This mainly involves a separate abstraction layer for elements (e.g. $a->b) and watchpoints (on pointer of the Bucket for example).
Also better comparison handling (value backup vs. page dumps).

It is not yet finished (there are sometimes false positives announced and names not yet perfect), but the functionality is working and not crashing as far as I have tested.
Future scope is also relative watchpoints, e.g. "w $this->val expression()" which does not have the symbol tables as basis, but the value (in this example: return value of expression()) as basis.
2016-07-11 23:58:20 +02:00
Julien Pauli
51e7415575 Merge branch 'PHP-7.0'
* PHP-7.0:
  Remove needless zeroing of anonymously mmap'd memory
  Remove needless zeroing of anonymously mmap'd memory
2016-07-11 14:59:24 +02:00
Julien Pauli
fc2c301fe2 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Remove needless zeroing of anonymously mmap'd memory
  Remove needless zeroing of anonymously mmap'd memory
2016-07-11 14:58:55 +02:00
Julien Pauli
2552cf248d Remove needless zeroing of anonymously mmap'd memory 2016-07-11 14:58:12 +02:00
Michael McConville
9dd5d96332 Remove needless zeroing of anonymously mmap'd memory
All existing systems zero anonymously mmapped memory, and if I
understand correctly POSIX will be specifying this soon. Many projects
already rely on it, so no reasonable system would return memory of
unspecified value.
2016-07-11 14:56:17 +02:00
Anatol Belski
45a8824423 fix build with mod_winnt 2016-07-11 09:40:43 +02:00
Martin Vobruba
2809a676b5 Pass error severity to SAPI modules and raise corresponding error level in Apache 2016-07-11 09:34:48 +02:00
Dmitry Stogov
d898344663 Inline simple constant functions 2016-06-30 17:04:25 +03:00
Remi Collet
d53fa7f451 Improve php-fpm systemd unit file
- use PrivateTmp, now available everwhere, for better security
- add comment about how to customize the unit file
2016-06-29 06:48:06 +02:00
Dmitry Stogov
0cfb47651c Fixed compilation warnings 2016-06-28 11:37:51 +03:00
Xinchen Hui
de7a6b1232 MFH: Fixed fd leak (the origin commit can not be cherry-picked) 2016-06-28 11:36:27 +08:00
David Carlier
85e985f191 couple of resource leaks fixes and use after free's 2016-06-27 07:44:21 +01:00
Xinchen Hui
8de8636a2b Merge branch 'PHP-7.0' 2016-06-24 18:08:28 -07:00
Xinchen Hui
0183a9af5a Fixed bug #72484 (SCRIPT_FILENAME shows wrong path if the user specify router.php) 2016-06-24 18:08:16 -07:00
Dmitry Stogov
1433162083 Fixed compilation warnings 2016-06-21 20:12:29 +03:00
Dmitry Stogov
22ecd4428a Fixed compilation warnings 2016-06-21 17:56:07 +03:00
Dmitry Stogov
1616038698 Added ZEND_ATTRIBUTE_FORMAT to some middind functions.
"%p" replaced by ZEND_LONG_FMT to avoid compilation warnings.
Fixed most incorrect use cases of format specifiers.
2016-06-21 16:00:37 +03:00
Dmitry Stogov
7cc1b00163 Improved support for zend-signals. 2016-06-20 22:41:14 +03:00
Dmitry Stogov
c22a1c83f3 Zend signals should be installed after request startup (or regular signals may be installed before zend_signal_startup) 2016-06-20 19:19:16 +03:00
Dmitry Stogov
c622cc4446 Fixed phpdbg build without --enable-zend-signals 2016-06-20 16:32:24 +03:00
Dmitry Stogov
6ef43be1d7 Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
  Fixed the UTF-8 and long path support in the streams on Windows.
2016-06-20 14:59:35 +03:00
Dmitry Stogov
c8706331b5 Cleanup zend_signal API 2016-06-20 14:58:42 +03:00
Anatol Belski
3d3f11ede4 Fixed the UTF-8 and long path support in the streams on Windows.
Since long the default PHP charset is UTF-8, however the Windows part is
out of step with this important point. The current implementation in PHP
doesn't technically permit to handle UTF-8 filepath and several other
things. Till now, only the ANSI compatible APIs are being used. Here is more
about it

https://msdn.microsoft.com/en-us/library/windows/desktop/dd317752%28v=vs.85%29.aspx

The patch fixes not only issues with multibyte filenames under
incompatible codepages, but indirectly also issues with some other multibyte
encodings like BIG5, Shift-JIS, etc. by providing a clean way to access
filenames in UTF-8. Below is a small list of issues from the bug tracker,
that are getting fixed:

https://bugs.php.net/63401
https://bugs.php.net/41199
https://bugs.php.net/50203
https://bugs.php.net/71509
https://bugs.php.net/64699
https://bugs.php.net/64506
https://bugs.php.net/30195
https://bugs.php.net/65358
https://bugs.php.net/61315
https://bugs.php.net/70943
https://bugs.php.net/70903
https://bugs.php.net/63593
https://bugs.php.net/54977
https://bugs.php.net/54028
https://bugs.php.net/43148
https://bugs.php.net/30730
https://bugs.php.net/33350
https://bugs.php.net/35300
https://bugs.php.net/46990
https://bugs.php.net/61309
https://bugs.php.net/69333
https://bugs.php.net/45517
https://bugs.php.net/70551
https://bugs.php.net/50197
https://bugs.php.net/72200
https://bugs.php.net/37672

Yet more related tickets can for sure be found - on bugs.php.net, Stackoverflow
and Github. Some of the bugs are pretty recent, some descend to early
2000th, but  the user comments in there last even till today. Just for example,
bug #30195 was opened in 2004, the latest comment in there was made in 2014. It
is certain, that these bugs descend not only to pure PHP use cases, but get also
redirected from the popular PHP based projects. Given the modern systems (and
those supported by PHP) are always based on NTFS, there is no excuse to keep
these issues unresolved.

The internalization approach on Windows is in many ways different from
UNIX and Linux, while it supports and is based on Unicode. It depends on the
current system code page, APIs used and exact kind how the binary was compiled
The locale doesn't affect the way Unicode or ANSI API work. PHP in particular
is being compiled without _UNICODE defined and this is conditioned by the
way we handle strings. Here is more about it

https://msdn.microsoft.com/en-us/library/tsbaswba.aspx

However, with any system code page ANSI functions automatically convert
paths to UTF-16. Paths in some encodings incompatible with the
current system code page, won't work correctly with ANSI APIs. PHP
till now only uses the ANSI Windows APIs.

For example, on a system with the current code page 1252, the paths
in cp1252 are supported and transparently converted to UTF-16 by the
ANSI functions. Once one wants to handle a filepath encoded with cp932 on
that particular system, an ANSI or a POSIX compatible function used in
PHP will produce an erroneous result. When trying to convert that cp932 path
to UTF-8 and passing to the ANSI functions, an ANSI function would
likely interpret the UTF-8 string as some string in the current code page and
create a filepath that represents every single byte of the UTF-8 string.
These behaviors are not only broken but also disregard the documented
INI settings.

This patch solves the issies with the multibyte paths on Windows by
intelligently enforcing the usage of the Unicode aware APIs. For
functions expect Unicode (fe CreateFileW, FindFirstFileW, etc.), arguments
will be converted to UTF-16 wide chars. For functions returning Unicode
aware data (fe GetCurrentDirectoryW, etc.), resulting wide string is
converted back to char's depending on the current PHP charset settings,
either to the current ANSI codepage (this is the behavior prior to this patch)
or to UTF-8 (the default behavior).

In a particular case, users might have to explicitly set
internal_encoding or default_charset, if filenames in ANSI codepage are
necessary. Current tests show no regressions and witness that this will be an
exotic case, the current default UTF-8 encoding is compatible with any
supported system. The dependency libraries are long switching to Unicode APIs,
so some tests were also added for extensions not directly related to streams.
At large, the patch brings over 150 related tests into the core. Those target
and was run on various environments with European, Asian, etc. codepages.
General PHP frameworks was tested and showed no regressions.

The impact on the current C code base is low, the most places affected
are the Windows only places in the three files tsrm_win32.c, zend_virtual_cwd.c
and plain_wrapper.c. The actual implementation of the most of the wide
char supporting functionality is in win32/ioutil.* and win32/codepage.*,
several  low level functionsare extended in place to avoid reimplementation for
now. No performance impact was sighted. As previously mentioned, the ANSI APIs
used prior the patch perform Unicode conversions internally. Using the
Unicode  APIs directly while doing custom conversions just retains the status
quo. The ways to optimize it are open (fe. by implementing caching for the
strings converted to wide variants).

The long path implementation is user transparent. If a path exceeds the
length of _MAX_PATH, it'll be automatically prefixed with \\?\. The MAXPATHLEN
is set to 2048 bytes.

Appreciation to Pierre Joye, Matt Ficken, @algo13 and others for tips, ideas
and testing.

Thanks.
2016-06-20 12:45:39 +02:00
Dmitry Stogov
3abd9c34c1 Removed unused callbacks 2016-06-20 13:27:59 +03:00
Martin Vobruba
1ed544d05b Enable per-module logging in Apache 2.4+ 2016-06-03 00:08:57 +02:00
Anatol Belski
d122f4c24a improve date header code 2016-06-02 13:13:54 +02:00
SeeSchloss
f33c7b3e41 Added mandatory Date: header to built-in webserver 2016-06-02 12:27:48 +02:00
Xinchen Hui
0ed4034881 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #72308 (fastcgi_finish_request and logging environment variables)
2016-06-02 14:17:00 +08:00
Xinchen Hui
31ce3a661a Fixed bug #72308 (fastcgi_finish_request and logging environment variables) 2016-06-02 14:16:32 +08:00
Anatol Belski
6bd3b8108a Merge branch 'PHP-7.0'
* PHP-7.0:
  fix condition
2016-05-30 18:36:06 +02:00
Anatol Belski
2524ab9e67 fix condition 2016-05-30 18:35:14 +02:00
Bob Weinand
67468fb417 Fixed bug #72284 (phpdbg fatal errors with coverage)
Cherry-pick of original commits d3371b and 0f20e11 only present in master
2016-05-30 13:31:17 +02:00
Adam Harvey
38be3b28cb Merge branch 'PHP-7.0'
* PHP-7.0:
  Fix typo in phpdbg help.
2016-05-25 12:48:00 -05:00
Adam Harvey
c523dfdb49 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fix typo in phpdbg help.
2016-05-25 12:47:49 -05:00
Adam Harvey
54eb659032 Fix typo in phpdbg help.
Sorry, I would have included this in the last push had I spotted it a
minute earlier.
2016-05-25 12:47:35 -05:00
Adam Harvey
457d3ad36c Merge branch 'PHP-7.0'
* PHP-7.0:
  Add missing newlines to phpdbg's help for the run command.
2016-05-25 12:42:17 -05:00
Adam Harvey
ac29f9de86 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Add missing newlines to phpdbg's help for the run command.
2016-05-25 12:40:23 -05:00
Adam Harvey
e623e91e27 Add missing newlines to phpdbg's help for the run command.
This is not at all related to needing screenshots for a talk I'm giving
in two days. No sir. Not at all.
2016-05-25 12:38:41 -05:00
Dmitry Stogov
2ae21abdf7 Fixed bug #72213 (Finally leaks on nested exceptions).
Squashed commit of the following:

commit 8461b0407f
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed May 25 00:34:42 2016 +0300

    Rmoved zend_try_catch_element.parent and walk through op_array.try_catch_array backward from the current try_cacth_offset.

commit 0c71e24964
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed May 25 00:04:53 2016 +0300

    Move SAVE_OPLINE() to its original place

commit 111432a4df
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed May 25 00:01:10 2016 +0300

    Separate the common part of ZEND_HANDLE_EXCEPTION and FAST_RET into zend_dispatch_try_catch_finally_helper.

commit 4f21c06c2e
Author: Nikita Popov <nikic@php.net>
Date:   Tue May 24 14:55:27 2016 +0200

    Improve finally fix

commit da5c727499
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue May 24 10:36:08 2016 +0300

    Fixed Zend/tests/try/bug70228_3.phpt and Zend/tests/try/bug70228_4.phpt

commit cfcedf2fb4
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue May 24 02:59:27 2016 +0300

    Added test

commit 4c6aa93d43
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue May 24 00:38:20 2016 +0300

    Added tests

commit 8a8f4704b0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon May 23 23:27:34 2016 +0300

    Fixed bug #72213 (Finally leaks on nested exceptions)
2016-05-25 01:25:12 +03:00
Dmitry Stogov
be071702b3 Fixed bug #72188 (Nested try/finally blocks losing return value) 2016-05-13 14:38:43 +03:00
Bob Weinand
d33e71b358 Fix include_once in phpdbg 2016-05-07 14:45:41 +02:00
Bob Weinand
0f20e113c2 Fix potential double free with phpdbg 2016-05-03 13:36:41 +02:00
Joe Watkins
12f826d7df Merge branch 'PHP-7.0'
* PHP-7.0:
  fix size_t signed comparison
2016-04-29 10:20:27 +01:00
Joe Watkins
dbae1653da fix size_t signed comparison 2016-04-29 10:19:55 +01:00
Dmitry Stogov
747a482b9c Don't initialize EX(call)->symbol_table on each function call.
Keep it uninitialized, and check ZEND_CALL_HAS_SYMBOL_TABLE flag when necessary.
2016-04-28 15:17:24 +03:00
Dmitry Stogov
6499162ff0 - get rid of EG(scope). zend_get_executed_scope() should be used instead.
- ichanged zval_update_constant_ex(). Use IS_TYPE_IMMUTABLE flag on shared constants and AST, instead of "inline_change" parameter.
2016-04-28 04:13:34 +03:00
Dmitry Stogov
f0a2e8eb13 Removed "zend_fcall_info.function_table". It was assigned in many places, but is never used. 2016-04-27 13:46:38 +03:00
Ferenc Kovacs
1380a6c2ff Merge branch 'PHP-7.0'
* PHP-7.0:
  mark frequent intermittent fpm test with XFAIL
2016-04-18 09:05:16 +02:00
Ferenc Kovacs
8f35ee49ee Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  mark frequent intermittent fpm test with XFAIL
2016-04-18 09:04:55 +02:00
Ferenc Kovacs
3a16f511d9 mark frequent intermittent fpm test with XFAIL 2016-04-18 09:04:27 +02:00
Xinchen Hui
a8c4d9e09d Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed failed with libedit
2016-04-15 11:58:13 +08:00
Xinchen Hui
163d26d584 Fixed failed with libedit 2016-04-15 11:57:53 +08:00
Joe Watkins
fef494f99f Merge branch 'PHP-7.0'
* PHP-7.0:
  phpdbg: close file handles
2016-04-12 13:40:36 +01:00
Joe Watkins
b04125da85 phpdbg: close file handles 2016-04-12 13:40:03 +01:00
Nikita Popov
8e5b139732 Evaluate arguments of new for classes without ctor
ML: http://markmail.org/message/4b3mk7jid64zvz34
2016-03-25 19:11:37 +01:00
Nikita Popov
24551ed6c8 Print .0 in phpdbg opcode dumps 2016-03-25 19:11:32 +01:00
Matt Ficken
fa6ce55675 bug #71478 implementing feature request 2016-03-21 21:09:32 -07:00
Anatol Belski
ec13d5ca75 Merge branch 'PHP-7.0'
* PHP-7.0:
  update NEWS
  Fix bug #71624, PHP_MODE_PROCESS_STDIN (CLI SAPI called with '-R') did not properly set $argi and $argn
  fix uninitialized value
2016-03-15 07:11:54 +01:00
Sean DuBois
68ebfc87ad Fix bug #71624, PHP_MODE_PROCESS_STDIN (CLI SAPI called with '-R') did not properly set $argi and $argn 2016-03-15 07:02:40 +01:00
Nikita Popov
7ed893712f Merge branch 'PHP-7.0'
Conflicts:
	ext/mysqlnd/mysqlnd_priv.h
	main/php_streams.h
2016-03-03 23:20:50 +01:00
Nikita Popov
5602f64213 Eliminate usages of _PP macros
These are either in debug code (fix them), commented out (drop
them) or in dead compatibility macros (drop them).

One usage was in php_stream_get_from_zval(), which we have not used
since at least PHP 5.2 and, judging from the fact that nobody
complained about it causing compile errors in PHP 7, nobody else
uses it either, so drop it.

There are still remaining uses in mysqli embedded and odbc birdstep.
These probably need to be dropped outright.
2016-03-03 23:20:12 +01:00
Nikita Popov
6c8dd3eb04 Merge branch 'PHP-7.0' 2016-03-03 19:27:41 +01:00
Nikita Popov
3240dd93b3 Merge branch 'PHP-5.6' into PHP-7.0 2016-03-03 19:27:35 +01:00
Christoph M. Becker
2d4ad66ff2 Fixed bug #69953
Added support for MKCALENDAR request method in CLI web server.
2016-03-03 19:22:38 +01:00
Nikita Popov
f57c0b3249 Merge branch 'PHP-7.0' 2016-03-03 16:50:47 +01:00
Nikita Popov
1ac152938c Move semicolon into TSRMLS_CACHE_EXTERN/DEFINE
Also re bug #71575.
2016-03-03 16:50:01 +01:00
James Titcumb
c4b188871e Fix bug #71575 removing extra semicolons outside macros 2016-03-03 16:41:03 +01:00
Nikita Popov
5527c5b083 Merge branch 'PHP-5.6' into PHP-7.0 2016-03-03 16:38:13 +01:00
Nikita Popov
bdd578fcbb Disable upload_2G test on travis 2016-03-03 16:35:45 +01:00
Dmitry Stogov
c67c166f93 Removed zend_fcall_info.symbol_table 2016-03-02 17:50:55 +03:00
Dmitry Stogov
960b3755b3 Merge branch 'PHP-7.0'
* PHP-7.0:
  PHP-7 zend_call_function() doesn't support symbol_table substitution
2016-03-02 16:57:08 +03:00
Dmitry Stogov
908b662f7f PHP-7 zend_call_function() doesn't support symbol_table substitution 2016-03-02 16:56:39 +03:00
Stanislav Malyshev
2e874114a2 Merge branch 'PHP-7.0'
* PHP-7.0: (25 commits)
  Update NEWS
  update NEWS
  fix test file
  Fix version
  update NEWS
  Update NEWS
  Fix bug #71610: Type Confusion Vulnerability - SOAP / make_http_soap_request()
  Fix bug #71637: Multiple Heap Overflow due to integer overflows
  extend check for add_flag
  Fixed another segfault with file_cache_only now
  set version
  fix nmake clean in phpize mode
  Fixed segfault with file_cache_only
  Fixed possible crash at PCRE on MSHUTDOWN
  Fixed more synchronisation issues during SHM reload
  Set proper type flags (REFCOUNTED and COPYABLE) according to interned or regular string
  sync with improvements in NEWS
  Fixed process synchronisation problem, that may cause crashes after opcache restart
  Fix bug #71610: Type Confusion Vulnerability - SOAP / make_http_soap_request()
  Fix bug #71637: Multiple Heap Overflow due to integer overflows
  ...
2016-03-01 23:11:42 -08:00
Stanislav Malyshev
22d8e9aced Merge branch 'PHP-7.0.4' into PHP-7.0
* PHP-7.0.4: (21 commits)
  update NEWS
  fix test file
  Fix version
  update NEWS
  Update NEWS
  Fix bug #71610: Type Confusion Vulnerability - SOAP / make_http_soap_request()
  Fix bug #71637: Multiple Heap Overflow due to integer overflows
  extend check for add_flag
  Fixed another segfault with file_cache_only now
  set version
  fix nmake clean in phpize mode
  Fixed segfault with file_cache_only
  Fixed possible crash at PCRE on MSHUTDOWN
  Fixed more synchronisation issues during SHM reload
  Set proper type flags (REFCOUNTED and COPYABLE) according to interned or regular string
  sync with improvements in NEWS
  Fixed process synchronisation problem, that may cause crashes after opcache restart
  Fix bug #71498: Out-of-Bound Read in phar_parse_zipfile()
  fix ts buld
  prep for 5.6.19RC1
  ...

Conflicts:
	configure.in
	main/php_version.h
2016-03-01 23:08:19 -08:00
Stanislav Malyshev
90a0cbd594 Merge branch 'PHP-5.6.19' into PHP-7.0.4
* PHP-5.6.19:
  fix test file
  Fix version
  update NEWS
  Update NEWS
  Fix bug #71498: Out-of-Bound Read in phar_parse_zipfile()
  fix ts buld
  prep for 5.6.19RC1
  5.6.20 is next
  Fixed bug #71587 - Use-After-Free / Double-Free in WDDX Deserialize

Conflicts:
	configure.in
	ext/wddx/wddx.c
	main/php_version.h
2016-03-01 23:01:48 -08:00
Anatol Belski
85ade00465 fix callback signature compat 2016-02-23 18:18:34 +01:00
Anatol Belski
68a51ae953 fix ts buld 2016-02-18 10:31:24 +01:00
Anatol Belski
a329dc70e9 fix ts buld 2016-02-18 07:11:36 +01:00
Bob Weinand
eea576d589 Merge branch 'PHP-7.0' 2016-02-17 20:28:07 +01:00
Bob Weinand
055b411218 Fix crash when advancing inside an internal function
This just happened in the "double ctrl+c" mode, when we halted inside an internal function; there was some code assuming a proper op_array
2016-02-17 20:27:46 +01:00
Mickaël
0c2e184eac fpm: call zend_signal_init() in child
This addresses bug #71269.

When an fpm child handles more than one request, zend_signal_startup() will
override the saved signal handlers with the internal zend handlers set from the
previous request, causing a SIGQUIT signal to result in a core dump rather than
gracefully exiting (the expected behaviour).

This is fixed by adding a call to zend_signal_init() after setting the
signal handlers in the child. The same technique is used in the apache SAPI
module in commit fd5a756ad4 which addresses
bug #61083.
2016-02-15 13:23:37 +08:00
Xinchen Hui
2b6f06b70c Merge branch 'patch-1' of https://github.com/mickael9/php-src
* 'patch-1' of https://github.com/mickael9/php-src:
  fpm: call zend_signal_init() in child
2016-02-15 13:23:01 +08:00
Anatol Belski
eca7881aa0 Merge branch 'PHP-7.0'
* PHP-7.0:
  Fixed bug #71559 Built-in HTTP server, we can downlaod file in web by bug
2016-02-14 20:49:42 +01:00
Anatol Belski
724ee19111 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed bug #71559 Built-in HTTP server, we can downlaod file in web by bug
2016-02-14 20:49:03 +01:00
Anatol Belski
ce4a2f0fc6 Fixed bug #71559 Built-in HTTP server, we can downlaod file in web by bug 2016-02-14 20:47:23 +01:00
Nikita Popov
2d605e5f24 Merge branch 'PHP-7.0' 2016-02-14 14:47:42 +01:00
Nikita Popov
c9357f82d3 Format string fixes
Conflicts:
	ext/pgsql/pgsql.c
2016-02-14 14:45:53 +01:00
Nikita Popov
5983378364 Fix format attributes in ZTS 2016-02-14 14:44:27 +01:00
Bob Weinand
c7a18a4a24 Merge branch 'PHP-7.0' 2016-02-11 06:43:55 +01:00
Bob Weinand
1a01a5ec83 Fixed inherited functions from unspecified files being included in phpdbg_get_executable()
See also https://github.com/krakjoe/phpdbg/issues/152
2016-02-11 06:42:51 +01:00
Joe Watkins
ec37cecd90 Merge branch 'master' of https://github.com/php/php-src 2016-02-10 12:59:52 +00:00
Joe Watkins
4808d9689a be more precise about the meaning of -n 2016-02-10 12:59:38 +00:00
Joe Watkins
daf3d0c875 Merge branch 'PHP-7.0' of https://github.com/php/php-src into PHP-7.0 2016-02-10 12:58:19 +00:00
Joe Watkins
3ac63df9bc be more precise about the meaning of -n 2016-02-10 12:57:48 +00:00
Lior Kaplan
85ce6a7d38 Merge branch 'PHP-7.0'
* PHP-7.0:
  Align spacing in make install messages
2016-02-08 20:33:17 +02:00
Lior Kaplan
fb7d673ef2 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Align spacing in make install messages
  Add entry for re-fix of #70976 in commit 14e4d393
2016-02-08 20:29:24 +02:00
Lior Kaplan
6772fbff62 Align spacing in make install messages 2016-02-08 20:27:19 +02:00
Nikita Popov
1c709f08c7 Merge branch 'PHP-7.0' 2016-01-29 17:03:32 +01:00
Guillaume Outters
10b2172f01 phpdbg config.m4: make it detectable by old shells
--enable-phpdbg is not detected on old systems (e.g.: stock FreeBSD 8), due to a PHPism in config.m4 (use of == operator).
Replacing == with the historic = makes it pass.
2016-01-29 17:01:04 +01:00
Remi Collet
e846801c79 Merge branch 'PHP-7.0'
* PHP-7.0:
  NEWS
  NEWS
  Fixed Bug #62172 FPM not working with Apache httpd 2.4 balancer/fcgi setup
2016-01-29 10:24:58 +01:00
Remi Collet
c0802af52c Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  NEWS
  Fixed Bug #62172 FPM not working with Apache httpd 2.4 balancer/fcgi setup
2016-01-29 10:24:15 +01:00
Remi Collet
07d2dcdf09 Fixed Bug #62172 FPM not working with Apache httpd 2.4 balancer/fcgi setup
Only needed with Apache version < 2.4.12 (ex RHEL-7)
2016-01-29 10:20:42 +01:00
Bob Weinand
cc9445ce68 Merge branch 'PHP-7.0' 2016-01-23 18:17:18 +01:00
Bob Weinand
65ef7f8c33 Use uint64_t for flags (warning) 2016-01-23 18:16:57 +01:00
Nikita Popov
af255c67eb Make op1/op2 decoding in phpdbg more complete 2016-01-21 21:58:23 +01:00
Anatol Belski
60d98605ca reorder comments 2016-01-19 09:04:52 +01:00
Anatol Belski
03263fded1 get rid of win32_ prefix 2016-01-19 09:02:12 +01:00
Anatol Belski
fb1f4769b9 check return values and cleanup the job object on exit 2016-01-19 08:57:58 +01:00
Anatol Belski
8e60e0c927 trap also children exits on shutdown to avoid unhandled exceptions 2016-01-18 20:52:17 +01:00
Anatol Belski
5af056a662 Merge branch 'PHP-7.0'
* PHP-7.0:
  fork test
  fix test
  fork test
  fork test for win32
  fork test
2016-01-18 17:02:58 +01:00
Anatol Belski
71dbad172f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fork test
  fix test
  fork test
  fork test for win32
  fork test
2016-01-18 17:02:23 +01:00
Anatol Belski
5673ede6e9 fix test 2016-01-18 16:52:48 +01:00
Anatol Belski
91545ce3a2 add WinEditLine support for CLI 2016-01-15 12:45:57 +01:00
Xinchen Hui
da658f28bb Merge branch 'patch' of https://github.com/jakkdu/php-src
* 'patch' of https://github.com/jakkdu/php-src:
  phpdbg: fix potential format string bug
2016-01-14 11:51:53 +08:00
Anatol Belski
092a87c9d8 implement FCGI children automatic restart and cleanup 2016-01-13 21:32:38 +01:00
Anatol Belski
5b91658365 Basic implementation for FCGI to respect PHP_FCGI_CHILDREN on Windows
PHP_FCGI_CHILDREN number of children processes will be spawned, sharing
same TCP socket. To implement yet

- children cleanup on exit
- automatic children re-spawning
2016-01-13 21:32:36 +01:00
Insu Yun
35d5cd5c6e phpdbg: fix potential format string bug 2016-01-12 04:21:57 +00:00
Anatol Belski
765c5ca745 Merge branch 'PHP-7.0'
* PHP-7.0:
  update NEWS
  update NEWS
  Simplify code per Anatol.
  Insert bug number.
  Use strtoll() when apr_off_t is 64 bits.
2016-01-11 21:45:42 +01:00
Anatol Belski
ce568f98bf Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Simplify code per Anatol.
  Insert bug number.
  Use strtoll() when apr_off_t is 64 bits.
2016-01-11 21:39:31 +01:00
Adam Harvey
f301a0b23c Simplify code per Anatol. 2016-01-11 21:36:55 +01:00
Adam Harvey
3217c033a5 Insert bug number. 2016-01-11 21:36:53 +01:00
Adam Harvey
c895dc5b5b Use strtoll() when apr_off_t is 64 bits. 2016-01-11 21:36:51 +01:00
Mickaël
b0780d3f41 fpm: call zend_signal_init() in child
This addresses bug #71269.

When an fpm child handles more than one request, zend_signal_startup() will
override the saved signal handlers with the internal zend handlers set from the
previous request, causing a SIGQUIT signal to result in a core dump rather than
gracefully exiting (the expected behaviour).

This is fixed by adding a call to zend_signal_init() after setting the
signal handlers in the child. The same technique is used in the apache SAPI
module in commit fd5a756ad4 which addresses
bug #61083.
2016-01-09 04:54:02 +01:00
Anatol Belski
ea130bfd59 Merge branch 'PHP-7.0'
* PHP-7.0:
  Update NEWS
  add NEWS entries for 7.0.2
  re-apply the patch from 1785d2b805
  Improve fix for bug #70976
  Fix bug #70976: fix boundary check on gdImageRotateInterpolated
  Fixed bug #70755: fpm_log.c memory leak and buffer overflow
  fix merge mistake
  Fixed #70728
  Fixed bug #70661 (Use After Free Vulnerability in WDDX Packet Deserialization)
  Improve fix for bug #70976
  Fixed bug #70661 (Use After Free Vulnerability in WDDX Packet Deserialization)
  Fixed bug #70741: Session WDDX Packet Deserialization Type Confusion Vulnerability
  Fixed #70728
  Fixed bug #70755: fpm_log.c memory leak and buffer overflow
  Fix bug #70976: fix boundary check on gdImageRotateInterpolated
  typofix
2016-01-06 06:10:39 +01:00
Anatol Belski
c0928be7f8 Merge remote-tracking branch 'phpsec/PHP-7.0' into PHP-7.0
* phpsec/PHP-7.0:
  add NEWS entries for 7.0.2
  re-apply the patch from 1785d2b805
  Improve fix for bug #70976
  Fix bug #70976: fix boundary check on gdImageRotateInterpolated
  Fixed bug #70755: fpm_log.c memory leak and buffer overflow
  fix merge mistake
  Fixed #70728
  Fixed bug #70661 (Use After Free Vulnerability in WDDX Packet Deserialization)
2016-01-06 06:09:12 +01:00
Stanislav Malyshev
13750cb0a1 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Update NEWS
  Improve fix for bug #70976
  Fixed bug #70661 (Use After Free Vulnerability in WDDX Packet Deserialization)
  Fixed bug #70741: Session WDDX Packet Deserialization Type Confusion Vulnerability
  Fixed #70728
  Fixed bug #70755: fpm_log.c memory leak and buffer overflow
  Fix bug #70976: fix boundary check on gdImageRotateInterpolated
  typofix
2016-01-05 19:38:29 -08:00
George Wang
69112d7e97 Fixed runtime php.ini override, ini name length is off by 1.
(cherry picked from commit 5bcb7a7019)
2016-01-05 23:48:42 +02:00
Julien Pauli
928d2cb3a4 Merge branch 'PHP-7.0'
* PHP-7.0:
  Happy new year (Update copyright to 2016)
2016-01-04 18:14:08 +01:00
Julien Pauli
736b91c650 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)

Conflicts:
	ext/json/php_json_encoder.h
	sapi/continuity/capi.c
2016-01-04 18:13:38 +01:00
Stanislav Malyshev
2eaa755660 Fixed bug #70755: fpm_log.c memory leak and buffer overflow 2016-01-04 17:36:42 +01:00
Lior Kaplan
53fb2f1e5c Happy new year (Update copyright to 2016) 2016-01-03 01:44:37 +02:00
Lior Kaplan
3d5438bf7b Merge branch 'PHP-7.0'
* PHP-7.0:
  Update header to PHP Version 7
  Happy new year (Update copyright to 2016)
  Happy new year (Update copyright to 2016)
2016-01-01 20:04:31 +02:00
Lior Kaplan
2eb1f38d24 Happy new year (Update copyright to 2016) 2016-01-01 20:03:16 +02:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Xinchen Hui
41dcdb1d73 Merge branch 'PHP-7.0' 2016-01-01 13:46:44 +08:00
Xinchen Hui
05defb4f56 Fixed test after fix lineno of finally 2016-01-01 13:46:19 +08:00
Julien Pauli
ea12ff149c Added support for HTTP 451 2015-12-23 11:31:18 +01:00
George Wang
21eaa5a47d Merge branch 'master' of git.php.net:php-src 2015-12-17 15:25:39 -05:00
George Wang
70addd33d0 Fixed a bug in apache_request_headers() that adds an extra \0 to header name. 2015-12-17 15:24:59 -05:00
George Wang
0a1a4dc033 Fixed a bug in apache_request_headers() that adds an extra \0 to header name. 2015-12-17 15:20:08 -05:00
Bob Weinand
817ed01320 Merge PR #1638 (Fix naming of global section in fpm_conf_dump()) 2015-12-16 16:46:17 +01:00
Reeze Xia
bdadec4581 Merge branch 'PHP-7.0'
* PHP-7.0:
  Unused value casting should be `void`
2015-12-12 23:29:46 +08:00
Reeze Xia
95ad414658 Unused value casting should be void 2015-12-12 23:25:30 +08:00
Xinchen Hui
f43baba1f9 Fixed test by disable opcache 2015-12-10 21:46:37 +08:00
Xinchen Hui
e80791e161 Fixed test (opcache denpends) 2015-12-09 07:52:03 -08:00
George Wang
6d933b463e Bumped SAPI version to 6.9 2015-12-09 11:37:46 +01:00
George Wang
b3458eddfd Added "mod_auth_basic" to apache module list. 2015-12-09 11:37:45 +01:00
George Wang
5a319a02d8 Add sanitizing checks for request data. 2015-12-09 11:37:43 +01:00
George Wang
af1ac753fe Clear secret after use. 2015-12-09 11:37:42 +01:00
George Wang
42789e2b8a Fixed __DIR__ in CLI mode. 2015-12-09 11:37:40 +01:00