Commit Graph

4985 Commits

Author SHA1 Message Date
Anatol Belski
12bfd9a5f5 Implement FR #77377 handle CTRL+C in Windows 2019-02-08 18:10:31 -08:00
Peter Kokot
c245898bfa Update and fix remaining year ranges (2019)
This patch follows previous license year ranges updates. With new
approach source code files now have simplified headers with license
information without year ranges.
2019-02-08 23:14:29 +01:00
Peter Kokot
92ac598aab Remove local variables
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files.  All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
2019-02-03 21:03:00 +01:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
George Wang
276d3a7d15 Merge branch 'PHP-7.3' 2019-01-20 15:11:58 -05:00
George Wang
6a0a600176 Merge branch 'PHP-7.2' into PHP-7.3 2019-01-20 15:11:37 -05:00
George Wang
66d72377d0 Checkin LiteSpeed SAPI 7.2. 2019-01-20 15:10:19 -05:00
Jakub Zelenka
4f7b6fc8ec Merge branch 'PHP-7.3' 2019-01-17 18:38:59 +00:00
Jakub Zelenka
766b4fd515 Fix bug #77430 (php-fpm crashes with Main process exited) 2019-01-17 18:37:09 +00:00
Nikita Popov
d0fd2be642 Revert removal of private __clone() methods
I thought these were redundant, because we already NULL out the
clone_obj object handler. However, it turns out that reflection is
using private __clone() to determine clonability (isCloneable) for
the case where we only have a class, rather than an object.

As such, removing these methods would be a BC break.

This reverts commit e7131a4e9f.
This reverts commit 55bd88ce0d.
2019-01-14 09:19:30 +01:00
Dmitry Stogov
cec091176c Replace zend_hash_apply... with ZEND_HASH_FOREACH... 2018-12-19 02:49:56 +03:00
Craig Andrews
40c4d7f182 Implement FR #72510: systemd service should be hardened 2018-12-12 17:12:02 +01:00
Nikita Popov
e7131a4e9f Remove redundant Exception::__clone() method
Exceptions already prohibit cloning by setting clone_obj to NULL
(which is integrated with reflection). No need to additionally
define a dummy __clone() method.
2018-11-26 13:57:17 +01:00
Christoph M. Becker
1acac320c5 Clean up server-tests.php remains
sapi/tests/ has been introduced as a generic means to test different
SAPIs[1].  run-tests2.php has later be renamed to server-tests.php and
recently been dropped[2].  However, the sapi/tests/test00?.php test
cases remained, even though they make no sense for run-tests.php,
since they use an unsupported format for the `--ENV--` section and the
completely unsupported `--HEADERS--` section, respectively.  While
these tests ran successfully under run-tests.php, that was only by
accident, and they did not really test something useful.  Therefore, we
remove these tests altogether.

sapi/tests/bug69487.phpt is actually a CGI test (CGI is enforced due to
the `--POST--` section), so we move it to sapi/cgi/tests, which leaves
sapi/tests/ empty.  Thus, we also remove the sapi/ directory from
run-tests.php.

Finally, we remove the `--HEADERS--` and `--REQUEST--` sections from
the list of allowed run-tests.php sections.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=b671380b6b5b6e1f4f235e810afa4199e989d2ba>
[2] <http://git.php.net/?p=php-src.git;a=commit;h=4f36acb9e65935aa657f1f22e2320a401bdbdad3>
2018-11-23 16:24:51 +01:00
Anatol Belski
b0cf54c5b8 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fixed bug #77111 php-win.exe corrupts unicode symbols from cli parameters
2018-11-16 23:23:00 +01:00
Anatol Belski
00c08a2e4a Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #77111 php-win.exe corrupts unicode symbols from cli parameters
2018-11-16 23:22:19 +01:00
Anatol Belski
a7e9790969 Fixed bug #77111 php-win.exe corrupts unicode symbols from cli parameters
The binary can be of course used on console, for whatever reasons, so
UNICODE API should be used in that case. That might however not work as
expected, if the binary is used for a service.
2018-11-16 23:19:33 +01:00
Peter Kokot
f0251a8b16 Remove lexer files generated by RE2C
This patch removes generated lexer files by re2c during the build
process so they are not tracked by Git yet can be still shipped when
PHP is released. The genfiles script additionally provides generation
of these lexer files when creating a release of the PHP source code.

The genfiles script refactorings:
- added file header
- echoing steps instead of comments
- cleaning only lines starting with `#line`
- eval removed in favor of direct executed commands
- the debug mode `set -x` removed
- script can be called from any path
- improved comments
2018-11-11 02:55:46 +01:00
Zeev Suraski
9afce019e0 Future-proof email addresses 2018-11-01 18:35:32 +02:00
Zeev Suraski
67e0138c0d Future-proof email addresses... 2018-11-01 18:30:28 +02:00
Rasmus Lerdorf
b91690c892 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix stray newline that caused this test to fail
2018-10-31 11:41:42 -07:00
Rasmus Lerdorf
99a9e85c65 Fix stray newline that caused this test to fail 2018-10-31 11:41:17 -07:00
Dmitry Stogov
ea2e67876a Stop Apache if PHP wasn't started successful. 2018-10-29 21:39:26 +03:00
Dmitry Stogov
10abc1f010 Don't wrap php_module_shutdown() with zend_try. executor_globals are released in ZTS build, and this leads to crash. 2018-10-25 23:41:26 +03:00
Dmitry Stogov
a404383118 Fixed build in directory different from source 2018-10-24 12:45:04 +03:00
Peter Kokot
c0446d55a2 Remove phpdbg parser files generated by bison
The parser files for phpdbg are generated by bison from the *.y file.
Parser files in Zend already follows such approach of these files being
ignored from tracking in the Git repository and they are shipped via
the release packages. This way the end user still don't need to have
bison dependency installed to install PHP.

The genfiles script was refactored to generate the phpdbg parser and lexer
files.

Empty comment in phpdbg parser y template file has been changed to the
YACC compliant /* empty */ instead of custom one.
2018-10-23 19:04:13 +02:00
Nikita Popov
1362d8e103 Fix conflicts in phpdbg parser 2018-10-23 16:22:16 +02:00
Jakub Zelenka
751dfc7514 Merge branch 'PHP-7.3' 2018-10-21 19:40:53 +01:00
Jakub Zelenka
c8febbe039 Fix arginfo and clean up fpm_get_status 2018-10-21 19:39:47 +01:00
Peter Kokot
d679f02295 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:33:09 +02: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
d7a3edd45d Trim trailing whitespace in *.phpt 2018-10-14 19:46:15 +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
Gabriel Caruso
9c144e0d82
Trim trailing whitespace in tests 2018-10-14 12:07:20 -03:00
Peter Kokot
1ad08256f3 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:56:38 +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
37c329d715 Trim trailing whitespace in source code files 2018-10-13 14:17:28 +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
Nikita Popov
7ec8087f80 Introduce get_properties_for() handler
This handler allows getting the object properties for a particular
purpose, such as array casting, serialization, etc.
2018-10-10 10:39:10 +02:00
Christoph M. Becker
c266a19094 Merge branch 'PHP-7.3'
* PHP-7.3:
  Fix #76954: apache_response_headers removes last character from header name
2018-10-08 12:33:32 +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
1c11fc7f13 Merge branch 'PHP-7.3'
* PHP-7.3:
  Avoid code duplication and don't miss env restore
2018-10-03 14:36:09 +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
3ad2ab6e7d Merge branch 'PHP-7.3'
* PHP-7.3:
  Fixed bug #76948 Failed shutdown/reboot or end session in Windows
2018-10-03 12:15:54 +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
Peter Kokot
a3760badbe Bump phpdbg version to PHP_VERSION
The phpdbg sapi module is distributed with the release cycle of PHP.
This patch simplifes phpdbg versioning and bumps it to the PHP_VERSION.
2018-10-01 13:01:58 +02:00
Nikita Popov
eab939e1e3 Merge branch 'PHP-7.3' 2018-09-30 20:08:10 +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
Peter Kokot
a1b5698d4e Remove HAVE_TIME_H
The `<time.h>` header file is part of the standard C89 headers [1] and
on current systems can be included unconditionally.

Since PHP requires at least C89 or greater, the `HAVE_TIME_H` symbol
defined by Autoconf in ext/pdo_sqlite/config.m4 [2] can be ommitted and
simplifed.

Additionally, since PHP didn't define `HAVE_TIME_H` prior in the
configure.ac the occurrence of this symbol in cli can be removed.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2018-09-21 14:10:30 +02:00
Anatol Belski
321c0cc349 Fix localized error messages and memory leaks
The FormatMessage API needs to LocalFree the delivered error messages.
In cases where messages are delivered in non ASCII compatible encoding,
the messages might be unreadable. This aligns the error message encoding
with the encoding settings in PHP, the focus is UTF-8 as default.

Initialize error buffer

Avoid code duplication
2018-09-17 10:56:50 +02:00
Peter Kokot
ba3bd4ae06 Remove HAVE_STDIO_H
The `<stdio.h>` header file is part of the standard C89 headers [1]
and on current systems can be included unconditionally.

Since PHP requires at least C89 or greater, the `HAVE_STDIO_H` symbol
defined by Autoconf [2] can be ommitted and simplifed.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2018-09-17 02:00:51 +02:00
Peter Kokot
7dd62811ce Remove HAVE_STDLIB_H
The C89 and later standard defines the `<stdlib.h>` header as part of
the standard headers [1] and on current systems it is always present
and the `HAVE_STDLIB_H` symbol can be removed.

Also Autoconf suggests doing this and relying on C89 or above [2] and [3].

[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] http://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
[3] https://www.gnu.org/software/autoconf/manual/autoconf-2.69/autoconf.html
2018-09-16 20:53:53 +02:00
Stanislav Malyshev
1e550e6f7e Merge branch 'PHP-7.3'
* PHP-7.3:
  Update NEWS
  Fix for bug #76582
2018-09-09 12:29:41 -07: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
Peter Kokot
50b9ef8d94 Remove not needed checking for <errno.h>
Header `<errno.h>` is part of the standard C89 headers [1] and on
current systems checking is not need anymore since PHP requires at
least C89. This is noted also by Autoconf itself in the docs and
code [2].

The Autoconf check defined the `HAVE_ERRNO_H` symbol when building PHP
with sockets extension or fpm sapi. This symbol is not utilized across
the PHP source code except in the current version of bundled GD library
which has worked ok so far also with sockets extension or fpm sapi
disabled anyway.

Refs:
[1] https://port70.net/~nsz/c/c89/c89-draft.html#4.1.2
[2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4
2018-09-09 10:19:04 +02:00
Peter Kokot
02294f0c84 Make PHP development tools files and scripts executable
This patch makes several scripts and PHP development tools files
executable and adds more proper shebangs to the PHP scripts.

The `#!/usr/bin/env php` shebang provides running the script via
`./script.php` and uses env to find PHP script location on the system.
At the same time it still provides running the script with a user
defined PHP location using `php script.php`.
2018-08-29 20:58:17 +02:00
Gabriel Caruso
2f7003847d
Make more tests run on Linux 2018-08-28 21:20:00 -03:00
Jakub Zelenka
39edd38851 Merge branch 'PHP-7.3' 2018-08-27 15:53:13 +01: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
Dmitry Stogov
b36dbdd1dd Perform "early-binding" directly during compilation 2018-08-24 15:18:38 +03:00
Dmitry Stogov
d140df58e6 Keep information about unresolved interfaces in zend_class_entry->interface_names.
Move interface implementation code into ZEND_DECLARE_*CLASS opcodes.
Remove ZEND_ADD_INTERFACE and ZEND_VERIFY_ABSTRACT_CLASS opcodes.
2018-08-23 17:16:28 +03:00
Dmitry Stogov
67397970b2 Replace zend_class_entry->traits by persistent zend_class_entry->trait_names.
Move trait binding code into ZEND_DECLARE_*CLASS opcodes.
Remove ZEND_ADD_TRIAIT and ZEND_BIND_TRAITS opcodes.
2018-08-23 02:02:26 +03:00
Dmitry Stogov
92fdf9d629 Change zend_lookup_class_ex() and zend_fetch_class_by_name() prototypes to accept optional lower-case class name as zend_string*, instead of zval*. 2018-08-22 17:07:31 +03:00
Remi Collet
70695cfd60 Merge branch 'PHP-7.3'
* PHP-7.3:
  fix man page installation
2018-08-16 06:55:30 +02: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
Gabriel Caruso
84b195d9fc Fix some misspellings 2018-08-12 16:15:45 +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