summaryrefslogtreecommitdiff
path: root/sapi/cgi
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.
* Link executable files using non PIC object files. This reduces PIC overhead ↵Dmitry Stogov2019-09-071-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
|
* 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
|
* Add AS_HELP_STRING to *nix build configure optionsPeter Kokot2019-03-071-2/+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
* Update and fix remaining year ranges (2019)Peter Kokot2019-02-082-4/+4
| | | | | | 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
|
* Clean up server-tests.php remainsChristoph M. Becker2018-11-231-0/+20
| | | | | | | | | | | | | | | | | | | | | | | sapi/tests/ has been introduced as a generic means to test different SAPIs[1]. run-tests2.php has later be renamed to server-tests.php and recently been dropped[2]. However, the sapi/tests/test00?.php test cases remained, even though they make no sense for run-tests.php, since they use an unsupported format for the `--ENV--` section and the completely unsupported `--HEADERS--` section, respectively. While these tests ran successfully under run-tests.php, that was only by accident, and they did not really test something useful. Therefore, we remove these tests altogether. sapi/tests/bug69487.phpt is actually a CGI test (CGI is enforced due to the `--POST--` section), so we move it to sapi/cgi/tests, which leaves sapi/tests/ empty. Thus, we also remove the sapi/ directory from run-tests.php. Finally, we remove the `--HEADERS--` and `--REQUEST--` sections from the list of allowed run-tests.php sections. [1] <http://git.php.net/?p=php-src.git;a=commit;h=b671380b6b5b6e1f4f235e810afa4199e989d2ba> [2] <http://git.php.net/?p=php-src.git;a=commit;h=4f36acb9e65935aa657f1f22e2320a401bdbdad3>
* Future-proof email addresses...Zeev Suraski2018-11-011-2/+2
|
* Trim trailing whitespace in testsGabriel Caruso2018-10-149-19/+19
|
* 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
|
* Merge branch 'PHP-7.3'Christoph M. Becker2018-10-082-2/+50
|\ | | | | | | | | * 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-082-2/+50
| |\ | | | | | | | | | | | | * 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-082-2/+50
| | |\ | | | | | | | | | | | | | | | | * 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-082-2/+50
| | | |
* | | | 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
* | | | Make more tests run on LinuxGabriel Caruso2018-08-281-5/+1
| | | |
* | | | Fix some misspellingsGabriel Caruso2018-08-121-1/+1
|/ / /
* | | Remove unused Git attributes identPeter Kokot2018-07-253-6/+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.
* | | 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)
* | | Use EXPECT instead of EXPECTF when possibleGabriel Caruso2018-02-204-4/+4
| | | | | | | | | | | | EXPECTF logic in run-tests.php is considerable, so let's avoid it.
* | | Reduce var scopeAnatol Belski2018-02-161-15/+20
| | |
* | | Remove always true conditionAnatol Belski2018-02-161-4/+2
| | |
* | | Simplify declarationAnatol Belski2018-02-161-2/+1
| | |
* | | Remove trailing whitespace in inc filesGabriel Caruso2018-02-101-1/+1
| | |
* | | Fix some misspellingsGabriel Caruso2018-02-061-1/+1
| | |