summaryrefslogtreecommitdiff
path: root/sapi/cli
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Link executable files using non PIC object files. This reduces PIC ↵Dmitry Stogov2019-10-101-1/+1
| | | | | | overhead and improves performance." This reverts commit eef85229d0fe9f69d325aa0231e592f35c468afb.
* Fix borked SKIPIFsFabien Villepinte2019-09-302-4/+10
|
* Link executable files using non PIC object files. This reduces PIC overhead ↵Dmitry Stogov2019-09-071-1/+1
| | | | and improves performance.
* Fix pipe detection and stream position handlingNikita Popov2019-09-051-0/+31
| | | | | | | | | | There are two related changes here: 1. Also check for S_ISCHR/FILE_TYPE_CHAR when checking for pipes, so that we detect ttys as well, which are also not seekable. 2. Always set position=-1 (i.e. ftell will return false) when a pipe is detected. Previously position=0 was sometimes used, depending on whether we're on Windows/Linux and whether the FD or FILE codepath was used.
* Avoid accessing undefined index in CLI server testNikita Popov2019-08-301-3/+3
|
* Don't call Reflection::export() in --rf etc implementationNikita Popov2019-08-301-1/+2
| | | | | This method is deprecated ... instead simply directly print the object.
* Fix noalias violation in select callNikita Popov2019-08-231-3/+2
|
* Introduce zend_stream_init_filename()Nikita Popov2019-07-161-10/+2
| | | | Avoid more ad-hoc initialization of zend_file_handle structures.
* Introduce zend_stream_init_fp() APINikita Popov2019-07-161-13/+4
| | | | | Reduce the amount of code that mucks around with zend_file_handle initialization.
* Move shebang handling into the lexerNikita Popov2019-07-151-27/+7
| | | | | | | | | | Instead of handling shebang lines by adjusting the file pointer in individual SAPIs, move the handling into the lexer, where this is both a lot simpler and more robust. Whether the shebang should be skipped is controlled by CG(skip_shebang) -- we might want to do that in more cases. This fixed bugs #60677 and #78066.
* Switch to using shell-less proc_open() in various server testsNikita Popov2019-07-112-30/+17
|
* improvements to cli serverJoe Watkins2019-07-031-133/+170
|
* implement support for workers in cli-server on platforms supporting forkJoe Watkins2019-06-291-6/+104
|
* Set up asan+ubsan scheduled build on azureNikita Popov2019-06-281-0/+4
| | | | | | | | | Also adds an --asan flag to run-tests.php to setup all the necessary environment variables. Some tests are marked as skipped because they are incompatible with asan or too slow. I'm basing this on the DEBUG_ZTS build, which seems to give us the most mileage.
* Split test caseChristoph M. Becker2019-06-244-72/+84
| | | | | | This test is failing on AppVeyor almost all of the time, so splitting it seems appropriate. This also allows us to rid php_cli_server_stop() which was only used by this test case.
* refactor a little more to add some more useful error messages and raise the ↵Joe Watkins2019-06-191-15/+46
| | | | limits on waiting for slow machines
* Separate check for process creation and ability to accept connectionsJoe Watkins2019-06-191-14/+13
|
* fix mac tests on azureJoe Watkins2019-06-144-2/+16
|
* Don't involve output check in the testAnatol Belski2019-06-011-5/+15
|
* Fix ZTS issue regarding new Windows CTRL handling APIChristoph M. Becker2019-06-011-2/+0
| | | | | | | | | | | | | | php_win32_signal_system_ctrl_handler() is called from a kernel thread, so the former initialization of `vm_interrupt_flag` has no effect, since it is defined as thread-local. This is, however, not necessary, since the CTRL signal handling is supposed to work only for the main thread anyway. We therefore change `vm_interrupt_flag` and the related variables to true globals. This also allows us to unmark the respective test case as XFAIL. Furthermore, `vm_interrupt_flag` is declared as `zend_bool *`, so we better treat it such.
* Mark sapi_windows_set_ctrl_handler.phpt as XFAILNikita Popov2019-05-311-0/+2
|
* Update cli reflection testNikita Popov2019-05-291-2/+4
|
* Remove two zpp tests in sapi/cli/testsNikita Popov2019-05-292-35/+0
| | | | These fail on master -- apparently we're not running these tests...
* Normalize comments in *nix build system m4 filesPeter Kokot2019-05-121-6/+4
| | | | | | | | | Normalization include: - Use dnl for everything that can be ommitted when configure is built in favor of the shell comment character # which is visible in the output. - Line length normalized to 80 columns - Dots for most of the one line sentences - Macro definitions include similar pattern header comments now
* Include the request method in CLI server logsSimon Welsh2019-05-021-1/+1
|
* [ci skip] Remove CLI sapi READMEPeter Kokot2019-04-231-20/+0
| | | | | | Removing in favour of: - https://www.php.net/manual/en/features.commandline.introduction.php - https://www.php.net/manual/en/features.commandline.differences.php
* Fix last maybe uninit warnings on 7.4Nikita Popov2019-04-151-0/+1
| | | | | Most of these only occur under GCC 5. Not fond of all the workarounds (especially the PDO one), but it gets us a clean build...
* Remove checks for locale.h, setlocale, localeconvPeter Kokot2019-04-072-5/+2
| | | | | | | | | | | | | | | | | | | The `<loccale.h>` header file, setlocale, and localeconv are part of the standard C89 [1] and on current systems can be used unconditionally. Since PHP 7.4 requires at least C89 or greater, the `HAVE_LOCALE_H`, `HAVE_SETLOCALE`, and `HAVE_LOCALECONV` symbols defined by Autoconf in configure.ac [2] can be ommitted and simplifed. The bundled libmagic (file) has also been patched already in version 5.35 and up in upstream location so when it will be patched also in php-src the check for locale.h header is still left in the configure.ac and in windows headers definition file. [1] https://port70.net/~nsz/c/c89/c89-draft.html#4.4 [2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4 Omit the bundled libmagic files
* Remove HAVE_SIGNAL_HPeter Kokot2019-04-072-12/+3
| | | | | | | | | | | | | | | | | The `<signal.h>` header file is part of the standard C89 headers [1] and on current systems can be included unconditionally. Since file requires at least C89 or greater, the `HAVE_SIGNAL_H` symbol defined by Autoconf in Zend.m4 [2] can be ommitted and simplifed. The bundled libmagic (file) also ommits the usage of HAVE_SIGNAL_H since 5.35 however current version in PHP is very modified 5.34 version and will be refactored separately. Check for HAVE_SIGNAL_H is therefore still done in the configure.ac. 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
* Merge branch 'PHP-7.3' into PHP-7.4Peter Kokot2019-03-251-6/+5
|\ | | | | | | | | | | | | * PHP-7.3: [ci skip] Update NEWS [ci skip] Update NEWS Fix #77794: Incorrect Date header format in built-in server
| * Merge branch 'PHP-7.2' into PHP-7.3Peter Kokot2019-03-251-6/+5
| |\ | | | | | | | | | | | | | | | * PHP-7.2: [ci skip] Update NEWS Fix #77794: Incorrect Date header format in built-in server
| | * Fix #77794: Incorrect Date header format in built-in serverNiklas Keller2019-03-251-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | - Fix the date format to be compliant with https://tools.ietf.org/html/rfc7231#section-7.1.1.2 - Fix date format length and use GMT time - Previously, local time was used instead of GMT. - Remove extra whitespace - Simplify string appends in php_cli_server.c
* | | Replace dirname(__FILE__) by __DIR__ in testsFabien Villepinte2019-03-1511-14/+14
| | |
* | | Implemented a faster way to access predefined TSRM resources - CG(), EG(), etc.Dmitry Stogov2019-03-141-2/+1
| | |
* | | Avoid reinitailization of ZTS cache pointer. Initialize it once in TSRM.cDmitry Stogov2019-03-122-3/+2
| | |
* | | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-03-121-2/+6
|\ \ \ | |/ /
| * | Fixed bug #77722Nikita Popov2019-03-121-2/+6
| | |
* | | Add AS_HELP_STRING to *nix build configure optionsPeter Kokot2019-03-071-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | The Autoconf's default AS_HELP_STRING macro can properly format help strings [1] so watching out if columns are aligned manually is not anymore. [1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
* | | Implement fine-grained conflict handlingNikita Popov2019-02-201-0/+1
| | | | | | | | | | | | | | | | | | Tests can specify conflict keys, either in --CONFLICTS-- or a per-directory CONFLICTS file. Non-conflicting tests may be run in parallel.
* | | Implement FR #77377 handle CTRL+C in WindowsAnatol Belski2019-02-081-0/+75
| | |
* | | Update and fix remaining year ranges (2019)Peter Kokot2019-02-083-5/+5
| | | | | | | | | | | | | | | | | | This patch follows previous license year ranges updates. With new approach source code files now have simplified headers with license information without year ranges.
* | | Remove local variablesPeter Kokot2019-02-038-72/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
* | | Remove yearly range from copyright noticeZeev Suraski2019-01-309-9/+9
| | |
* | | Revert removal of private __clone() methodsNikita Popov2019-01-141-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I thought these were redundant, because we already NULL out the clone_obj object handler. However, it turns out that reflection is using private __clone() to determine clonability (isCloneable) for the case where we only have a class, rather than an object. As such, removing these methods would be a BC break. This reverts commit e7131a4e9fa0acf8fc1e486b49851e71859ef5b8. This reverts commit 55bd88ce0d1bf461546d5d0b40920491d566ed48.
* | | Replace zend_hash_apply... with ZEND_HASH_FOREACH...Dmitry Stogov2018-12-191-9/+4
| | |
* | | Remove redundant Exception::__clone() methodNikita Popov2018-11-261-7/+4
| | | | | | | | | | | | | | | | | | Exceptions already prohibit cloning by setting clone_obj to NULL (which is integrated with reflection). No need to additionally define a dummy __clone() method.
* | | Merge branch 'PHP-7.3'Anatol Belski2018-11-163-5/+47
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Fixed bug #77111 php-win.exe corrupts unicode symbols from cli parameters
| * | Merge branch 'PHP-7.2' into PHP-7.3Anatol Belski2018-11-163-5/+47
| |\ \ | | |/ | | | | | | | | | * PHP-7.2: Fixed bug #77111 php-win.exe corrupts unicode symbols from cli parameters
| | * Fixed bug #77111 php-win.exe corrupts unicode symbols from cli parametersAnatol Belski2018-11-163-5/+47
| | | | | | | | | | | | | | | | | | The binary can be of course used on console, for whatever reasons, so UNICODE API should be used in that case. That might however not work as expected, if the binary is used for a service.
| | * Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-156-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2