Commit graph

6085 commits

Author SHA1 Message Date
Niels Dossche
c83632a503 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Use __DIR__-relative path in tests
  Fix GH-12675: MEMORY_LEAK in phpdbg_prompt.c
2023-11-15 22:00:44 +01:00
Niels Dossche
4f1103ef3b Fix GH-12675: MEMORY_LEAK in phpdbg_prompt.c
Have to use file_put_contents() instead of --FILE-- because we have to
actually load it using the exec command, *and* have to make multiple
files, and note that we can only load files relative from the current
directory, so we can't rely on files being in the sapi/phpdbg/tests
folder.

Closes GH-12680.
2023-11-15 21:59:55 +01:00
Niels Dossche
1fb73463d3 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12621: browscap segmentation fault when configured in the vhost
2023-11-11 18:36:32 +01:00
Niels Dossche
7353c7ce17 Fix GH-12621: browscap segmentation fault when configured in the vhost
The temporary HashTable has a destructor that releases the string held
by the entry's value. However, browscap_intern_str(_ci) only incremented
the refcount for the reference created by the return value. As the
HashTable is only used during parsing, we don't need to manage the
reference count of the value anyway, so get rid of the destructor.

This is triggerable in two cases:
 - When using php_admin_value to set the ini at the activation stage
 - When running out of space for the opcache-interned strings

Closes GH-12634.
2023-11-11 18:35:57 +01:00
Jakub Zelenka
d02a8f4e87
Separate setting of SO_KEEPALIVE in FPM tests
Closes GH-12640
2023-11-10 09:45:19 +00:00
Jakub Zelenka
52b13f6ddb
Merge branch 'PHP-8.2' into PHP-8.3 2023-11-03 17:17:52 +00:00
Jakub Zelenka
882cc4f804
Merge branch 'PHP-8.1' into PHP-8.2 2023-11-03 17:17:23 +00:00
Jakub Zelenka
a8c6c6165b
Fix GH-9921: Loading ext in FPM config does not register module handlers
Closes GH-12377
2023-11-03 16:53:09 +00:00
Jakub Zelenka
e43438544e
Merge branch 'PHP-8.2' into PHP-8.3 2023-11-03 14:07:36 +00:00
Jakub Zelenka
e3d1beb0f1
Fix bug #76922: FastCGI terminates conn after FCGI_GET_VALUES
Closes GH-12387
2023-11-03 14:06:36 +00:00
Jakub Zelenka
2913447653
Merge branch 'PHP-8.2' into PHP-8.3 2023-10-14 18:44:26 +01:00
Jakub Zelenka
c776f79578
Merge branch 'PHP-8.1' into PHP-8.2 2023-10-14 18:41:48 +01:00
Jakub Zelenka
0217be4d5b
Fix GH-12232: FPM: segfault dynamically loading extension without opcache
Also fixes incorrect assertion in ini init that php_dl is always
temporary.

Closes GH-12277
2023-10-14 18:38:21 +01: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
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
Niels Dossche
98e2ff44bc Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix test under older CI configurations
2023-10-02 21:53:03 +02:00
Niels Dossche
87cd401aaf Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix test under older CI configurations
2023-10-02 21:52:52 +02:00
Niels Dossche
b140f6e9f8 Fix test under older CI configurations 2023-10-02 21:52:44 +02:00
Niels Dossche
0427e26729 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix #80092: ZTS + preload = segfault on shutdown
2023-10-02 19:42:10 +02:00
Niels Dossche
28a909d40a Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix #80092: ZTS + preload = segfault on shutdown
2023-10-02 19:37:09 +02:00
Niels Dossche
bdc87b0f66 Fix #80092: ZTS + preload = segfault on shutdown
After preloading has executed, the executor globals for class_table and
function_table are still referring to the values during preloading.
If no request happens after that then these values will remain dangling
pointers. If then the -v option on CLI or -h option (and possibly
others) on CGI is provided, there is a double free.
Fix it by nulling the pointers explicitly after preloading has finished
to fix it for all SAPIs.

Closes GH-12311.
2023-10-02 19:33:41 +02:00
Jakub Zelenka
fe30c5098f
Fix GH-12077: Check lsof functionality in socket on close test
Closes GH-12084
2023-08-30 14:28:17 +01:00
Jakub Zelenka
ea87501aee
Fix FPM UDS test for very long name check by extending its length
It did not correctly produce error message if run in in a short src path
2023-08-30 12:57:15 +01:00
Jakub Zelenka
99a222cd80
FPM tester FastCGI client transport (#11764)
This improves FastCGI client by separating transport functions and adding support for more low level socket transport that is useful for debugging in some cases.

In addition to that it introduces an option for delaying of fcgi request writing.
2023-08-26 19:03:59 +01:00
Mikhail Galanin
418cdc0bea
Set CLOEXEC on listened/accepted sockets in the FPM children
Closes GH-11708

Co-authored-by: Jakub Zelenka <bukka@php.net>
2023-08-26 15:19:03 +01:00
Ilija Tovilo
c9e5e1fc52
Switch asan build to Ubuntu 23.04 in Docker
Closes GH-12034
2023-08-23 20:40:15 +02:00
George Peter Banyard
e055e12a2c
[skip ci] Mark test as XLEAK due to LSAN bug (#12018)
This is due to apparently some combination of glibc and Clang 14 which we are unfortunately hitting
2023-08-23 13:19:13 +01:00
Ilija Tovilo
bad5298707
Make php_cli_server_pdeathsig.phpt SKIPIF more specific 2023-08-22 23:51:56 +02:00
Peter Kokot
adc4a48d26
Fix configure phpdbg help output (#12013)
By default phpdbg is enabled (--enable-phpdbg) and user can get info in
the `./configure --help` output if they want to disable it like with the
other configuration options.
2023-08-22 02:52:06 +01:00
Kamil Tekiela
f907a009f9
Align highlight_string|file with HTML standard and modern browsers
Closes GH-11913
2023-08-12 15:08:28 +01:00
Niels Dossche
50bb380594 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-10964: Improve `man` page about the built-in server
  Fix GH-11438: mysqlnd fails to authenticate with sha256_password accounts using passwords longer than 19 characters
2023-08-03 20:33:07 +02:00
Niels Dossche
75441d71d8 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-10964: Improve `man` page about the built-in server
  Fix GH-11438: mysqlnd fails to authenticate with sha256_password accounts using passwords longer than 19 characters
2023-08-03 20:32:30 +02:00
Alexandre Daubois
997a36750b Fix GH-10964: Improve man page about the built-in server
Closes GH-11857.
2023-08-03 20:29:13 +02:00
Niels Dossche
d58e3c05c9 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-11716: cli server crashes on SIGINT when compiled with ZEND_RC_DEBUG=1
2023-07-21 15:31:33 +02:00
Niels Dossche
272dc9a09c Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-11716: cli server crashes on SIGINT when compiled with ZEND_RC_DEBUG=1
2023-07-21 15:31:20 +02:00
Niels Dossche
af77d3b8da Fix GH-11716: cli server crashes on SIGINT when compiled with ZEND_RC_DEBUG=1
Closes GH-11757.
2023-07-21 15:23:56 +02:00
Ilija Tovilo
1a0ef2c1cc
Revert "Remove name field from the zend_constant struct (#10954)"
This reverts commit f42992f580.

Closes GH-11604
2023-07-17 22:32:41 +02:00
Joshua Behrens
08b57772b0
Warn when fpm socket was not registered on the expected path
This might happen if the UDS length limit is exceeded.

Co-authored-by: Jakub Zelenka <bukka@php.net>

Closes GH-11066
2023-07-15 14:21:58 +01:00
Niels Dossche
e8b804dadc Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-9669: phpdbg -h options doesn't list the -z option
2023-07-07 19:19:53 +02:00
Niels Dossche
4a28cc725a Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-9669: phpdbg -h options doesn't list the -z option
2023-07-07 19:17:35 +02:00
Adam Saponara
119b062169 Fix GH-9669: phpdbg -h options doesn't list the -z option
Adds `-z` flag in phpdbg output.

Closes GH-9713.
2023-07-07 19:16:32 +02:00
Niels Dossche
f16b34f1d0 Implement GH-10024: support linting multiple files at once using php -l
This is supported in both the CLI and CGI modes. For CLI this required
little changes.

For CGI, the tricky part was that the options parsing happens inside the
loop. This means that options passed after the -l flag were previously
simply ignored. As we now re-enter the loop we would parse the options
again, and if they are handled but don't set the script name, then CGI
will think you want to read from standard in. To keep the same "don't
parse options" behaviour I simply wrapped the options handling inside an
if.

Closes GH-10024.
Closes GH-10710.
2023-07-05 15:20:36 +02:00
Ilija Tovilo
ad1b70d67e
Revert "Revert "Remove name field from the zend_constant struct (#10954)""
This reverts commit 9f4bd3040d.
2023-07-04 16:42:40 +02:00
Máté Kocsis
9f4bd3040d
Revert "Remove name field from the zend_constant struct (#10954)"
This reverts commit f42992f580.

Fix GH-11423
2023-07-03 15:16:24 +02:00
nielsdos
d8ee89d3fa Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix interrupted CLI output causing the process to exit
2023-06-23 17:43:01 +02:00
nielsdos
b9bf9ee2cb Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix interrupted CLI output causing the process to exit
2023-06-23 17:42:45 +02:00