Commit Graph

4881 Commits

Author SHA1 Message Date
Jakub Zelenka
c8febbe039 Fix arginfo and clean up fpm_get_status 2018-10-21 19:39:47 +01:00
Peter Kokot
b746e69887 Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:32:30 +02:00
Peter Kokot
f1d7e3ca0b Sync leading and final newlines in *.phpt sections
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines in all
*.phpt sections.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-15 04:31:31 +02:00
Peter Kokot
782352c54a Trim trailing whitespace in *.phpt 2018-10-14 19:45:12 +02:00
Peter Kokot
17ccbeec32 Trim trailing whitespace in *.phpt 2018-10-14 19:44:14 +02:00
Peter Kokot
1c850bfcca Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:55:24 +02:00
Peter Kokot
60a69daec6 Sync leading and final newlines in source code files
This patch adds missing newlines, trims multiple redundant final
newlines into a single one, and trims redundant leading newlines.

According to POSIX, a line is a sequence of zero or more non-' <newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-14 12:54:08 +02:00
Peter Kokot
3362620b5f Trim trailing whitespace in source code files 2018-10-13 14:16:33 +02:00
Peter Kokot
902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Christoph M. Becker
6178786233 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #76954: apache_response_headers removes last character from header name
2018-10-08 12:32:52 +02:00
Christoph M. Becker
879c937a27 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #76954: apache_response_headers removes last character from header name
2018-10-08 12:30:45 +02:00
stodorovic
47b89bc531 Fix #76954: apache_response_headers removes last character from header name 2018-10-08 12:29:31 +02:00
Anatol Belski
8400f73f8d Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Avoid code duplication and don't miss env restore
2018-10-03 14:35:38 +02:00
Anatol Belski
b8cfa09657 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Avoid code duplication and don't miss env restore
2018-10-03 14:34:08 +02:00
Anatol Belski
044eb39e63 Avoid code duplication and don't miss env restore 2018-10-03 14:32:52 +02:00
Anatol Belski
46bc0940e7 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #76948 Failed shutdown/reboot or end session in Windows
2018-10-03 12:15:15 +02:00
Anatol Belski
dc48e01a19 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76948 Failed shutdown/reboot or end session in Windows
2018-10-03 12:13:22 +02:00
Anatol Belski
b0547a3dfb Fixed bug #76948 Failed shutdown/reboot or end session in Windows 2018-10-03 12:11:43 +02:00
Nikita Popov
d7e96c1b95 Merge branch 'PHP-7.2' into PHP-7.3 2018-09-30 20:07:58 +02:00
Nikita Popov
56d1578515 Merge branch 'PHP-7.1' into PHP-7.2 2018-09-30 20:07:44 +02:00
Nikita Popov
db80e0e2ad Fixed bug #75479
Wrap the zend_signal_init() call, so the hook arguments line up.
2018-09-30 20:07:15 +02:00
Stanislav Malyshev
af38a991ff Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Update NEWS
  Fix for bug #76582
2018-09-09 12:29:34 -07:00
Stanislav Malyshev
788717d56d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fix for bug #76582
2018-09-09 12:29:29 -07:00
Stanislav Malyshev
6623f3caca Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Update NEWS
  Fix for bug #76582
2018-09-09 12:29:23 -07:00
Stanislav Malyshev
024f3ac160 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Update NEWS
  Fix for bug #76582
2018-09-09 12:27:44 -07:00
Stanislav Malyshev
23b057742e Fix for bug #76582
The brigade seems to end up in a messed up state if something fails
in shutdown, so we clean it up.
2018-09-09 11:45:14 -07:00
Jakub Zelenka
014b1b3aad Store zlog stream in each child so it can be reused
This change results in using the same buffer for multiple
stdio events which should fix inconsistencies of handling
messages that are not ended with a new line and possibly
very long messages that are split to multiple events.
2018-08-27 14:58:39 +01:00
Remi Collet
32477dea70 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  fix man page installation
2018-08-16 06:55:14 +02:00
Remi Collet
2cdde35d0f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix man page installation
2018-08-16 06:54:57 +02:00
Remi Collet
1f2f2c6b96 fix man page installation
Since 91996e7ee5
phpdbg.1 is in buildir, not in srcdir
2018-08-16 06:53:56 +02:00
David Carlier
9b462f332e fpm process name, FreeBSD 12.x using new setproctitle_fast 2018-08-05 20:36:41 +01:00
Jakub Zelenka
86d472e249 Use php_openlog instead of openlog in FPM
Fix incorrect port in the previous commit
2018-08-05 20:35:58 +01:00
Jakub Zelenka
f9d9c5ebd9 Fix FPM logging when log pipe is closed 2018-08-05 20:35:40 +01:00
Peter Kokot
0f57a7f259 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix bug 76595: Update phpdbg man page
2018-08-04 06:37:15 +02:00
Peter Kokot
9286681bac Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug 76595: Update phpdbg man page
2018-08-04 06:35:40 +02:00
Kevin Abel
91996e7ee5 Fix bug 76595: Update phpdbg man page
Send phpdbg.1 man page through configure replacements
Update phpdbg.1 man page to include all options
Fixes formatting to be more consistent with php.1
Fix paragraph whitespace and ignore phpdbg.1
2018-08-04 06:34:40 +02:00
Peter Kokot
f2e4de8b56 Fix AC_RUN_IFELSE calls when cross-compiling
AC_RUN_IFELSE program can't be run when cross-compiling. This fix removes
warnings given by autotools scripts.
2018-07-30 06:38:59 +02:00
Peter Kokot
4371945b8b Replace obsolete AC_TRY_FOO with AC_FOO_IFELSE
Autoconf 2.50 released in 2001 made several macros obsolete including
the AC_TRY_RUN, AC_TRY_COMPILE and AC_TRY_LINK:
http://git.savannah.gnu.org/cgit/autoconf.git/tree/ChangeLog.2

These macros should be replaced with the current AC_FOO_IFELSE instead:
- AC_TRY_RUN with AC_RUN_IFELSE and AC_LANG_SOURCE
- AC_TRY_LINK with AC_LINK_IFELSE and AC_LANG_PROGRAM
- AC_TRY_COMPILE with AC_COMPILE_IFELSE and AC_LANG_PROGRAM

PHP 5.4 to 7.1 require Autoconf 2.59+ version, PHP 7.2 and above require
2.64+ version, and the PHP 7.2 phpize script requires 2.59+ version which
are all greater than above mentioned 2.50 version therefore systems
should be well supported by now.

This patch was created with the help of autoupdate script:
autoupdate <file>

Reference docs:
- https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html
- https://www.gnu.org/software/autoconf/manual/autoconf-2.59/autoconf.pdf
2018-07-30 02:36:38 +02:00
Peter Kokot
03b717d4cc Remove unused PHP_PROG_LEX macro
Since PHP 5.3 flex lexer has been replaced with re2c. Commit
0f9e2b1753 made PHP_PROG_LEX macro still
available for BC.

In commit df6bd506d4 it was updated. Since
this macro is entirely not used in PHP source code anymore from PHP 5.3
and up, this patch removes it together with some old traces of warnings
suppression and comments.
2018-07-29 10:53:21 +02:00
Peter Kokot
cf3b852109 Trim trailing whitespaces in build files
Some editors utilizing .editorconfig automatically trim whitespaces. For
convenience this patch removes whitespaces in certain build files:
- ext/*/config*.m4
- configure.ac
- acinclude.m4
2018-07-29 03:43:45 +02:00
Dmitry Stogov
ab8094c666 Pack zend_constant.flags and zend_constant.module_number into reserved space inside zend_constant.value. 2018-07-26 12:58:07 +03:00
Dmitry Stogov
a29a800cb0 Regenerate scanners using re2c version >= 1.0.0 (newer version, at least, produce less code) 2018-07-25 12:49:03 +03:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Kalle Sommer Nielsen
08f10ef47a Remove some dead code
sapi/*: Remove Windows code from FPM and LiteSpeed, as we don't support these SAPIs on Windows anyway
ext/com_dotnet: Remove non Windows code, as ext/com_dotnet is only supported on Windows
2018-07-23 15:26:39 +02:00
Dmitry Stogov
ebd1f5af3e API cleanup.
Removed useless filename and lineno arguments, used in DEBUG build.
The patch doesn't break source compatibility of public API (only binary compatibility).
2018-07-23 15:24:07 +03:00
Jakub Zelenka
26cd84d19f Return bool from zlog_stream_set_msg_{prefix,suffix} 2018-07-22 17:40:38 +01:00
Nikita Popov
ee561ff2a2 Fix off-by-one allocation
The return value of this function is pretty meaningless, but
leaving it alone for now.
2018-07-20 17:52:56 +02:00
Nikita Popov
6e2c54d3e7 Fix incorrect length calculation
sizeof char pointer != sizeof string literal.
2018-07-20 17:47:53 +02:00
Gabriel Caruso
6ac48425a8
Removed and fixed unused variables 2018-07-19 22:51:37 -03:00
Dmitry Stogov
ad2719cf9c Fixed test 2018-07-09 12:49:19 +03:00
Jakub Zelenka
3e5afbf0a8 Refactore FPM logging 2018-07-07 13:01:44 +01:00
Jakub Zelenka
f86f3edeef Migrate fpm_get_status test 2018-07-07 12:48:16 +01:00
Till Backhaus
140def4ac7 Implement fpm_get_status 2018-07-07 12:33:11 +01:00
Yousif Masoud
9a21aa77af fixes typo in daemonization DEBUG message after fork: acknoledge -> acknowledge 2018-07-06 11:25:08 +02:00
Dmitry Stogov
169d454593 Use zval_ptr_dtor() imstead of zval_dtor() 2018-07-05 17:55:54 +03:00
Dmitry Stogov
b6fb584505 Replace zval_dtor() with specialized destructors 2018-07-05 13:32:39 +03:00
Remi Collet
0ea4013f10 Fixed bug #62596 add getallheaders (apache_request_headers) missing function in FPM add sapi_add_request_header in public API (was add_request_header) fix arginfo for fastcgi_finish_request fucntion 2018-07-05 06:30:58 +02:00
Dmitry Stogov
4a475a4976 Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Dmitry Stogov
091d77f28a Avoid magic method hash lookups 2018-07-02 17:03:50 +03:00
Philip Prindeville
2475337bd8 Add syslog's ident and facility parameters to config
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2018-07-01 18:08:07 +01:00
Dmitry Stogov
dd932f7e63 Changed php_add[c]slashes prototypes (removed should_free argument) 2018-06-29 00:19:16 +03:00
Dmitry Stogov
716bbd3480 Remove duplicated code (keep destroy_zend_function() for compatibility) 2018-06-27 14:54:42 +03:00
Christoph M. Becker
0778359223 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix arginfo wrt. optional/required parameters
2018-06-25 11:57:25 +02:00
Christoph M. Becker
2458dab466 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix arginfo wrt. optional/required parameters
2018-06-25 11:54:45 +02:00
Christoph M. Becker
6b5597f7d8 Fix arginfo wrt. optional/required parameters
All parameters of phpdbg_color(), phpdbg_exec() and phpdbg_prompt() are
required.  We mark them as such.
2018-06-25 11:52:17 +02:00
Christoph M. Becker
d169d06d30 Remove useless PHPDBG_* constants
The sole purpose of `PHPDBG_FILE`, `PHPDBG_METHOD`, `PHPDBG_LINENO` and
`PHPDBG_FUNC` has been to be passed as first argument to `phpdbg_break`.
However, this functions is replaced as of PHP 5.6.3 by
`phpdbg_break_file`, `phpdbg_break_method` and 'phpdbg_break_func`,
respectively.  Therefore, we're finally removing the useless constants.
2018-06-25 11:42:54 +02:00
Nikita Popov
8e2f0824f7 Merge branch 'PHP-7.2' 2018-06-20 12:32:20 +02:00
Nikita Popov
44f4d2be01 Merge branch 'PHP-7.1' into PHP-7.2 2018-06-20 12:30:19 +02:00
Nikita Popov
69dee5c732 Fixed bug #73342
Directly listen on socket, instead of duping it to STDIN and
listening on that.
2018-06-20 12:28:15 +02:00
Stanislav Malyshev
3346659f2a Merge branch 'pull-request/3274'
* pull-request/3274:
  Added const modifier
  76363: added jsm extension to list of mime types
2018-06-19 16:50:16 -07:00
Robert Lu
ecc1a7c582 Fix bug #44217: Output after stdout/stderr closed cause immediate exit with status 0
We exit with status 255 instead.
2018-06-19 12:15:33 +02:00
Peter Kokot
be49d61b19 Remove old SVN keywords substitutions
When the PHP source code was versioned in Subversion, there was
possible to substitute certain keywords such as $Id$ with revision
number, last change time and author name. Such approach is not used
in Git so this patch removes these outdated artifacts from source
code files.
2018-06-16 13:04:30 +02:00
Jakub Zelenka
1650e4669d Merge branch 'PHP-7.2' 2018-06-12 18:11:20 +01:00
Jakub Zelenka
dd622f9ca9 Port FPM test 023 and 024 to the new FPM testing 2018-06-12 18:09:27 +01:00
Jakub Zelenka
b2460c9ec2 Merge branch 'PHP-7.2' 2018-06-12 18:04:30 +01:00
Jakub Zelenka
bc58ba750f Merge branch 'PHP-7.1' into PHP-7.2 2018-06-12 18:03:01 +01:00
Jakub Zelenka
ea592e6b6c Rewrite FPM tests 2018-06-12 17:59:28 +01:00
pmukhin
57e72dc198 Added const modifier 2018-06-06 21:34:18 +07:00
pmukhin
48c954ca46 76363: added jsm extension to list of mime types 2018-06-06 21:04:42 +07:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Anatol Belski
a551d75942 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix cli server test fails after recent AppVeyor image update
2018-05-18 13:41:14 +02:00
Anatol Belski
a8422edced Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix cli server test fails after recent AppVeyor image update
2018-05-18 13:40:42 +02:00
Anatol Belski
ee0ca6470d Fix cli server test fails after recent AppVeyor image update 2018-05-18 13:38:53 +02:00
Anatol Belski
038a2e4756 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #76333 PHP built-in server does not find files if root path contains special characters
2018-05-13 18:43:12 +02:00
Anatol Belski
398204ace9 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76333 PHP built-in server does not find files if root path contains special characters
2018-05-13 18:42:36 +02:00
Anatol Belski
ad787626a4 Fixed bug #76333 PHP built-in server does not find files if root path contains special characters 2018-05-13 18:40:32 +02:00
Thomas Punt
31914a827e Merge branch 'PHP-7.2'
* PHP-7.2:
  Allocate default ini values into persistent memory
2018-04-26 21:09:34 +01:00
Thomas Punt
972c4869a7 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Allocate default ini values into persistent memory
2018-04-26 21:09:08 +01:00
Thomas Punt
2513da4b4c Allocate default ini values into persistent memory 2018-04-26 21:08:19 +01:00
Thomas Punt
d08f1c5f5b Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix memory leak when phpdbg fails to start up
2018-04-26 16:44:02 +01:00
Thomas Punt
b3fff5fc41 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix memory leak when phpdbg fails to start up
2018-04-26 16:42:21 +01:00
Thomas Punt
435e812c09 Fix memory leak when phpdbg fails to start up 2018-04-26 16:39:52 +01:00
Mark Seuffert
193c02875a No Content-Type header if MIME type is unknown 2018-04-14 13:08:53 +02:00
Jakub Zelenka
b7b65fbc7b Merge branch 'PHP-7.2' 2018-04-13 20:13:18 +01:00
Jakub Zelenka
4302c0b542 Merge branch 'PHP-7.1' into PHP-7.2 2018-04-13 20:12:03 +01:00
Michał Górny
4ea7f3467d Support using acl_* functions on *BSD
The *BSD systems have ACL routines built-in in libc rather than
in separate libacl. Update the configure check to detect that and enable
ACL support without adding 'acl' library.
2018-04-13 19:48:13 +01:00
George Wang
6e8cce08f9 Merge branch 'PHP-7.2' 2018-04-10 16:57:49 -04:00
George Wang
043ac320a0 Merge branch 'PHP-7.1' into PHP-7.2 2018-04-10 16:49:29 -04:00
George Wang
5b529bbc94 Updated LiteSpeed SAPI to 7.1 . 2018-04-10 16:48:04 -04:00
Xinchen Hui
085999c16c Merge branch 'PHP-7.2'
* PHP-7.2:
  Update NEWS
  Fixed bug #76143 (Memory corruption: arbitrary NUL overwrite)
2018-04-10 16:33:51 +08:00