summaryrefslogtreecommitdiff
path: root/sapi/cgi
Commit message (Collapse)AuthorAgeFilesLines
* Change Zend Stream API to use zend_string* instead of char*.Dmitry Stogov2021-03-161-26/+19
| | | | | This allows to eliminate re-calculation of string lenght and hash value. See the detailed list of changes in UPGRADING.INTERNALS.
* Improve class entry generationMáté Kocsis2021-02-161-1/+0
| | | | Related to GH-6701
* Enable class entry generation for sapi extensionsMáté Kocsis2021-02-142-2/+3
|
* Replace zend_bool uses with boolNikita Popov2021-01-151-10/+10
| | | | | | | 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.
* Revert "Fix bug #64865: Use CONTEXT_DOCUMENT_ROOT for scanning dir tree"Nikita Popov2020-10-191-5/+2
| | | | | | | This reverts commit 98bfad738ad2734dfba5733323f7ba733daf3ec3. This doesn't work well in some setups, see bug #80113 and GH-5051. Reverting this for now.
* Run tidyNikita Popov2020-09-183-3/+3
| | | | | This should fix most of the remaining issues with tabs and spaces being mixed in tests.
* Add many missing closing PHP tags to testsMáté Kocsis2020-08-091-0/+1
| | | | Closes GH-5958
* Add stubs for SAPIsMáté Kocsis2020-07-103-18/+41
| | | | Closes GH-5295.
* Remove proto comments from C filesMax Semenik2020-07-061-16/+8
| | | | Closes GH-5758
* Simplify and fix php-cgi detectionNikita Popov2020-06-261-14/+11
| | | | Make it work for installed PHP binaries.
* Better leak fix for cgi -s / -wNikita Popov2020-06-261-7/+1
| | | | | | We also need to go through request shutdown. The naming is a bit confusing, but it's fine to go through fastcgi_request_done even if not using fastcgi. Whether we loop or not is checked separately.
* Fix leaks in cgi strip/highlight modeNikita Popov2020-06-251-5/+2
|
* Constify char * arguments of APIstwosee2020-06-081-6/+6
| | | | Closes GH-5676.
* Implement #47074: phpinfo() reports "On" as 1 for the some extensionsChristoph M. Becker2020-06-041-8/+8
| | | | What is modified as boolean, should also be displayed as boolean.
* Merge branch 'PHP-7.4'Christoph M. Becker2020-05-121-0/+4
|\ | | | | | | | | * PHP-7.4: Fix #79489: .user.ini does not inherit
| * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-05-121-0/+4
| |\ | | | | | | | | | | | | * PHP-7.3: Fix #79489: .user.ini does not inherit
| | * Fix #79489: .user.ini does not inheritChristoph M. Becker2020-05-121-0/+4
| | | | | | | | | | | | | | | On Windows, PATH_TRANSLATED may contain backslashes as well as slashes, so we must not only check for `DEFAULT_SLASH`.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-04-201-3/+3
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79491: Search for .user.ini extends up to root dir
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-04-201-3/+3
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #79491: Search for .user.ini extends up to root dir
| | * Fix #79491: Search for .user.ini extends up to root dirChristoph M. Becker2020-04-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `start` parameter of `php_cgi_ini_activate_user_config` is supposed to hold the byte offset of the doc root in the given `path`. However, the current expression which fixes a potential type incompatibility will ever only evaluate to zero or one, because it uses the *logical* and operator (`&&`). Furthermore we notice that subtracting one from `doc_root_len` is not necessary, so there is even no need for the `start` parameter at all.
* | | Remove return value from llist apply functionsNikita Popov2020-04-151-3/+2
| | | | | | | | | | | | Unlike the hash apply functions, these do not return int.
* | | Use separate typedef for bucket comparison functionNikita Popov2020-03-041-4/+1
| | | | | | | | | | | | | | | Avoid performing the same casting dance inside each sort compare function.
* | | Reindent phpt filesNikita Popov2020-02-038-78/+78
| | |
* | | Merge branch 'PHP-7.4'Nikita Popov2020-01-272-0/+45
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix bug #78323: Code 0 is returned on invalid options
| * | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-01-272-0/+45
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix bug #78323: Code 0 is returned on invalid options
| | * Fix bug #78323: Code 0 is returned on invalid optionsIvan Mikheykin2020-01-272-0/+45
| | | | | | | | | | | | | | | Set CLI exit code to 1 when invalid parameters are passed, and print error to stderr.
| | * Future-proof email addressesZeev Suraski2018-11-011-2/+2
| | |
| | * Trim trailing whitespace in *.phptPeter Kokot2018-10-1410-18/+18
| | |
| | * Sync leading and final newlines in source code filesPeter Kokot2018-10-141-1/+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-5/+5
| | |
| * | 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.
| * | Link executable files using non PIC object files. This reduces PIC overhead ↵Dmitry Stogov2019-09-071-1/+1
| | | | | | | | | | | | and improves performance.
* | | Fix bug #64865: Use CONTEXT_DOCUMENT_ROOT for scanning dir treewbender2020-01-241-2/+5
| | | | | | | | | | | | | | | | | | | | | If CONTEXT_DOCUMENT_ROOT is set use that rather than DOCUMENT_ROOT to scan up the dir tree looking for .user.ini files. Closes GH-5051.
* | | Fix #78880: Another bunch of spelling errorsMáté Kocsis2020-01-161-1/+1
| | |
* | | Use RETURN_THROWS() during ZPP in main, sapi, win32, and ZendMáté Kocsis2019-12-301-3/+3
| | |
* | | Clean DONE tags from testsFabien Villepinte2019-11-073-6/+0
| | | | | | | | | | | | | | | | | | | | | Remove most of the `===DONE===` tags and its variations. Keep `===DONE===` if the test output otherwise becomes empty. Closes GH-4872.
* | | Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-251-2/+0
| | | | | | | | | | | | Closes GH-4732.
* | | Link executable files using non PIC object files. This reduces PIC overhead ↵Dmitry Stogov2019-09-031-1/+1
|/ / | | | | | | and improves performance.
* | Fix bindpath mem leak in cgiDavid Carlier2019-07-241-0/+1
| | | | | | | | Closes GH-4451.
* | Remove duplicate socklen_t checkPeter Kokot2019-07-181-6/+0
| | | | | | | | | | | | - Use Autoconf's default AC_CHECK_TYPES Closes GH-4418
* | Introduce zend_stream_init_filename()Nikita Popov2019-07-161-5/+1
| | | | | | | | Avoid more ad-hoc initialization of zend_file_handle structures.
* | Introduce zend_stream_init_fp() APINikita Popov2019-07-161-6/+3
| | | | | | | | | | Reduce the amount of code that mucks around with zend_file_handle initialization.
* | Move shebang handling into the lexerNikita Popov2019-07-152-72/+10
| | | | | | | | | | | | | | | | | | | | 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.
* | CGI: Fix memory leak on error pathsDavid Carlier2019-07-091-3/+5
| |
* | Use PHP_VERSION for zend modulesPeter Kokot2019-06-091-1/+1
| | | | | | | | Closes #4147
* | [ci skip] Remove outdated fastcgi info in favor of the manualPeter Kokot2019-05-131-151/+0
| |
* | Normalize comments in *nix build system m4 filesPeter Kokot2019-05-121-8/+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
* | Remove checks for locale.h, setlocale, localeconvPeter Kokot2019-04-071-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-071-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Replace dirname(__FILE__) by __DIR__ in testsFabien Villepinte2019-03-158-9/+9
| |