Commit Graph

5117 Commits

Author SHA1 Message Date
Dmitry Stogov
25d4af9413 Fixed ZTS cache usage 2019-03-12 15:13:52 +03:00
Dmitry Stogov
2b6cbcae06 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed ZTS cache usage
2019-03-12 15:06:11 +03:00
Dmitry Stogov
b0d76ed4ad Fixed ZTS cache usage 2019-03-12 15:05:56 +03:00
Nikita Popov
36f875e78e Merge branch 'PHP-7.4' 2019-03-12 09:58:38 +01:00
Nikita Popov
5b778e852e Merge branch 'PHP-7.3' into PHP-7.4 2019-03-12 09:58:29 +01:00
Nikita Popov
a7739be22f Fixed bug #77722 2019-03-12 09:58:09 +01:00
Remi Collet
f9f422659c Merge branch 'PHP-7.4'
* PHP-7.4:
  add --enable-rtld-now in upgrade info
  use DL_LOAD in litespeed
  add --enable-rtld-now build option to change dlopen behavior
2019-03-12 08:26:36 +01:00
Remi Collet
233888e36a use DL_LOAD in litespeed 2019-03-12 08:23:11 +01:00
Peter Kokot
d0fd9fe977 Merge branch 'PHP-7.4'
* PHP-7.4:
  Add AS_HELP_STRING to *nix build configure options
2019-03-07 20:38:04 +01:00
Peter Kokot
9df6a1e4dd Add AS_HELP_STRING to *nix build configure options
The Autoconf's default AS_HELP_STRING macro can properly format help
strings [1] so watching out if columns are aligned manually is not
anymore.

[1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
2019-03-07 20:36:59 +01:00
Peter Kokot
2968a1d7f2 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove legacy AC_CHECK_TYPE calls for uint and ulong
2019-03-06 22:50:46 +01:00
Peter Kokot
bebcdcc745 Remove legacy AC_CHECK_TYPE calls for uint and ulong
The AC_CHECK_TYPE was refactored in more recent versions of Autoconf
and the call with two arguments is obsolete and not recommended anymore.

This patch also refactors some leftovers of using ulong and uint which
are not standard nor common usages of types in C.

The ulong can be used as zend_ulong and uint usage is actually
`unsigned int`.

The usage of HAVE_ULONG removed since it is not used in current code
base.

Legacy edgecase for some legacy HPUX systems removed:
- sys/stream.h header is not checked and the HAVE_SYS_STREAM_H is
  not defined with current build system.

- flags are unsigned int
- max_allowed_packet changed to unsigned int
2019-03-06 22:49:16 +01:00
Nikita Popov
ac2bce9337 Merge branch 'PHP-7.4' 2019-03-01 14:52:09 +01:00
Nikita Popov
2e31786627 Merge branch 'PHP-7.3' into PHP-7.4 2019-03-01 14:52:02 +01:00
Nikita Popov
16cda039b5 Merge branch 'PHP-7.2' into PHP-7.3 2019-03-01 14:51:55 +01:00
Kevin Adler
006355c9fa Fix bug #77677: WCOREDUMP not available on all systems
Add #ifdef WCOREDUMP around all uses.

Also Change core dump message to yes/no/unknown in lsapilib.
2019-03-01 14:51:15 +01:00
Christoph M. Becker
a9b90fe73c Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #77648: BOM in sapi/apache2handler/php_functions.c
2019-02-22 11:11:59 +01:00
Christoph M. Becker
b6d8d9cb7e Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #77648: BOM in sapi/apache2handler/php_functions.c
2019-02-22 11:11:27 +01:00
Christoph M. Becker
831eba0eac Fix #77648: BOM in sapi/apache2handler/php_functions.c 2019-02-22 11:10:50 +01:00
Nikita Popov
c8e2b333cb Merge branch 'PHP-7.4' 2019-02-20 11:22:31 +01:00
Nikita Popov
c0e15a3b7f Implement fine-grained conflict handling
Tests can specify conflict keys, either in --CONFLICTS-- or
a per-directory CONFLICTS file. Non-conflicting tests may be run
in parallel.
2019-02-20 11:20:40 +01:00
Peter Kokot
93752ee696 Merge branch 'PHP-7.4'
* PHP-7.4:
  Rename non-existing site phpdbg.com to localhost
2019-02-19 20:22:14 +01:00
Peter Kokot
b1b392763e Rename non-existing site phpdbg.com to localhost 2019-02-19 20:21:20 +01:00
Dmitry Stogov
7a3306a265 Merge branch 'PHP-7.4'
* PHP-7.4:
  Use TSRM macros
2019-02-12 17:40:52 +03:00
Dmitry Stogov
083cfc07cc Use TSRM macros 2019-02-12 17:40:29 +03:00
Anatol Belski
08aaff35d1 Merge branch 'PHP-7.4'
* PHP-7.4:
  Implement FR #77377 handle CTRL+C in Windows
2019-02-08 18:11:34 -08:00
Anatol Belski
12bfd9a5f5 Implement FR #77377 handle CTRL+C in Windows 2019-02-08 18:10:31 -08:00
Peter Kokot
17baa87fad Merge branch 'PHP-7.4'
* PHP-7.4:
  Update and fix remaining year ranges (2019)
2019-02-08 23:15:49 +01: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
Nikita Popov
6e3600f41b Remove major version from apache module 2019-02-05 14:57:35 +01:00
Dmitry Stogov
91ef4124e5 Refactor zend_object_handlers API to pass zend_object* and zend_string* insted of zval(s). 2019-02-04 13:20:25 +03:00
Peter Kokot
623911f993 Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove local variables
2019-02-03 21:23:18 +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
Gabriel Caruso
4e0dd6b0ed Remove unnecessary CLI checks in tests 2019-01-31 00:21:32 -02:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Zeev Suraski
38c337f22e Remove year range from copyright notice 2019-01-30 11:00:23 +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
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
Xinchen Hui
474895915e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #76143 (Memory corruption: arbitrary NUL overwrite)
2018-04-10 16:32:28 +08:00
Xinchen Hui
8cfb648761 Fixed bug #76143 (Memory corruption: arbitrary NUL overwrite) 2018-04-10 16:32:08 +08:00
George Wang
005f2a4676 Merge branch 'PHP-7.2' 2018-04-03 11:48:00 -04:00
George Wang
1e1695e8de Merge branch 'PHP-7.1' into PHP-7.2 2018-04-03 11:47:41 -04:00
George Wang
37e1d7c776 [BUGFIX] allow php_admin_value to override value set in php.ini without restriction, like adding an extra directory to open_basedir. 2018-04-03 11:46:24 -04:00
Jakub Zelenka
6441b1bb31 Merge branch 'PHP-7.2' 2018-03-30 18:02:07 +01:00
Jakub Zelenka
8b642af484 Merge branch 'PHP-7.1' into PHP-7.2 2018-03-30 17:58:29 +01:00
Jakub Zelenka
0be5b9e6b0 Prevent modifying of getenv result 2018-03-30 17:20:19 +01:00
Jacob Hipps
008eb1461c 68440: ensure backwards compatibility with FPM_SOCKETS var; fix sockname size 2018-03-30 17:20:19 +01:00
Jacob Hipps
77bf9245d2 Fix bug #68440: [sapi/fpm] use multiple FPM_SOCKETS env vars to prevent hitting MAX_ARG_STRLEN with a large number of pools 2018-03-30 17:20:19 +01:00
Gabriel Caruso
a09c851ca9
Remove, or fix, unused variables 2018-03-27 22:04:26 +02:00
Anatol Belski
5e00c15b88 Merge branch 'PHP-7.2'
* PHP-7.2:
  Do not set PR_SET_DUMPABLE by default
  Do not set PR_SET_DUMPABLE by default
2018-03-27 14:21:42 +02:00
Anatol Belski
600b6277f8 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Do not set PR_SET_DUMPABLE by default
  Do not set PR_SET_DUMPABLE by default
2018-03-27 14:20:53 +02:00
Anatol Belski
6b39c81957 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Do not set PR_SET_DUMPABLE by default
  Do not set PR_SET_DUMPABLE by default
2018-03-27 14:20:10 +02:00
Jakub Zelenka
276d19feaa Do not set PR_SET_DUMPABLE by default 2018-03-27 14:19:36 +02:00
Jakub Zelenka
d20bebfe13 Do not set PR_SET_DUMPABLE by default 2018-03-27 14:18:01 +02:00
Dmitry Stogov
fe6f092e5e Fixed bug #75982 ($_SERVER mostly empty with default variables_order GPCS on FastCGI/CGI) 2018-03-23 15:17:10 +03:00
Dmitry Stogov
12baec3dfa Move constant array into read-only memory 2018-03-14 11:35:31 +03:00
Gabriel Caruso
2bd7e2bb27 Fix link for phpdbg documentation 2018-03-11 16:37:40 +01:00
Anatol Belski
d047137d7e Merge branch 'PHP-7.2'
* PHP-7.2:
  Disable PGO for phpdbg
2018-03-08 11:57:55 +01:00
Anatol Belski
d1ed6b1b15 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Disable PGO for phpdbg
2018-03-08 11:49:25 +01:00
Anatol Belski
34b9f9dedf Disable PGO for phpdbg
For executable files, the linker seems to have issues dealing with the
empty profiling database. As PGO is unlikely to bring any benefit in
this case, the easiest is to disable it.
2018-03-08 11:48:37 +01:00
George Wang
1777db1fdf Merge branch 'PHP-7.2' 2018-02-27 23:34:01 -05:00
George Wang
66e3912f3a Merge branch 'PHP-7.1' into PHP-7.2 2018-02-27 23:33:36 -05:00
George Wang
d4387fca0a revert last change, for PHP7 no need to do strlen() + 1 for hash look up. 2018-02-27 23:31:43 -05:00
George Wang
17e49ba79a Merge branch 'PHP-7.2' 2018-02-27 23:21:32 -05:00
George Wang
3af5722e11 Merge branch 'PHP-7.1' into PHP-7.2 2018-02-27 23:21:04 -05:00
George Wang
2b033607f3 [BUGFIX] calling php_ini_activate_per_host_config() with correct name length. 2018-02-27 23:18:51 -05:00
George Wang
2ec012fa2a Merge branch 'PHP-7.2'
Conflicts:
	sapi/litespeed/lsapi_main.c
2018-02-27 13:57:06 -05:00
George Wang
9607d15d7d Merge branch 'PHP-7.1' into PHP-7.2 2018-02-27 13:56:19 -05:00
George Wang
97ff815cbb release LiteSpeed SAPI 7.0.
add CRIU support.
add support for [PATH=] and [HOST=] sections in php.ini
2018-02-27 13:54:28 -05:00
Gabriel Caruso
ded3d984c6 Use EXPECT instead of EXPECTF when possible
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
2018-02-20 21:53:48 +01:00
Nikita Popov
b0af9ac733 Avoid live range references in opcodes
Don't store the live range of the freed variable for FREE_ON_RETURN
frees, instead look it up at runtime. As this is an extremely
unlikely codepath (in particular, it requires a loop variable with
a throwing destructor), saving the runtime lookup of the live range
is not worth the extra complexity this adds everywhere else.
2018-02-16 21:30:48 +01:00
Anatol Belski
abf5534113 Reduce var scope 2018-02-16 15:44:43 +01:00
Anatol Belski
535497cb97 Remove always true condition 2018-02-16 15:44:42 +01:00
Anatol Belski
7761c819bf Simplify declaration 2018-02-16 15:44:42 +01:00
Tom Van Looy
7672f8be0b
Fix: follow the indent of the other configure options 2018-02-15 08:49:58 +01:00
Gabriel Caruso
21e3b0c70c Remove trailing whitespace in inc files 2018-02-10 19:20:23 +01:00
Gabriel Caruso
2d48d734a2 Fix some misspellings 2018-02-06 16:59:00 +01:00
Dmitry Stogov
ca035f26aa Moved "zval.u2.cache_slot" into free room of "zend_op" 2018-02-05 19:41:47 +03:00
Gabriel Caruso
fef879a2d6 Use bool instead of boolean while throwing a type error
PHP requires boolean typehints to be written "bool" and disallows
"boolean" as an alias. This changes the error messages to match
the actual type name and avoids confusing messages like "must be
of type boolean, boolean given".

This a followup to ce1d69a1f6, which
implements the same change for integer->int.
2018-02-04 23:09:40 +01:00
Gabriel Caruso
ce1d69a1f6 Use int instead of integer in type errors
PHP requires integer typehints to be written "int" and does not
allow "integer" as an alias. This changes type error messages to
match the actual type name and avoids confusing messages like
"must be of the type integer, integer given".
2018-02-04 19:08:23 +01:00
Gabriel Caruso
affc20f891 Use bool instead of boolean in proto 2018-02-04 17:00:24 +01:00
Gabriel Caruso
84488d921b Remove superfluous SKIPIF sections in more tests 2018-02-04 16:57:08 +01:00
Lee Hsun
4b19f710e1 Set max_requests to 0
The value will always be overwritten by fpm_run(), and the default
value there is 0 and not 500.
2018-02-03 16:15:12 +01:00
Gabriel Caruso
8034fdc9d9 Use int instead of integer in proto 2018-02-02 22:32:15 +01:00
Anatol Belski
bced074124 Fix race conditions with Apache vhost vs. per dir config
If the same php_value/php_flag is present in httpd.conf and .htaccess,
the key is potentially shared between threads. Unfortunately we can't
intern these keys using the current mechanism, because the MPM is setup
before the SAPI module setup is even started. A more elegant way were
to implement a kind of string pool for the thread safe Apache SAPI
config directives with the mechanism similar to what is done for the
SAPI setup now, but doing a separate management.

(cherry picked from commit 73eb5a78b9)
2018-02-01 15:24:31 +01:00
Dmitry Stogov
ba298725d1 Changed CATCH instruction format (extended_value moved into op2, op2 into result, result into extended_value) 2018-01-31 22:39:30 +03:00
Anatol Belski
3c6e1c2b81 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix race conditions with Apache vhost vs. per dir config
2018-01-31 20:26:20 +01:00
Anatol Belski
73eb5a78b9 Fix race conditions with Apache vhost vs. per dir config
If the same php_value/php_flag is present in httpd.conf and .htaccess,
the key is potentially shared between threads. Unfortunately we can't
intern these keys using the current mechanism, because the MPM is setup
before the SAPI module setup is even started. A more elegant way were
to implement a kind of string pool for the thread safe Apache SAPI
config directives with the mechanism similar to what is done for the
SAPI setup now, but doing a separate management.
2018-01-31 20:15:30 +01:00
motecshine
0e10bed83e Remove double include of fpm_scoreboard.h 2018-01-15 12:22:04 +01:00
Anatol Belski
50431d0820 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fix invalid free
2018-01-13 12:33:45 +01:00
Anatol Belski
1350f4f997 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix invalid free
2018-01-13 12:33:02 +01:00
Anatol Belski
2503a27ae0 Fix invalid free 2018-01-13 12:32:22 +01:00
Nikita Popov
b942648771 Merge branch 'PHP-7.2' 2018-01-12 18:18:45 +01:00
Nikita Popov
f8c889760c Merge branch 'PHP-7.1' into PHP-7.2 2018-01-12 18:18:34 +01:00
Nikita Popov
9e98e99a3a Revert "Fixed bug #75287 (Builtin webserver crash after chdir in a shutdown function)"
This reverts commit 816758eda2.

After this commit relative router scripts were resolved against
docroot rather than shell cwd.
2018-01-12 18:11:12 +01:00
Kalle Sommer Nielsen
1d0ac9819a Use PHP_WIN32 2018-01-04 08:14:41 +01:00
Gabriel Caruso
471da3eddc Trailing whitespaces on sapi/*
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-04 02:39:54 -02:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a76eeea736 Merge branch 'PHP-7.2'
* PHP-7.2:
  Happy new year (Update copyright to 2018)

Conflicts:
	ext/phar/LICENSE
2018-01-03 16:02:15 +08:00
Xinchen Hui
0e62639d28 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Happy new year (Update copyright to 2018)
2018-01-03 16:00:34 +08:00
Lior Kaplan
fbfdd1e1c4 Happy new year (Update copyright to 2018) 2018-01-02 23:42:29 +02:00
Xinchen Hui
b65abecfdf regenerated with newer re2c 2018-01-02 13:54:29 +08:00