summaryrefslogtreecommitdiff
path: root/sapi/cli/php_cli_server.c
Commit message (Collapse)AuthorAgeFilesLines
* first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-115/+115
|
* Merge remote-tracking branch 'origin/master' into native-tlsAnatol Belski2014-12-051-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: (111 commits) Fix zend_fcall_info_arg*() to use ZVAL_COPY Fixed #65213 - cannot cast SplFileInfo to boolean add initial install switch to C travis project instead of PHP use the generic TRAVIS environment var to check for travis (see http://docs.travis-ci.com/user/ci-environment/) fix TS build add config option to target codegen architectures updated NEWS updated NEWS Fixed bug #55541 errors spawn MessageBox, which blocks test automation Get rid of duplicate handlers (ZEND_ADD_SPEC_TMP_TMP and ZEND_ADD_SPEC_VAR_VAR are absolutely the same). Use zend_string* for op_array->arg_info[]->name and op_array->arg_info[]->class_name. For internal functions we still use char*. Fixed __debugInfo() support Update UPGRADING for the new variadic functions, and re-sort. Improved POST INC/DEC make sure that we don't truncate the stack trace and cause false test failures when the test is executed in a directory with long path Missed closed folder mark Revert "Unecessary assignment" Fixed improper memory release Unecessary assignment ...
| * Fix php cli (-S option) inconsistent port parsingnil0x422014-11-301-2/+2
| | | | | | | | | | | | Add port range verification of listening port with -S option for the php cli. This fixes inconsistent listening port due to unverified cast from long to short with htons(3).
* | Merge remote-tracking branch 'origin/master' into native-tlsAnatol Belski2014-11-181-5/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: (398 commits) NEWS add test for bug #68381 Fixed bug #68381 Set FPM log level earlier during init proper dllexport move to size_t where zend_string is used internally fix some datatype mismatches return after the warning, to fix uninitialized salt usage fix datatype mismatches add missing type specifier fix datatype mismatches fix unsigned check "extern" shouldn't be used for definitions joined identical conditional blocks simplify fpm tests SEND_VAR_NO_REF optimization Add test for bug #68442 Add various tests for FPM - covering recent bugs (68420, 68421, 68423, 68428) - for UDS - for ping and status URI - for multi pool and multi mode Include small MIT FastCGI client library from https://github.com/adoy/PHP-FastCGI-Client Get rid of zend_free_op structure (use zval* instead). Get rid of useless TSRMLS arguments. Add new FPM test for IPv4/IPv6 ... Conflicts: win32/build/config.w32
| * fix var usage only when unistd.h availableAnatol Belski2014-11-101-0/+2
| |
| * cleanup unused variableAnatol Belski2014-11-101-1/+0
| |
| * do portable socket checksAnatol Belski2014-11-101-4/+4
| | | | | | | | also introduced a portable macro for that
* | moved most of the core to use static tsrm ls cache pointerAnatol Belski2014-10-151-0/+3
| | | | | | | | plus apache2handler, cli and cgi
* | bring back all the TSRMLS_FETCH() stuffAnatol Belski2014-10-151-1/+0
| | | | | | | | for better comparability with the mainstream
* | Merge remote-tracking branch 'origin/master' into native-tlsAnatol Belski2014-10-131-5/+35
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: fix several datatype mismatch warnings fix signed/unsigned mismatch warning more signed/unsigned mismatch fix fix signed/unsigned mismatch warning fix signed/unsigned mismatch fix some signed/unsigned mismatch missing include for strlen proto More fixes for array/object casts with temporary variables Fix array/object cast of refcounted tmp var Deref right value for compound assign ops
| * fix several datatype mismatch warningsAnatol Belski2014-10-131-5/+35
| |
* | cleanup direct tsrm_ls passingAnatol Belski2014-09-261-9/+1
| |
* | reworked the patch, less new stuff but workyAnatol Belski2014-09-251-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TLS is already used in TSRM, the way exporting the tsrm cache through a thread local variable is not portable. Additionally, the current patch suffers from bugs which are hard to find, but prevent it to be worky with apache. What is done here is mainly uses the idea from the RFC patch, but - __thread variable is removed - offset math and declarations are removed - extra macros and definitions are removed What is done merely is - use an inline function to access the tsrm cache. The function uses the portable tsrm_tls_get macro which is cheap - all the TSRM_* macros are set to placebo. Thus this opens the way remove them later Except that, the logic is old. TSRMLS_FETCH will have to be done once per thread, then tsrm_get_ls_cache() can be used. Things seeming to be worky are cli, cli server and apache. I also tried to enable bz2 shared and it has worked out of the box. The change is yet minimal diffing to the current master bus is a worky start, IMHO. Though will have to recheck the other previously done SAPIs - embed and cgi. The offsets can be added to the tsrm_resource_type struct, then it'll not be needed to declare them in the userspace. Even the "done" member type can be changed to int16 or smaller, then adding the offset as int16 will not change the struct size. As well on the todo might be removing the hashed storage, thread_id != thread_id and linked list logic in favour of the explicit TLS operations.
* | basic windows fixAnatol Belski2014-09-221-2/+0
| |
* | Merge remote-tracking branch 'origin/master' into native-tlsAnatol Belski2014-09-221-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: (24 commits) added a comment fix the REPARSE_DATA_BUFFER struct def simplify the condition Fix two memory errors by interning earlier Add smart_str_append for appending zend_strings Rename smart_str_append to smart_str_append_smart_str Use smart_str for exception stack traces Use smart_str in get_function_declaration Move smart_str implementation into Zend/ UPGRADING for Integer Semantics Fixed bug #66242 (don't assume char is signed) Fixed bug #67633 Fixed if/else if ordering Use SIZEOF_ZEND_LONG instead of SIZEOF_LONG Use zend_ polyfilled nan/finite, check finite Updated 32-bit << test Updated << 64-bit tests Prevent bit shift count wrapping quirkiness on some CPUs for left shift Cast NaN and Infinity to zero Updated >> 64-bit tests ...
| * Move smart_str implementation into Zend/Nikita Popov2014-09-211-1/+1
| | | | | | | | | | | | | | | | So we can use it there as well... For now I've retained the zend_smart_str_public.h header, though it would probably be better to just move that one struct into zend_types.h.
* | fix wrong doingskrakjoe2014-09-201-2/+4
| |
* | native tls initial patchkrakjoe2014-09-201-6/+3
|/
* Make number printing functions less genericNikita Popov2014-09-191-5/+5
| | | | | | | | | | | | | | | | | Now that zend_ulong is 64bit on 64bit platforms, it should be sufficient to always use it, rather than supporting multiple types. API changes: * _zend_print_unsigned_to_buf and _zend_print_signed_to_buf no longer exist. * smart_str(ing)_print_long and smart_str(ing)_print_unsigned no longer exist. * Instead of all these, zend_print_ulong_to_buf and zend_print_long_to_buf should be used. * smart_str_append_generic_ex no longer exists. * smart_str(ing)_append_off_t(_ex) no longer exists, use smart_str(ing)_append_long(_ex) instead.
* Use inline functions for most of smart_strNikita Popov2014-09-191-2/+2
| | | | | | | smart_str_free_ex no longer exists, always use smart_str_free instead. smart_str_alloc no longer requires a newlen variable to be in scope, instead it returns the new length.
* s/PHP 5/PHP 7/Johannes Schlüter2014-09-191-1/+1
|
* master renames phase 4Anatol Belski2014-08-251-3/+3
|
* master renames phase 3Anatol Belski2014-08-251-6/+6
|
* master renames phase 1Anatol Belski2014-08-251-6/+6
|
* fix macros in the 5 basic extensionsAnatol Belski2014-08-161-16/+16
|
* cleanupDmitry Stogov2014-08-131-8/+5
|
* cleanup (use zend_string* instead of char*)Dmitry Stogov2014-08-131-11/+13
|
* Merge branch 'master' into phpngDmitry Stogov2014-07-141-4/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (40 commits) Bug #67609: TLS connections fail behind HTTP proxy Updated NEWS for #67594 Updated NEWS for #67594 Fix #67594 - invisible colon should be stripped off header name Updated NEWS for 34407 Updated NEWS for 34407 Updated NEWS for 34407 Fix for bug #34407 - ucwords and title case fixed broken merged code Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index. fixed broken merged code Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index. Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index. Fixed a bug that cannot access custom request header stored in apache_request_headers() though array index. Test output relies on expose_php being on 1.2 is a problematic float to print out Lower the default display precision for this test The test output is dependent on expose_php ini fix makefile in phpize mode fixe output_as_table() when no ext was enabled fix end of stream exception when generating makefile ... Conflicts: ext/standard/http_fopen_wrapper.c ext/standard/string.c sapi/cli/php_cli_server.c
| * Merge branch 'PHP-5.6'Tjerk Meesters2014-07-121-4/+8
| |\
| | * Merge branch 'PHP-5.5' into PHP-5.6Tjerk Meesters2014-07-121-4/+8
| | |\
| | | * Fix #67594 - invisible colon should be stripped off header nameTjerk Meesters2014-07-121-4/+8
| | | |
* | | | Merge branch 'master' into phpngDmitry Stogov2014-07-081-4/+3
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Fix still broken session test. Only return true/false. Fixed bug #66830 (Empty header causes PHP built-in web server to hang). Followup fix to custom session save handlers create locales and re-add test rm test for now Conflicts: ext/session/tests/session_set_save_handler_class_012.phpt
| * | | Merge branch 'PHP-5.6'Adam Harvey2014-07-071-4/+3
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-5.6: Fixed bug #66830 (Empty header causes PHP built-in web server to hang).
| | * | Merge branch 'PHP-5.5' into PHP-5.6Adam Harvey2014-07-071-4/+3
| | |\ \ | | | |/ | | | | | | | | | | | | * PHP-5.5: Fixed bug #66830 (Empty header causes PHP built-in web server to hang).
| | | * Merge branch 'PHP-5.4' into PHP-5.5Adam Harvey2014-07-071-4/+3
| | | |\ | | | | | | | | | | | | | | | | | | | | * PHP-5.4: Fixed bug #66830 (Empty header causes PHP built-in web server to hang).
| | | | * Fixed bug #66830 (Empty header causes PHP built-in web server to hang).Adam Harvey2014-07-071-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We had an infinite loop in sapi_cli_server_send_headers(): while iterating over the linked list of headers, when an empty header was hit, continue would go to the next iteration of the loop without updating h to be the next value in the linked list. Updating it to always increment regardless of whether the header is actually valid or not fixes the issue.
* | | | | Merge branch 'master' into phpngDmitry Stogov2014-06-181-0/+2
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (41 commits) Update copyright year to 2014 Update copyright year to 2014 Update copyright year to 2014 Update copyright year to 2014 Update copyright year to 2014 Update copyright year to 2014 Update copyright year to 2014 NEWS Fix Request #67453 Allow to unserialize empty data. Update copyright year to 2014 Update copyright year for re2c generated files Update copyright year to 2014 Update copyright year for re2c files as well Fix patch for bug #67436 fix failed test Fix test on modern distro where old unsecure algo are disabled in openssl config. Testing recent algo should be enough to check this function. Added tests for bug 67436 Fixed wrong XFAIL test - already fixed Fix typo in Bug #67406 NEWS entry Fix typo in Bug #67406 NEWS entry ... Conflicts: Zend/zend_compile.c ext/session/session.c ext/standard/array.c ext/standard/http_fopen_wrapper.c tests/classes/bug63462.phpt
| * | | | Merge branch 'PHP-5.6'Adam Harvey2014-06-121-0/+2
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | * PHP-5.6: Add 308 and 426 to the HTTP response code map in the CLI server.
| | * | | Merge branch 'PHP-5.5' into PHP-5.6Adam Harvey2014-06-121-0/+2
| | |\ \ \ | | | |/ / | | | | | | | | | | | | | | | * PHP-5.5: Add 308 and 426 to the HTTP response code map in the CLI server.
| | | * | Merge branch 'PHP-5.4' into PHP-5.5Adam Harvey2014-06-121-0/+2
| | | |\ \ | | | | |/ | | | | | | | | | | | | | | | * PHP-5.4: Add 308 and 426 to the HTTP response code map in the CLI server.
| | | | * Add 308 and 426 to the HTTP response code map in the CLI server.Adam Harvey2014-06-121-0/+2
| | | | | | | | | | | | | | | | | | | | Implements FR #67429 (CLI server is missing some new HTTP response codes).
* | | | | Merge branch 'master' into phpngDmitry Stogov2014-06-121-78/+32
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: (77 commits) NEWS entry for Fix potential segfault in dns_get_record() NEWS entry for "Fix potential segfault in dns_get_record()" NEWS entry for Fix potential segfault in dns_get_record( Fix potential segfault in dns_get_record() Revert "Add optional second arg to unserialize()" 5.5.15 now update NEWS Fix bug #66127 (Segmentation fault with ArrayObject unset) 5.4.31 next Add NEWS. This doesn't need UPGRADING (or an RFC), IMO. Fix broken test. Add a mime type map generation script and update the header. Move the mime type map out of php_cli_server.c for easier generation. Replace the CLI server's linear search for extensions with a hash table. fix test Remove unused included file NEWS NEWS NEWS Fixed Bug #67413 fileinfo: cdf_read_property_info insufficient boundary chec ... Conflicts: Zend/zend_closures.c Zend/zend_execute.c Zend/zend_vm_def.h Zend/zend_vm_execute.h ext/spl/spl_array.c ext/standard/basic_functions.c ext/standard/dns.c ext/standard/var.c
| * | | | Move the mime type map out of php_cli_server.c for easier generation.Adam Harvey2014-06-111-63/+1
| | | | |
| * | | | Replace the CLI server's linear search for extensions with a hash table.Adam Harvey2014-06-101-8/+34
| | | | | | | | | | | | | | | | | | | | | | | | | This doesn't make a statistically significant performance impact either way today, but gives us more scope to grow the MIME type list.
| * | | | Merge branch 'PHP-5.6'Remi Collet2014-06-101-5/+3
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.6: NEWS NEWS Fixed bug #67406 built-in web-server segfaults on startup
| | * | | fix merge from php 5.5 (already fixed, differently)Remi Collet2014-06-101-5/+3
| | |\ \ \ | | | |/ /
| | | * | Merge branch 'PHP-5.4' into PHP-5.5Remi Collet2014-06-101-3/+3
| | | |\ \ | | | | |/ | | | | | | | | | | | | | | | | | | | | * PHP-5.4: NEWS Fixed bug #67406 built-in web-server segfaults on startup
| | | | * Fixed bug #67406 built-in web-server segfaults on startupRemi Collet2014-06-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reproduce on aarch64. From select man page: "select() may update the timeout argument to indicate how much time was left." So "const" is not ok.
| | | | * Bump yearXinchen Hui2014-01-031-1/+1
| | | | |
* | | | | Split IS_BOOL into IS_FALSE and IS_TRUEDmitry Stogov2014-04-301-1/+1
| | | | |