summaryrefslogtreecommitdiff
path: root/sapi/cgi/cgi_main.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix bindpath mem leak in cgiDavid Carlier2019-07-241-0/+1
| | | | Closes GH-4451.
* 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-151-72/+1
| | | | | | | | | | 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
* 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
* 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-121-1/+3
|
* Update and fix remaining year ranges (2019)Peter Kokot2019-02-081-2/+2
| | | | | | 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-031-9/+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-301-1/+1
|
* Replace zend_hash_apply... with ZEND_HASH_FOREACH...Dmitry Stogov2018-12-191-8/+4
|
* Future-proof email addresses...Zeev Suraski2018-11-011-2/+2
|
* Trim trailing whitespace in source code filesPeter Kokot2018-10-131-3/+3
|
* Merge branch 'PHP-7.3'Christoph M. Becker2018-10-081-2/+2
|\ | | | | | | | | * PHP-7.3: Fix #76954: apache_response_headers removes last character from header name
| * Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2018-10-081-2/+2
| |\ | | | | | | | | | | | | * PHP-7.2: Fix #76954: apache_response_headers removes last character from header name
| | * Merge branch 'PHP-7.1' into PHP-7.2Christoph M. Becker2018-10-081-2/+2
| | |\ | | | | | | | | | | | | | | | | * PHP-7.1: Fix #76954: apache_response_headers removes last character from header name
| | | * Fix #76954: apache_response_headers removes last character from header namestodorovic2018-10-081-2/+2
| | | |
* | | | Merge branch 'PHP-7.3'Anatol Belski2018-10-031-3/+3
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.3: Avoid code duplication and don't miss env restore
| * | | Merge branch 'PHP-7.2' into PHP-7.3Anatol Belski2018-10-031-3/+3
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.2: Avoid code duplication and don't miss env restore
| | * | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-10-031-2/+2
| | |\ \ | | | |/ | | | | | | | | | | | | * PHP-7.1: Avoid code duplication and don't miss env restore
| | | * Avoid code duplication and don't miss env restoreAnatol Belski2018-10-031-2/+2
| | | |
* | | | Merge branch 'PHP-7.3'Anatol Belski2018-10-031-3/+18
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.3: Fixed bug #76948 Failed shutdown/reboot or end session in Windows
| * | | Merge branch 'PHP-7.2' into PHP-7.3Anatol Belski2018-10-031-3/+18
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.2: Fixed bug #76948 Failed shutdown/reboot or end session in Windows
| | * | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-10-031-1/+16
| | |\ \ | | | |/ | | | | | | | | | | | | * PHP-7.1: Fixed bug #76948 Failed shutdown/reboot or end session in Windows
| | | * Fixed bug #76948 Failed shutdown/reboot or end session in WindowsAnatol Belski2018-10-031-1/+16
| | | |
* | | | Fix localized error messages and memory leaksAnatol Belski2018-09-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FormatMessage API needs to LocalFree the delivered error messages. In cases where messages are delivered in non ASCII compatible encoding, the messages might be unreadable. This aligns the error message encoding with the encoding settings in PHP, the focus is UTF-8 as default. Initialize error buffer Avoid code duplication
* | | | Fix some misspellingsGabriel Caruso2018-08-121-1/+1
|/ / /
* | | Remove unused Git attributes identPeter Kokot2018-07-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Fixed bug #62596 add getallheaders (apache_request_headers) missing function ↵Remi Collet2018-07-051-50/+1
| | | | | | | | | | | | in FPM add sapi_add_request_header in public API (was add_request_header) fix arginfo for fastcgi_finish_request fucntion
* | | Fixed bug #75982 ($_SERVER mostly empty with default variables_order GPCS on ↵Dmitry Stogov2018-03-231-8/+10
| | | | | | | | | | | | FastCGI/CGI)
* | | Reduce var scopeAnatol Belski2018-02-161-15/+20
| | |
* | | Remove always true conditionAnatol Belski2018-02-161-4/+2
| | |
* | | Simplify declarationAnatol Belski2018-02-161-2/+1
| | |
* | | Fix some misspellingsGabriel Caruso2018-02-061-1/+1
| | |
* | | Merge branch 'PHP-7.2'Anatol Belski2018-01-131-1/+9
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Fix invalid free
| * | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-01-131-1/+9
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fix invalid free
| | * Fix invalid freeAnatol Belski2018-01-131-1/+9
| | |
| | * year++Xinchen Hui2018-01-021-3/+3
| | |
| * | year++Xinchen Hui2018-01-021-3/+3
| | |
* | | Trailing whitespacesGabriel Caruso2018-01-031-5/+5
| | | | | | | | | | | | Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
* | | year++Xinchen Hui2018-01-021-3/+3
| | |
* | | Move constants into read-only data segmentDmitry Stogov2017-12-141-1/+1
| | |
* | | Use array specific functionsDmitry Stogov2017-12-071-2/+2
| | |
* | | Merge branch 'PHP-7.2'Anatol Belski2017-11-281-0/+42
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Follow up on bug #75574 for FCGI side
| * | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2017-11-281-0/+42
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Follow up on bug #75574 for FCGI side
| | * Follow up on bug #75574 for FCGI sideAnatol Belski2017-11-281-0/+42
| | |
* | | Allow creating $_SERVER from $_ENV, but not $_ENV from $_SERVER.Dmitry Stogov2017-11-131-14/+10
|/ /