summaryrefslogtreecommitdiff
path: root/sapi/cli
Commit message (Collapse)AuthorAgeFilesLines
* Change Zend Stream API to use zend_string* instead of char*.Dmitry Stogov2021-03-162-8/+28
| | | | | This allows to eliminate re-calculation of string lenght and hash value. See the detailed list of changes in UPGRADING.INTERNALS.
* Merge branch 'PHP-8.0'Christoph M. Becker2021-02-221-1/+1
|\ | | | | | | | | * PHP-8.0: Fix #80771: phpinfo(INFO_CREDITS) displays nothing in CLI
| * Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-221-1/+1
| |\ | | | | | | | | | | | | * PHP-7.4: Fix #80771: phpinfo(INFO_CREDITS) displays nothing in CLI
| | * Fix #80771: phpinfo(INFO_CREDITS) displays nothing in CLIChristoph M. Becker2021-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | There is no good reason not to show the credits in text based SAPIs, except for brevity. Thus, we suppress the credits from `php -i`. Closes GH-6710.
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-041-59/+47
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fix CLI server worker support
| * | Fix CLI server worker supportNikita Popov2021-02-041-59/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we create separate listening sockets in each worker using SO_REUSEADDR, then an incoming connection may be load-balanced to a process that is already busy, either due to a long-running request, or because it is a recursive request (in which case we would deadlock). Instead, only create one listening socket, and only create worker forks afterwards. This way the incoming request will be served by one of the workers that is currently listening for an incoming connection.
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-021-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Update year to 2021
| * | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-021-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Update year to 2021
| | * Update year to 2021Peter Kokot2021-02-021-1/+1
| | | | | | | | | | | | Closes GH-6636.
* | | Fixed crash in ZTS build with --repeat optionDmitry Stogov2021-01-211-0/+1
| | |
* | | Replace zend_bool uses with boolNikita Popov2021-01-152-3/+3
| | | | | | | | | | | | | | | | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* | | rename COMPILER and ARCHITECTURE macro (too generic)Remi Collet2021-01-041-4/+4
| | |
* | | Add --repeat testing modeNikita Popov2020-10-301-9/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | This testing mode executes the test multiple times in the same process (but in different requests). It is primarily intended to catch tracing JIT bugs, but also catches state leaks across requests. Closes GH-6365.
* | | Merge branch 'PHP-8.0'Máté Kocsis2020-10-231-1/+2
|\ \ \ | |/ /
| * | Require stubs to declare return types for magic methods when possibleMáté Kocsis2020-10-231-1/+2
| | | | | | | | | | | | Closes GH-6376
* | | Use ephemeral port in more server testsNikita Popov2020-10-2310-87/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port the main php_cli_server.inc to use ephemeral ports, thus allowing CLI server tests to be parallelized. A complication here is that we also need to give each test a separate doc root, to avoid index.php files writing over each other. Closes GH-6375.
* | | Merge branch 'PHP-8.0'Nikita Popov2020-10-211-0/+65
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Add test for zend_extension loading
| * | Add test for zend_extension loadingNikita Popov2020-10-211-0/+65
| | | | | | | | | | | | Closes GH-6363.
* | | Fix [-Wduplicated-branches] in CLI SAPIGeorge Peter Banyard2020-10-091-5/+1
|/ /
* | Update to mime-db 1.45Nikita Popov2020-10-092-3/+10
| |
* | Review parameter names in ext/pcreMáté Kocsis2020-10-021-10/+10
| | | | | | | | Closes GH-6259
* | Update ext/standard parameter namesNikita Popov2020-09-291-2/+2
| | | | | | | | Closes GH-6214.
* | Improve default value handling of Exception constructorsMáté Kocsis2020-09-211-2/+2
| | | | | | | | Closes GH-6166
* | Run tidyNikita Popov2020-09-1822-37/+37
| | | | | | | | | | This should fix most of the remaining issues with tabs and spaces being mixed in tests.
* | Support ephemeral ports in debug serverSara Golemon2020-09-171-35/+65
| |
* | Add missing param type to pcre reflection testMáté Kocsis2020-09-151-1/+1
| |
* | Simplify error type filtertwosee2020-09-101-12/+6
| | | | | | | | Closes GH-6049.
* | Support cli_server.color on WindowsChristoph M. Becker2020-08-281-2/+10
| | | | | | | | | | | | | | On Windows, we have to check whether stdout is attached to a console, and whether that console supports VT100 control codes. Closes GH-5996
* | ensure installed ini don't interfereRemi Collet2020-08-211-1/+1
| |
* | Switch to mime-db as source of extension => MIME mapNikita Popov2020-08-132-28/+210
| | | | | | | | | | | | | | | | | | | | | | | | The Apache MIME type map is not actively maintained anymore, so this switches to jshttp/mime-db, which seems to be the de-facto standard in this area now. This avoid the need to patch in our own MIME types over time. The preference algorithm is based on: https://github.com/jshttp/mime-types/blob/47b62ac45e9b176a2af35532d0eea4968bb9eb6d/index.js#L154 Closes GH-5764.
* | Disable report_zend_debug by defaultNikita Popov2020-08-121-1/+0
| | | | | | | | | | | | We might just want to drop this completely, but at least don't enable it by default. It already gets disabled by a number of SAPIs, but we should make that the default state.
* | Fixed bug #62294Nikita Popov2020-08-102-0/+17
| | | | | | | | | | | | | | The primary issue was already resolved in 7c3e487289ec41e560cf7a77e36eb43da2234f33, but the particular example used in this bug report ran into an additional issue on PHP 8, because I forgot to drop a number of zend_bailout calls when switch require failure to throw.
* | Fixed bug #65275Nikita Popov2020-08-103-25/+35
| | | | | | | | | | | | Make EG(exit_status) the single source of truth for the exit status, instead of having two variables that we cannot really keep synchronized.
* | Fixed bug #79948Nikita Popov2020-08-101-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure we don't execute further scripts if one of them encountered an exit exception. Also make sure that we free file handles that end up unused due to an early abort in php_execute_scripts(), which turned up as an issue in the added test case. Finally, make use of EG(exit_status) in the places where we zend_eval_string_ex, instead of unconditionally assigning exit code 254. If an error occurs, the error handler will already set exit status 255.
* | Fixed bug #77561Nikita Popov2020-08-102-0/+14
| | | | | | | | | | | | | | | | | | Unconditionally strip shebang lines when using the CLI SAPI, independently of whether they occur in the primary or non-primary script. It's unlikely that someone intentionally wants to print that shebang line when including a script, and this regularly causes issues when scripts are used in multiple contexts, e.g. for direct invocation and as a phar bootstrap.
* | Accept zend_object in zend_read_propertyNikita Popov2020-08-071-5/+3
| |
* | Merge branch 'PHP-7.4'Nikita Popov2020-08-051-1/+6
|\ \ | |/ | | | | | | | | * PHP-7.4: Check ps -p availability in process title test Add privilege check in pcntl_unshare test
| * Check ps -p availability in process title testNikita Popov2020-08-051-1/+6
| |
* | Make http stream wrapper advertise HTTP/1.1 by defaultRowan Tommins2020-08-032-5/+5
| | | | | | | | | | | | | | | | | | | | In practice, we always act as an HTTP/1.1 client, for compatibility with servers which ignore protocol version. Sending the version in the request will avoid problems with servers which don't ignore it. HTTP/1.0 can still be forced using a stream context option. Closes GH-5899.
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-07-291-2/+4
|\ \ | |/ | | | | | | * PHP-7.4: Prevent test case from stalling
| * Prevent test case from stallingChristoph M. Becker2020-07-291-2/+4
| | | | | | | | | | | | | | If the CTRL-C event can't be sent to the child for whatever reason, the test will never terminate, because `proc_close()` waits for an infinite amount of time. Therefore, we `proc_terminate()` the child instead, after explicitly closing the pipes.
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-07-271-2/+11
|\ \ | |/ | | | | | | * PHP-7.4: Fix #77932: File extensions are case-sensitive
| * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-07-271-2/+11
| |\ | | | | | | | | | | | | * PHP-7.3: Fix #77932: File extensions are case-sensitive
| | * Fix #77932: File extensions are case-sensitiveChristoph M. Becker2020-07-271-2/+11
| | | | | | | | | | | | | | | | | | The file extension to mime type mapping *must* not depend on the file extension's case for case-insensitive file systems, and *should* not for case-sensitive file systems.
* | | Skip upload_2G.phpt if disk_free_space() <= 2GBTyson Andre2020-07-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test failed when the free disk space is close to 2.15GB. I see the file size in the .out file as 0. PHP has to save the full file contents to disk (the path is in `$_FILES`) Related to GH-5283 Closes GH-5873
* | | Review the usage of apostrophes in error messagesMáté Kocsis2020-07-102-3/+3
| | | | | | | | | | | | Closes GH-5590
* | | Add stubs for SAPIsMáté Kocsis2020-07-107-21/+39
| | | | | | | | | | | | Closes GH-5295.
* | | Use ZPP string|array union check in PCRE extensionGeorge Peter Banyard2020-07-091-8/+8
| | |
* | | Remove proto comments from C filesMax Semenik2020-07-063-16/+8
| | | | | | | | | | | | Closes GH-5758
* | | Replace EXPECTF when possibleFabien Villepinte2020-06-291-1/+1
| | | | | | | | | | | | Closes GH-5779