Commit Graph

3083 Commits

Author SHA1 Message Date
Adam Harvey
604de67b7d Fixed bug #66830 (Empty header causes PHP built-in web server to hang).
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.
2014-07-07 20:36:06 +00:00
Ferenc Kovacs
af9ce6e650 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  remove the NEWS entry for the reverted fpm fix
  Revert "Fix Bug #67530 	error_log=syslog ignored"
2014-06-30 18:38:15 +02:00
Ferenc Kovacs
9c8b42960d Revert "Fix Bug #67530 error_log=syslog ignored"
This reverts commit a0ecb3794f.
2014-06-30 18:37:23 +02:00
Remi Collet
13c5bb9600 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  Fix Bug #67531 	syslog cannot be set in pool configuration
  Fix Bug #67530 	error_log=syslog ignored
2014-06-27 09:50:27 +02:00
Remi Collet
bf328b1681 Fix Bug #67531 syslog cannot be set in pool configuration
error_log is listed in FPM_PHP_INI_TO_EXPAND,
but should not be expand when value = syslog
2014-06-27 09:47:28 +02:00
Remi Collet
a0ecb3794f Fix Bug #67530 error_log=syslog ignored
As for Bug #64915
Systemd use --nodaemonize but need to error_log to file or syslog to be honoured
2014-06-27 09:45:53 +02:00
Lior Kaplan
d2bdedbcfc Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Update copyright year to 2014
  Update copyright year to 2014
2014-06-18 00:11:35 +03:00
Lior Kaplan
945938d33c Update copyright year to 2014 2014-06-17 23:56:46 +03:00
Adam Harvey
e956ba9357 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Add 308 and 426 to the HTTP response code map in the CLI server.
2014-06-12 17:56:10 -07:00
Adam Harvey
fe67674809 Add 308 and 426 to the HTTP response code map in the CLI server.
Implements FR #67429 (CLI server is missing some new HTTP response codes).
2014-06-12 17:54:29 -07:00
Remi Collet
d440bb3e68 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  Fixed bug #67406 built-in web-server segfaults on startup
2014-06-10 10:32:26 +02:00
Remi Collet
58c6a08e00 Fixed bug #67406 built-in web-server segfaults on startup
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.
2014-06-10 10:28:34 +02:00
Stanislav Malyshev
770fcdab90 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #67060: use default mode of 660
2014-04-29 09:15:23 -07:00
Stanislav Malyshev
35ceea928b Fix bug #67060: use default mode of 660 2014-04-29 09:14:11 -07:00
Stanislav Malyshev
6bad228b4e Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix #66908: php-fpm reload leaks epoll_create() file descriptor
2014-04-20 16:23:43 -07:00
Julio Pintos
49341e992a Fix #66908: php-fpm reload leaks epoll_create() file descriptor
This patch fixes descriptor leak which could lead to DoS once Max open files is reached
2014-04-20 16:21:49 -07:00
Anatol Belski
9eb726b3ab Fixed bug #67079 Missing MIME types for XML/XSL files 2014-04-16 09:47:49 +02:00
Stanislav Malyshev
5811610d71 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #66482, replace wrong item name 'priority' with 'process.priority' in php-fpm.conf
2014-04-13 17:31:44 -07:00
itxx00
636adf251c Fix bug #66482, replace wrong item name 'priority' with 'process.priority' in php-fpm.conf 2014-04-13 17:30:50 -07:00
Stanislav Malyshev
c5275b4a92 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix apr_psprintf format string from e0df4e3dba
2014-04-13 15:37:55 -07:00
Jeff Trawick
442264ffd6 fix apr_psprintf format string from e0df4e3dba 2014-04-13 15:36:43 -07:00
Anatol Belski
76066b304c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  updated NEWS
  Fixed bug #65715 php5embed.lib isn't provided anymore
2014-03-24 10:28:48 +01:00
Anatol Belski
17a57ad980 Fixed bug #65715 php5embed.lib isn't provided anymore 2014-03-24 10:24:37 +01:00
Remi Collet
5fc7382a57 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  man page: long option name is --strip, not --stripped
  --global have be removed in 5.2
2014-02-28 08:12:16 +01:00
Remi Collet
b1df743b7a man page: long option name is --strip, not --stripped 2014-02-28 08:12:03 +01:00
Remi Collet
c73b0543f1 --global have be removed in 5.2 2014-02-28 08:10:01 +01:00
Paul Annesley
eb6941e902 add clear_env option to FPM config
This makes it possible to leave the envoronment as is on startup and
pass all the variables to the workers.
The default value of clear_env is "yes", preserving previous behaviour.
Patch by Paul Annesley.
2014-02-25 12:12:09 +04:00
Paul Annesley
6e15afd1be add clear_env option to FPM config
This makes it possible to leave the envoronment as is on startup and
pass all the variables to the workers.
The default value of clear_env is "yes", preserving previous behaviour.
Patch by Paul Annesley.
2014-02-25 12:06:32 +04:00
Xinchen Hui
47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Xinchen Hui
c0d060f5c0 Bump year 2014-01-03 11:04:26 +08:00
Julien Pauli
ff20a9019d Fixed a wrong test 2013-11-26 17:43:31 +01:00
Andrea Faulds
9937e2fda5 Merge branch 'CLIGetAllHeadersBackport' into PHP-5.5
* CLIGetAllHeadersBackport:
  Removed UPGRADING note
  Rewrote test using tcp instead of http:// stream
  Implemented FR #65917 (getallheaders() is not supported by the built-in...)
2013-11-18 21:19:07 +00:00
Christopher Jones
d0cd112702 This is CLI web server change. Added some common MIME types to the
existing lookup list, pending a more thorough lookup solution, if
anyone wants to do that.  Ref http://news.php.net/php.internals/69990

A router can be used to add to, or override, the MIME type lookups,
see http://php.net/manual/en/features.commandline.webserver.php
2013-11-15 12:36:25 -08:00
Andrea Faulds
a3f5b9f62d Rewrote test using tcp instead of http:// stream 2013-11-12 20:27:38 +00:00
Andrea Faulds
aee271ec0d Implemented FR #65917 (getallheaders() is not supported by the built-in...)
- Implemented apache_request_headers() and getallheaders() alias in CLI server
- Implemented apache_response_headers() in CLI server using FastCGI code

Conflicts:
	NEWS
	UPGRADING
2013-11-12 20:27:34 +00:00
Rasmus Lerdorf
812dfbc431 Fix bug #66008 2013-10-31 03:18:07 -07:00
Rasmus Lerdorf
b4bed6fde0 Fix bug #66008 2013-10-31 03:06:35 -07:00
Antony Dovgal
9765763413 increase backlog to the highest value everywhere
It makes no sense to use -1 for *BSD (which is the highest value there)
and still use 128 for Linux.
Lets raise it right to up the limit and let the people lower it if they
think that 3.5Mb is too much for a process.
IMO this is better than silently dropping connections.
2013-10-27 22:54:47 +04:00
Rasmus Lerdorf
9e4651f6f1 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix typo
2013-10-20 17:56:14 -07:00
Rasmus Lerdorf
18cc5386de Fix typo 2013-10-20 17:55:55 -07:00
Rasmus Lerdorf
26b27767a6 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Initialize these to make Coverity happy
  Typo fix: managment -> management
  Use minus sign instead of hyphen
  Merge branch 'pull-request/499' Fix RFC 6598 IPv4 Reserved Range Checks
2013-10-19 17:41:04 -07:00
Rasmus Lerdorf
813e867652 Initialize these to make Coverity happy 2013-10-19 17:37:59 -07:00
Lior Kaplan
a55d3b9295 Typo fix: managment -> management 2013-10-19 23:53:23 +03:00
Lior Kaplan
df501fd464 Use minus sign instead of hyphen 2013-10-19 23:52:43 +03:00
Felipe Pena
93f3ba66a7 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - Fixed bug #65818 (Segfault with built-in webserver and chunked transfer encoding)
  - BFN
2013-10-05 12:53:10 -03:00
Felipe Pena
3aaee86ee3 - Fixed bug #65818 (Segfault with built-in webserver and chunked transfer encoding) 2013-10-05 12:52:55 -03:00
Dmitry Stogov
51fca2b4b3 Reverted patch (it was used for internal testing and was committed by accident) 2013-10-01 11:32:11 +04:00
Dmitry Stogov
f904830012 Added support for GNU Hurd. (Svante Signell) 2013-09-27 13:43:25 +04:00
Anatol Belski
8f146c2bb0 Fixed bug #65678 the test cli_process_title_windows will fails on particular environnement
Patch by Pierre Renaudet
2013-09-20 15:59:33 +02:00
Christopher Jones
dfa43d55dd Added application/pdf to PHP CLI Web Server mime types. 2013-09-19 20:22:50 -07:00
Adam Harvey
8b6270271e Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Handle CLI server request headers case insensitively.
  5.4.21 now

Conflicts:
	configure.in
	main/php_version.h
2013-09-09 16:32:16 -07:00
Adam Harvey
3c3b2b5bdc Handle CLI server request headers case insensitively.
Fixes bug #65633 (built-in server treat some http headers as case-sensitive).
2013-09-09 16:24:49 -07:00
Christopher Jones
39612afc72 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings.

Conflicts:
	ext/dba/libinifile/inifile.c
2013-08-14 20:43:25 -07:00
Christopher Jones
9ad97cd489 Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings. 2013-08-14 20:36:50 -07:00
Michael Heimpold
36b759d1dd Fix #61345: fix install of CGI binary
When CLI was not built but only CGI binary, then a sequence of

$ ./buildconf
$ ./configure  --prefix=/usr/local/phpcgi --disable-cli
$ make -j8
$ sudo rm -rf /usr/local/phpcgi
$ sudo make install

results in the following error:

/bin/bash /srv/smb/php-src.test/libtool --silent --preserve-dup-deps --mode=install cp ext/opcache/opcache.la /srv/smb/php-src.test/modules
Installing shared extensions:     /usr/local/phpcgi/lib/php/extensions/no-debug-non-zts-20121212/
Installing PHP CGI binary:        /usr/local/phpcgi/bin/
cp: cannot create regular file `/usr/local/phpcgi/bin/#INST@28245#': No such file or directory
make: *** [install-cgi] Fehler 1

The solution is to create the binary directory before copying the
CGI binary as e.g. CLI does.

Signed-off-by: Oliver Metz <oliver.metz@gmx.de>

[extensive commit message]

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2013-08-10 17:35:09 -07:00
Stanislav Malyshev
3f99ba6351 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix #61345: fix install of CGI binary
2013-08-10 17:33:28 -07:00
Michael Heimpold
cdedee3fa1 Fix #61345: fix install of CGI binary
When CLI was not built but only CGI binary, then a sequence of

$ ./buildconf
$ ./configure  --prefix=/usr/local/phpcgi --disable-cli
$ make -j8
$ sudo rm -rf /usr/local/phpcgi
$ sudo make install

results in the following error:

/bin/bash /srv/smb/php-src.test/libtool --silent --preserve-dup-deps --mode=install cp ext/opcache/opcache.la /srv/smb/php-src.test/modules
Installing shared extensions:     /usr/local/phpcgi/lib/php/extensions/no-debug-non-zts-20121212/
Installing PHP CGI binary:        /usr/local/phpcgi/bin/
cp: cannot create regular file `/usr/local/phpcgi/bin/#INST@28245#': No such file or directory
make: *** [install-cgi] Fehler 1

The solution is to create the binary directory before copying the
CGI binary as e.g. CLI does.

Signed-off-by: Oliver Metz <oliver.metz@gmx.de>

[extensive commit message]

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2013-08-10 17:33:24 -07:00
Christopher Jones
c6d977dd39 Fix long-standing visual pain point: the misalignment of './configure help' text.
Whitespace changes and a couple of grammar fixes.
2013-08-06 11:06:09 -07:00
Stanislav Malyshev
c793a65690 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  non living code related typo fixes

Conflicts:
	Zend/zend_compile.c
2013-08-04 16:06:24 -07:00
Veres Lajos
8d86597d73 non living code related typo fixes 2013-08-04 16:05:36 -07:00
Veres Lajos
4749457a49 HASH_KEY_NON_EXISTANT fix 2013-07-21 20:09:53 -07:00
Veres Lajos
e9a95d78ef typo fixes 2013-07-15 00:23:03 -07:00
Veres Lajos
72085b0e5f typo fixes 2013-07-15 00:18:57 -07:00
Stanislav Malyshev
9cc9d32e6a Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Add built-in web server to invocation list
  Terminology: change embedded web server to built-in web server to align with cli usage
  Align -B and -E parameter names with cli usage (begin_code and end_code)
  Fix Bug #65219 DBSETLDBNAME should be called before login to set DBNAME in login record
2013-07-14 17:01:43 -07:00
Lior Kaplan
f4b9b20b35 Add built-in web server to invocation list 2013-07-14 17:00:56 -07:00
Lior Kaplan
bcef0ebc2d Terminology: change embedded web server to built-in web server to align with cli usage 2013-07-14 16:42:23 -07:00
Lior Kaplan
07501dc1a2 Align -B and -E parameter names with cli usage (begin_code and end_code) 2013-07-14 16:42:09 -07:00
Remi Collet
1aeb2514fe Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix typo in php man page
2013-07-02 12:19:37 +02:00
Remi Collet
67817a199c fix typo in php man page 2013-07-02 12:19:09 +02:00
Remi Collet
8f0567581e Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed Bug #65142 Missing phar man page
  NEWS
  Fixed Bug #65143 Missing php-cgi man page
2013-07-02 10:47:38 +02:00
Remi Collet
c940aab789 Fixed Bug #65143 Missing php-cgi man page
Currently php-cgi man page is a simple redirect to
php (CLI) man page.

Could be splited / improved in the future.
2013-07-02 10:42:47 +02:00
Arnaud Le Blanc
18f45c535b Added PHP_FCGI_BACKLOG, overrides the default listen backlog 2013-06-29 17:52:04 +02:00
Felipe Pena
efbf573e9f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  - BFN
  - Fixed bug #63983 (enabling FPM borks compile on FreeBSD) patch by: chibisuke at web dot de
2013-06-26 15:08:51 -03:00
Felipe Pena
cd176e0452 - Fixed bug #63983 (enabling FPM borks compile on FreeBSD) patch by: chibisuke at web dot de 2013-06-26 15:06:27 -03:00
Adam Harvey
77c46ba516 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix the spelling of the php_cli_server_http_response_status_code_pair typedef.
  Change the search in get_status_string() to correctly handle unknown codes.
2013-06-20 09:39:37 -07:00
Adam Harvey
f5c7fe9202 Fix the spelling of the php_cli_server_http_response_status_code_pair typedef.
Specifically: php_cli_server_http_reponse_status_code_pair →
php_cli_server_http_response_status_code_pair.
2013-06-20 09:34:21 -07:00
Adam Harvey
283f56af66 Change the search in get_status_string() to correctly handle unknown codes.
This previously used a buggy implementation of binary search that would loop
infinitely for unknown codes when searching in reason arrays of particular
sizes (such as the one we have at the moment). Since C provides bsearch(),
we'll just use that instead, since libc authors hopefully get this right.

There was also an additional bug that was masked by the first one: the design
was that an unknown code would result in get_status_string() returning NULL,
which would then result in a segfault in append_http_status_line(), since it
assumed that it would always receive a valid string pointer that could be
handed off to smart_str_appends_ex(). We'll now return a placeholder in that
case.

Fixes bug #65066 (Cli server not responsive when responding with 422 http
status code).
2013-06-20 09:31:57 -07:00
Stanislav Malyshev
a770ae36c2 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #64764: Add status option to fpm init.d script
2013-06-16 16:56:29 -07:00
Lior Kaplan
ee01af7df1 Fix bug #64764: Add status option to fpm init.d script 2013-06-16 16:54:49 -07:00
Stanislav Malyshev
02e4d7a290 Merge branch 'pull-request/341'
* pull-request/341: (23 commits)
  typofixes
2013-06-10 14:30:59 -07:00
Stanislav Malyshev
ac40c0b562 Merge branch 'pull-request/341'
* pull-request/341: (23 commits)
  typofixes
2013-06-10 14:20:18 -07:00
Stanislav Malyshev
84e35fb2e0 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  typo fixes (argument)
  typo fixes (accommodate, parameter)
2013-06-10 13:36:41 -07:00
Veres Lajos
04145dc2aa typo fixes (argument) 2013-06-10 13:36:17 -07:00
Veres Lajos
ed2e84e239 typo fixes (accommodate, parameter) 2013-06-10 13:36:03 -07:00
Remi Collet
433731d463 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed Bug #64915 (error_log ignored when daemonize=0)
2013-05-24 12:10:39 +02:00
Remi Collet
9f6ca9bc64 Fixed Bug #64915 (error_log ignored when daemonize=0)
Use configured error_log file when stderr is not a tty.
So only use tty during interactive debug run.
2013-05-24 12:09:05 +02:00
Remi Collet
c79f162c37 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Add --with-fpm-systemd option to report health to systemd, and systemd_interval option to configure this. The service can now use Type=notify in the systemd unit file.
2013-05-21 09:53:51 +02:00
Remi Collet
0e99329e0a Add --with-fpm-systemd option to report health to systemd, and
systemd_interval option to configure this. The service can now use
Type=notify in the systemd unit file.

Systemd status line will looks like:
Status: "Processes active: 0, idle: 5, Requests: 90, slow: 0, Traffic: 10req/sec"

Watchdog mode is also supported. In this case watchdog interval,
configured in the unit file, override the systemd_interval option.

When not used (default), no change from previous version.
2013-05-21 09:49:00 +02:00
Remi Collet
c9085837a9 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  From code coverity scan, syscall return value must be check.
2013-05-03 08:23:07 +02:00
Remi Collet
3fd4b6be63 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  From code coverity scan, syscall return value must be check.
2013-05-03 08:22:55 +02:00
Remi Collet
0549e55d82 From code coverity scan, syscall return value must be check.
To not alter current behaviour, we simply log the problem,
so, if it occurs, the message will give explanation.

This are only warning as they don't block the server,
but such fail can explain strange (not expected) behaviour later.
2013-05-03 08:19:14 +02:00
Remi Collet
6494faa844 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix more resource leaks
2013-05-02 13:47:48 +02:00
Remi Collet
b7b150b830 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix more resource leaks
2013-05-02 13:47:36 +02:00
Remi Collet
444e59eb20 fix more resource leaks 2013-05-02 13:47:24 +02:00
Remi Collet
a3e177b9fd Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  From code coverity scan - fix some memory leak - fix some resources leak (fd) - create fpm_worker_pool_free (shared use) - possible null dref (wp->user and wp->home can be null)
2013-05-02 13:31:22 +02:00
Remi Collet
08b72ac9f1 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  From code coverity scan - fix some memory leak - fix some resources leak (fd) - create fpm_worker_pool_free (shared use) - possible null dref (wp->user and wp->home can be null)
2013-05-02 13:31:11 +02:00
Remi Collet
331540d20c From code coverity scan
- fix some memory leak
- fix some resources leak (fd)
- create fpm_worker_pool_free (shared use)
- possible null dref (wp->user and wp->home can be null)
2013-05-02 13:27:16 +02:00
Remi Collet
eb53035a80 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fixed size array cannot be null
2013-05-02 10:33:05 +02:00
Remi Collet
c374b80dda Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fixed size array cannot be null
2013-05-02 10:32:54 +02:00
Remi Collet
d0c40220d1 fixed size array cannot be null 2013-05-02 10:32:45 +02:00