summaryrefslogtreecommitdiff
path: root/sapi/cli
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug #78323: Code 0 is returned on invalid optionsIvan Mikheykin2020-01-273-2/+84
| | | | | Set CLI exit code to 1 when invalid parameters are passed, and print error to stderr.
* 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
* | Fixed bug #77722Nikita Popov2019-03-121-2/+6
| |
* | 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
| * Trim trailing whitespace in *.phptPeter Kokot2018-10-1450-101/+101
| |
| * Sync leading and final newlines in source code filesPeter Kokot2018-10-143-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. 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
| * Trim trailing whitespace in source code filesPeter Kokot2018-10-132-53/+53
| |
* | Fix stray newline that caused this test to failRasmus Lerdorf2018-10-311-1/+0
| |
* | 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
* | Trim trailing whitespace in *.phptPeter Kokot2018-10-1449-94/+94
| |
* | Sync leading and final newlines in source code filesPeter Kokot2018-10-143-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. 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
* | Trim trailing whitespace in source code filesPeter Kokot2018-10-132-53/+53
| |
* | Replace obsolete AC_TRY_FOO with AC_FOO_IFELSEPeter Kokot2018-07-301-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Autoconf 2.50 released in 2001 made several macros obsolete including the AC_TRY_RUN, AC_TRY_COMPILE and AC_TRY_LINK: http://git.savannah.gnu.org/cgit/autoconf.git/tree/ChangeLog.2 These macros should be replaced with the current AC_FOO_IFELSE instead: - AC_TRY_RUN with AC_RUN_IFELSE and AC_LANG_SOURCE - AC_TRY_LINK with AC_LINK_IFELSE and AC_LANG_PROGRAM - AC_TRY_COMPILE with AC_COMPILE_IFELSE and AC_LANG_PROGRAM PHP 5.4 to 7.1 require Autoconf 2.59+ version, PHP 7.2 and above require 2.64+ version, and the PHP 7.2 phpize script requires 2.59+ version which are all greater than above mentioned 2.50 version therefore systems should be well supported by now. This patch was created with the help of autoupdate script: autoupdate <file> Reference docs: - https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html - https://www.gnu.org/software/autoconf/manual/autoconf-2.59/autoconf.pdf
* | Pack zend_constant.flags and zend_constant.module_number into reserved space ↵Dmitry Stogov2018-07-261-6/+3
| | | | | | | | inside zend_constant.value.
* | Remove unused Git attributes identPeter Kokot2018-07-257-14/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The $Id$ keywords were used in Subversion where they can be substituted with filename, last revision number change, last changed date, and last user who changed it. In Git this functionality is different and can be done with Git attribute ident. These need to be defined manually for each file in the .gitattributes file and are afterwards replaced with 40-character hexadecimal blob object name which is based only on the particular file contents. This patch simplifies handling of $Id$ keywords by removing them since they are not used anymore.
* | Merge branch 'pull-request/3274'Stanislav Malyshev2018-06-192-8/+12
|\ \ | | | | | | | | | | | | | | | * pull-request/3274: Added const modifier 76363: added jsm extension to list of mime types
| * | Added const modifierpmukhin2018-06-062-2/+2
| | |
| * | 76363: added jsm extension to list of mime typespmukhin2018-06-062-8/+12
| | |
* | | Fix bug #44217: Output after stdout/stderr closed cause immediate exit with ↵Robert Lu2018-06-192-16/+7
| | | | | | | | | | | | | | | | | | status 0 We exit with status 255 instead.
* | | Remove old SVN keywords substitutionsPeter Kokot2018-06-162-4/+0
|/ / | | | | | | | | | | | | | | When the PHP source code was versioned in Subversion, there was possible to substitute certain keywords such as $Id$ with revision number, last change time and author name. Such approach is not used in Git so this patch removes these outdated artifacts from source code files.
* | Use zend_string_release_ex() instread of zend_string_release() in places, ↵Dmitry Stogov2018-05-281-7/+7
| | | | | | | | where we sure about string persistence.
* | Merge branch 'PHP-7.2'Anatol Belski2018-05-181-6/+12
|\ \ | |/ | | | | | | * PHP-7.2: Fix cli server test fails after recent AppVeyor image update
| * Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-05-181-6/+12
| |\ | | | | | | | | | | | | * PHP-7.1: Fix cli server test fails after recent AppVeyor image update
| | * Fix cli server test fails after recent AppVeyor image updateAnatol Belski2018-05-181-6/+12
| | |
* | | Merge branch 'PHP-7.2'Anatol Belski2018-05-131-1/+3
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Fixed bug #76333 PHP built-in server does not find files if root path contains special characters
| * | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-05-131-1/+3
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fixed bug #76333 PHP built-in server does not find files if root path contains special characters
| | * Fixed bug #76333 PHP built-in server does not find files if root path ↵Anatol Belski2018-05-131-1/+3
| | | | | | | | | | | | contains special characters
* | | No Content-Type header if MIME type is unknownMark Seuffert2018-04-141-8/+7
| | |
* | | Move constant array into read-only memoryDmitry Stogov2018-03-141-1/+1
| | |
* | | Use EXPECT instead of EXPECTF when possibleGabriel Caruso2018-02-2027-27/+27
| | | | | | | | | | | | EXPECTF logic in run-tests.php is considerable, so let's avoid it.
* | | Fix some misspellingsGabriel Caruso2018-02-061-1/+1
| | |
* | | Use bool instead of boolean while throwing a type errorGabriel Caruso2018-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PHP requires boolean typehints to be written "bool" and disallows "boolean" as an alias. This changes the error messages to match the actual type name and avoids confusing messages like "must be of type boolean, boolean given". This a followup to ce1d69a1f6dcf15d43029301059c25e5bc09a577, which implements the same change for integer->int.
* | | Use int instead of integer in type errorsGabriel Caruso2018-02-041-17/+17
| | | | | | | | | | | | | | | | | | | | | PHP requires integer typehints to be written "int" and does not allow "integer" as an alias. This changes type error messages to match the actual type name and avoids confusing messages like "must be of the type integer, integer given".
* | | Use bool instead of boolean in protoGabriel Caruso2018-02-041-1/+1
| | |
* | | Remove superfluous SKIPIF sections in more testsGabriel Caruso2018-02-043-15/+9
| | |
* | | Merge branch 'PHP-7.2'Nikita Popov2018-01-121-14/+16
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.1' into PHP-7.2Nikita Popov2018-01-121-14/+16
| |\ \ | | |/
| | * Revert "Fixed bug #75287 (Builtin webserver crash after chdir in a shutdown ↵Nikita Popov2018-01-121-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | function)" This reverts commit 816758eda2bcdd69ba505fb6bbb79124a7bf2254. After this commit relative router scripts were resolved against docroot rather than shell cwd.
* | | Merge branch 'PHP-7.2'Xinchen Hui2018-01-031-2/+2
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | * PHP-7.2: Happy new year (Update copyright to 2018) Conflicts: ext/phar/LICENSE
| * | Merge branch 'PHP-7.1' into PHP-7.2Xinchen Hui2018-01-031-2/+2
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Happy new year (Update copyright to 2018)
| | * Happy new year (Update copyright to 2018)Lior Kaplan2018-01-021-2/+2
| | |
| | * year++Xinchen Hui2018-01-029-10/+10
| | |
| * | year++Xinchen Hui2018-01-029-10/+10
| | |
* | | year++Xinchen Hui2018-01-029-10/+10
| | |
* | | Merge branch 'PHP-7.2'Nikita Popov2017-12-161-10/+11
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.1' into PHP-7.2Nikita Popov2017-12-161-10/+11
| |\ \ | | |/
| | * Move includes in ps_title.cDavid Carlier2017-12-161-10/+11
| | | | | | | | | | | | | | | | | | The HAVE_UNISTD_H check has to be after including config.h. Also include sys/types.h, which may be needed for setproctitle.