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

475 Commits

Author SHA1 Message Date
Petr Sumbera
ce1cadba29 Fix Solaris tests and add nightly CI job
Closes GH-20709
2026-03-04 10:12:03 +01:00
Ilija Tovilo
decf77f2fb Merge branch 'PHP-8.4'
* PHP-8.4:
  [skip ci] Skip php_cli_server_pdeathsig.phpt if pgrep is missing
2025-09-23 17:15:17 +02:00
Ilija Tovilo
7bce6d89e7 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  [skip ci] Skip php_cli_server_pdeathsig.phpt if pgrep is missing
2025-09-23 17:15:09 +02:00
Ilija Tovilo
c6a6cb79f9 [skip ci] Skip php_cli_server_pdeathsig.phpt if pgrep is missing
Fixes GH-19911
Closes GH-19923
2025-09-23 17:14:51 +02:00
Ilija Tovilo
f389aded6a Warn on http_response_code() after header('HTTP/...')
Fixes GH-18582
Fixes #81451
Closes GH-18962

Co-authored-by: Jakub Zelenka <bukka@php.net>
2025-09-23 11:45:47 +02:00
Remi Collet
7f9de57fb4 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Mark test as ONLINE (#19776)
2025-09-09 16:34:52 +02:00
Remi Collet
d2fa1ca600 Mark test as ONLINE (#19776) 2025-09-09 16:34:02 +02:00
Remi Collet
1c6d0e90f9 Mark test as ONLINE (#19776) 2025-09-09 16:19:05 +02:00
Alexandre Daubois
bc6117d713 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-19461: Improve error message on listening error with IPv6 (#19462)
2025-09-05 10:50:54 +02:00
Alexandre Daubois
d84f463e3c Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-19461: Improve error message on listening error with IPv6 (#19462)
2025-09-05 10:50:11 +02:00
Alexandre Daubois
a41cb62c4c Fix GH-19461: Improve error message on listening error with IPv6 (#19462) 2025-09-05 10:48:33 +02:00
Tim Düsterhus
3d9d68e1ca zend_compile: Deprecate backticks as an alias for shell_exec() (#19443)
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_backticks_as_an_alias_for_shell_exec
2025-08-12 12:02:13 +02:00
Tim Düsterhus
d3ebf97d77 Fix expectations in version string tests 2025-07-27 09:40:23 +02:00
Arnaud Le Blanc
7b4c14dc10 Make OPcache non-optional
This removes the --enable-opcache/--disable-opcache configure switch. OPcache
is now always builtin. The default value of opcache.enable and
opcache.enable_cli is unchanged.

RFC: https://wiki.php.net/rfc/make_opcache_required

Closes GH-18961.

Co-authored-by: Tim Düsterhus <tim@tideways-gmbh.com>
2025-07-27 09:40:22 +02:00
DanielEScherzer
d8577d9bfb Deprecate returning non-string values from a user output handler (#18932)
https://wiki.php.net/rfc/deprecations_php_8_4
2025-07-07 14:31:13 -07:00
Tim Düsterhus
5740607806 Merge branch 'PHP-8.4'
* PHP-8.4:
  cli: Fix tests/bug80092.phpt expectation for `PHP_BUILD_PROVIDER` (#18824)
2025-06-10 19:16:28 +02:00
Tim Düsterhus
594221fff2 cli: Fix tests/bug80092.phpt expectation for PHP_BUILD_PROVIDER (#18824)
see afc5738154
see 40d88cacc1
2025-06-10 19:15:35 +02:00
Niels Dossche
3c84b01e02 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix leak+crash with sapi_windows_set_ctrl_handler()
2025-05-05 19:14:19 +02:00
Niels Dossche
d4a3e437ae Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix leak+crash with sapi_windows_set_ctrl_handler()
2025-05-05 19:14:13 +02:00
Niels Dossche
fb3536fd60 Fix leak+crash with sapi_windows_set_ctrl_handler()
The ctrl_handler is never destroyed. We have to destroy it at request
end so we avoid leaking it and also avoid keeping a reference to
previous request memory in a next request. The latter can result in a
crash and can be demonstrated with this script and `--repeat 2`:

```php
class Test {
	public function set() {
		sapi_windows_set_ctrl_handler(self::cb(...));
	}
	public function cb() {
	}
}

$test = new Test;
$test->set();
sleep(3);
```
When you hit CTRL+C in the second request you can crash.

This patch resolves both the leak and crash by destroying the
ctrl_handler after a request.

Closes GH-18231.
2025-05-05 19:13:39 +02:00
Pascal Chevrel
ff88701b77 Fix GH-17956 Internal dev server 404 page is not responsive
Add a basic viewport html meta tag with responsive mode parameters
See: https://developer.mozilla.org/en-US/docs/Web/HTML/Viewport_meta_tag

Updated existing tests

close GH-17957
2025-03-03 12:05:00 +00:00
Christoph M. Becker
a7cf0725d8 Skip sapi_windows_set_ctrl_handler.phpt under ASan
For some reason, terminating the child process by sending CTRL+C won't
work under ASan instrumentation.  Since termination via CTRL+BREAK
works, there is apparently nothing fundamentally wrong, so we just
skip the test.

Closes GH-17086.
2024-12-13 14:29:40 +01:00
Jakub Zelenka
7c96af42b7 Merge branch 'PHP-8.3' into PHP-8.4 2024-11-20 11:14:04 +01:00
Jakub Zelenka
ffff27f734 Merge branch 'PHP-8.2' into PHP-8.3 2024-11-20 11:12:19 +01:00
Niels Dossche
f18d429b20 Fix GHSA-4w77-75f9-2c8w 2024-11-20 11:07:28 +01:00
David Carlier
139accecb4 Merge branch 'PHP-8.3' into PHP-8.4 2024-10-03 22:46:02 +01:00
David Carlier
4b7a906d57 Merge branch 'PHP-8.2' into PHP-8.3 2024-10-03 22:45:51 +01:00
David Carlier
3d80d98a10 Fix GH-16137: "Deduplicate" http headers values but Set-Cookie.
Those are meant to have 1 or plus values separated by a comma even
 if the client set them separately.

close GH-16154
2024-10-03 22:45:31 +01:00
Peter Kokot
13f041163c Remove Travis artefacts (#15714)
Travis was suspended https://github.com/php/php-src/pull/15314

This removes 404 errored Travis image in README, travis configuration
directory and YAML file and usages in tests.

[skip ci]

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2024-09-04 01:15:10 +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
Niels Dossche
f88fc9c6e8 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-14189: PHP Interactive shell input state incorrectly handles quoted heredoc literals.
2024-05-10 16:49:05 +02:00
Niels Dossche
f365ced13a Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-14189: PHP Interactive shell input state incorrectly handles quoted heredoc literals.
2024-05-10 16:48:59 +02:00
Niels Dossche
217b753a3d Fix GH-14189: PHP Interactive shell input state incorrectly handles quoted heredoc literals.
Only `'` was handled, no handling case for `"` existed. Simply add it so
the heredoc tag is set up correctly.

Closes GH-14195.
2024-05-10 16:48:26 +02:00
Laurent Arnoud
3f0b204f5a cli: allow to change ~/.php_history with PHP_HISTFILE
Closes GH-13313
2024-04-22 10:05:47 +02:00
Ilija Tovilo
e23440e5a6 Implement reflection constant
Fixes GH-13570
Closes GH-13669
2024-04-17 22:53:09 +02:00
Laurent Arnoud
a64fc008c8 tests: add php_history file check (#13967) 2024-04-16 12:39:46 +02:00
Arnaud Le Blanc
5b501f28e5 Cleanup temp file 2024-02-21 17:58:48 +01:00
Ilija Tovilo
c149b4f56f Fix missing syntax error message in cli-server router script
Fixes GH-13113
Closes GH-13275
2024-02-07 16:13:08 +01:00
Ilija Tovilo
d7d0d19d32 Support index.php fallback for files in built-in server
If no router script is used, the built-in webserver will now look for a fallback
index file recursively in all cases, including URLs with a period.

Fixes GH-12604
Closes GH-12992
2024-01-09 16:13:39 +01:00
Ilija Tovilo
8876639d11 Add X-Powered-By header to builtin 404 page (#13092)
As requested by 30929c9a88 (r1434156785).
2024-01-09 16:10:39 +01:00
Levi Morrison
7843ef7ad5 Merge branch 'PHP-8.3' 2023-11-21 18:33:14 -07:00
Levi Morrison
c524dc6565 test: allow other zend extensions to not fail the test 2023-11-21 18:32:50 -07:00
Niels Dossche
5cc6979210 Merge branch 'PHP-8.3'
* PHP-8.3:
  php_cli_server: ensure single date header is present
2023-10-06 17:54:03 +02:00
Niels Dossche
7c41509e26 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  php_cli_server: ensure single date header is present
2023-10-06 17:51:38 +02:00
Niels Dossche
a1845944ce Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  php_cli_server: ensure single date header is present
2023-10-06 17:50:13 +02:00
coppolafab
f6ac08c6a3 php_cli_server: ensure single date header is present
Currently the PHP Development Server appends a Date header in the
response, despite already set from user code.

Added a check condition before append the header, and a test file.

Closes GH-12363.
2023-10-06 17:49:30 +02:00
Niels Dossche
cb0d04e9f4 Merge branch 'PHP-8.3'
* PHP-8.3:
  Ignore optional warning output in test
2023-10-02 22:55:54 +02:00
Niels Dossche
af15ed94bf Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Ignore optional warning output in test
2023-10-02 22:55:44 +02:00
Niels Dossche
6aa20956fb Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Ignore optional warning output in test
2023-10-02 22:55:28 +02:00
Niels Dossche
6cf76d552e Ignore optional warning output in test
Due to the greedy behaviour of regex, we can't seem to use %A?
Use a for loop with a marker instead to ignore module startup warnings.
2023-10-02 22:53:39 +02:00