1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

365 Commits

Author SHA1 Message Date
Alexandre Daubois
11a95749b1 Convert more zend_parse_parameters_none() to fast ZPP (#21330) 2026-03-04 14:07:46 +01:00
Peter Kokot
7158e6376e Merge branch 'PHP-8.5'
* PHP-8.5:
  sapi/*/Makefile.frag: install programs built with libtool, with libtool
2026-02-23 17:21:24 +01:00
Peter Kokot
c89b363fc9 Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4:
  sapi/*/Makefile.frag: install programs built with libtool, with libtool
2026-02-23 17:20:59 +01:00
Michael Orlitzky
db6cca26dd sapi/*/Makefile.frag: install programs built with libtool, with libtool
When installing executables that were built using libtool, we are
supposed to use

  $ libtool --mode-install <install-command>

rather than the bare <install-command>. This is discussed ever so
briefly in the "Installing executables" section of the GNU libtool
documentation:

  https://www.gnu.org/software/libtool/manual/libtool.html

So far this has not caused a problem with GNU libtool on the platforms
that PHP supports, but there is an alternate libtool implementation
called slibtool that stores wrappers at the locations where PHP is
expecting the true executables to live. As a result, the wrappers (and
not the executables) are installed when slibtool is used to build PHP.

This is fixed by replacing,

  $(INSTALL)

with

  $(LIBTOOL) --mode=install $(INSTALL)

in the install-foo rules for the executables that are built with
libtool.

Closes GH-13674
2026-02-23 17:19:23 +01:00
Khaled Alam
d03d69a88a Remove duplicate #include statements (#21085)
* Remove duplicate #include statements across the codebase.

* feat: Restore conditional/unconditional include pairs in lscriu.c
2026-01-30 16:37:13 +01:00
Arnaud Le Blanc
65b4073922 Include the actual stub name in generated arginfo headers (#20993) 2026-01-21 20:57:00 +01:00
Jakub Zelenka
03d984e659 Merge branch 'PHP-8.4' 2025-09-09 22:04:20 +02:00
Jakub Zelenka
e946e9b329 Merge branch 'PHP-8.3' into PHP-8.4 2025-09-09 22:03:49 +02:00
Jakub Zelenka
3a17712269 Merge branch 'PHP-8.2' into PHP-8.3 2025-09-09 21:59:35 +02:00
Jakub Zelenka
6f92e9c054 Merge branch 'PHP-8.1' into PHP-8.2 2025-09-09 21:58:37 +02:00
Jakub Zelenka
c0f8bb6622 Revert "fix pipe detection for STDERR."
This reverts commit a757f276f9.
2025-09-09 21:57:54 +02:00
George Wang
f171afae23 Merge branch 'PHP-8.4' 2025-09-06 12:50:25 -04:00
George Wang
1557bb81a9 Merge branch 'PHP-8.3' into PHP-8.4 2025-09-06 12:47:20 -04:00
George Wang
ebbed484fb update LiteSpeed API to V8.3 2025-09-06 12:46:56 -04:00
George Wang
aa3983b31b fix pipe detection for STDERR. 2025-09-06 12:44:54 -04:00
George Wang
828080146b fix pipe detection for STDERR. 2025-09-06 12:39:53 -04:00
George Wang
a757f276f9 fix pipe detection for STDERR. 2025-09-06 12:38:13 -04:00
Arnaud Le Blanc
c561f7da85 Refresh zend_mm shadow key on fork
The shadow key is refreshed when resetting the memory manager between two
requests. But in forking SAPIs the first request of a child process inherits the
shadow key of the parent. As a result, a leak of the shadow key during the first
request of one process gives away the shadow key used during the first request
of other processes. This makes the key refresh mechanism less useful.

Here I ensure that we refresh the shadow key after a fork. We can not reset the
manager as there may be active allocations. Instead, we have to recompute shadow
pointers with the new key.

Closes GH-16765
2025-07-29 14:00:37 +02:00
George Wang
3367f17f60 Merge branch 'PHP-8.4' 2025-05-15 11:53:27 -04:00
George Wang
72efe6dcdf Merge branch 'PHP-8.3' into PHP-8.4 2025-05-15 11:53:07 -04:00
George Wang
8e5b3129de Address compiler warnings. 2025-05-15 11:52:49 -04:00
George Wang
2336aa684d Merge branch 'PHP-8.4' 2025-04-27 12:00:31 -04:00
George Wang
c08c5ded1a Merge branch 'PHP-8.3' into PHP-8.4 2025-04-27 12:00:12 -04:00
George Wang
03844d1f51 Update LSAPI version to V8.2 2025-04-27 11:59:40 -04:00
George Wang
78370689b8 Merge branch 'PHP-8.4' 2025-04-27 11:53:33 -04:00
George Wang
39a8e5e041 Merge branch 'PHP-8.3' into PHP-8.4 2025-04-27 11:53:14 -04:00
George Wang
58e5d0c240 Update max size of request headers from 65535 to 256K 2025-04-27 11:52:51 -04:00
George Wang
7cc7ae9d24 Merge branch 'PHP-8.4' 2025-04-27 11:47:52 -04:00
George Wang
e961488d98 Update SAPI_LITESPEED_PATH to sapi/litespeed/lsphp 2025-04-27 11:47:35 -04:00
George Wang
e4f2e4a99a Update SAPI_LITESPEED_PATH to sapi/litespeed/lsphp 2025-04-27 11:20:32 -04:00
David CARLIER
ba83d5daeb sapi/litespeed and ext/standard: Fix few build warnings. (#18265) 2025-04-19 10:18:53 +01:00
Peter Kokot
bca18bc585 Autotools: Sync CS in sapi/litespeed (#15409)
- AS_CASE macro used
2024-08-14 21:38:36 +02:00
Calvin Buckley
afc5738154 Show build provider and unify version information printing (#14657)
* Show build provider information in "php -v"

Vendors such as distributions can set the `PHP_BUILD_PROVIDER`
variable, that gets printed in phpinfo. However, I find that users check
`php -v` more often than phpinfo to see what PHP they're running. The
problem with this is that it does not show that build provider
information.

This change makes the build provider information printed on an
additional line of the version information.

* Put on same line so it works with or without env var

Unbreaks build without PHP_BUILD_PROVIDER set.

* change wording in provider version text

better grammatically; many different possibilities here though

* Unify SAPI version printing

This makes it so that all of the SAPIs share the same code for printing
version information. This is useful in case of any future changes to the
version information, such as i.e. adding build provider to the output.

* Make include for php_print_version explicit

* Preserve phpdbg version and output channel

php_printf doesn't have same semantics, as phpdbg_out could be on a
different output than stdout/err. Also add the phpdbg version (in case
it differs from PHP's, to keep similar output before this PR)

* remove size variables

we don't use them and CI doesn't like unused variables

* Fix format string insecurity
2024-08-12 23:24:41 -03:00
Peter Kokot
003e238436 Autotools: Quote and fix PHP_SELECT_SAPI arguments (#15118)
This macro once had also the 5th argument (the build target), which was
removed via 2a6da0f24c. This quotes all
PHP_SELECT_SAPI arguments and removes the redundant ones. The basic
macro usage help text is moved to the macros section from the obsolete
docs file.
2024-07-27 22:46:36 +02:00
Peter Kokot
dc7b67ebc3 Autotools: Sync PHP_ADD_MAKEFILE_FRAGMENT (#14766)
- Macro help text updated for extensions and general usage
- Arguments quoted
- dnl removes redundant newlines in the generated configure script
2024-07-03 13:15:13 +02:00
Peter Kokot
5e27a2a994 Autotools: Simplify SAPI configure log check messages (#14764)
The PHP_ARG_ENABLE and PHP_ARG_WITH 2nd argument is the check message in
the configure log output.
2024-07-02 08:11:10 +02:00
Peter Kokot
dc1cc503db Autotools: Sync PHP_SUBST in sapi (#14753)
- Arguments quoted
- Redundant comments removed (some basic help info is in the
  build/php.m4)
- APXS variable as such isn't used in the generated Makefile, the path
  to the apxs tool is inserted during the configure step directly
2024-07-01 21:04:09 +02:00
Peter Kokot
cf3b9fca8f Sync #if/ifdef/defined (-Wundef) (#14623)
These are either define (to value 1) or undefined:
- __GNUC__
- DBA_CDB_BUILTIN
- DBA_GDBM
- HAVE_FORK
- HAVE_PUTENV
- HAVE_SETENV
- HAVE_SYS_SELECT_H
- HAVE_SYS_SOCKET_H
- HAVE_SYS_WAIT_H
- HAVE_UNSETENV
- RFC3678_API
- ZEND_ENABLE_ZVAL_LONG64
- ZTS

Follow-up of GH-5526
2024-06-24 19:37:07 +02:00
Peter Kokot
550f840a22 Fix fall through warning in sapi/litespeed (#14530)
This fixes this warning using ZEND_FALLTHROUGH:

```
php-src/sapi/litespeed/lsapi_main.c: In function ‘parse_opt’:
php-src/sapi/litespeed/lsapi_main.c:1196:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
 1196 |             if ( *((*(p-1))+2) == 's' )
      |                ^
```
2024-06-10 16:51:01 +02:00
Peter Kokot
84a0da1574 Sync #if/ifdef/defined (#14508)
This syncs CPP macro conditions:
- _WIN32
- _WIN64
- HAVE_ALLOCA_H
- HAVE_ALPHASORT
- HAVE_ARPA_INET_H
- HAVE_CONFIG_H
- HAVE_DIRENT_H
- HAVE_DLFCN_H
- HAVE_GETTIMEOFDAY
- HAVE_LIBDL
- HAVE_POLL_H
- HAVE_PWD_H
- HAVE_SCANDIR
- HAVE_SYS_FILE_H
- HAVE_SYS_PARAM_H
- HAVE_SYS_SOCKET_H
- HAVE_SYS_TIME_H
- HAVE_SYS_TYPES_H
- HAVE_SYS_WAIT_H
- HAVE_UNISTD_H
- PHP_WIN32
- ZEND_WIN32

These are either undefined or defined to 1 in Autotools and Windows.

Follow up of GH-5526 (-Wundef).
2024-06-09 14:23:41 +02:00
Peter Kokot
072e67fd01 Fix unused variable warning in sapi/litespeed (#13718) 2024-03-15 08:56:35 +01:00
Peter Kokot
18dffa6b73 Fix defined but not used warnings (#13678)
This fixes two warnings when building litespeed SAPI:

```
.../php-src/sapi/litespeed/lscriu.c:312:14: warning:
'LSCRIU_Error_File_Name' defined but not used
[-Wunused-function]
  312 | static char *LSCRIU_Error_File_Name(char *pchFile, int max_len)
      |              ^~~~~~~~~~~~~~~~~~~~~~
.../php-src/sapi/litespeed/lscriu.c:102:12: warning:
's_criu_debug' defined but not used [-Wunused-variable]
  102 | static int s_criu_debug = 0;
      |            ^~~~~~~~~~~~
```
2024-03-12 17:49:07 +01:00
Máté Kocsis
f2e199e878 Implement "support doc comments for internal classes and functions" (#13266)
Fixes #13130
2024-02-25 08:41:31 +01:00
Jorg Adam Sowa
e630aacf79 Remove HAVE_INET_PTON (#13410) 2024-02-21 00:43:56 +00:00
Máté Kocsis
10957e498c Do not generate frameless info items when func info generation is disabled
While here, I fixed newlines around arginfo and function entry generation. Previously, newlines were repeated.
2024-02-18 11:39:00 +01:00
Peter Kokot
04954f6b2c Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Set libtool tag per command instead of global one
2024-01-10 09:13:39 +01:00
Jan Palus
d57a7767a2 Set libtool tag per command instead of global one
Global --tag=CC defined in configure.ac is not correct in all cases. For example
linking objects that were compiled from C++ sources needs to be done with C++
compiler, however for link mode libtool will prefer compiler indicated with
--tag.

Fixes GH-12349
2024-01-10 09:09:45 +01:00
Remi Collet
6d50e58197 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  fix function declaration isn't a prototype [-Wstrict-prototypes]
2023-12-06 14:51:44 +01:00
Remi Collet
0d1bf582ce fix function declaration isn't a prototype [-Wstrict-prototypes] 2023-12-06 14:51:27 +01:00
Niels Dossche
ac5920f92b Fix GH-11141: Could not open input file: should be sent to stderr
I grepped for php_printf cases in main/ and sapi/ and converted the
cases which clearly indicate errors to fprintf(stderr, ...), like
suggested in the linked issue.

Closes GH-11163.
2023-05-05 19:31:23 +02:00