Commit Graph

4830 Commits

Author SHA1 Message Date
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