Commit Graph

615 Commits

Author SHA1 Message Date
Remi Collet
8cac75969e Fixed bug #65641 PHP-FPM incorrectly defines the SCRIPT_NAME variable when using Apache
ProxyPass is unable to provide correct PATH_INFO
as it is not aware of file path (while SetHandler is).

As we can extract PATH_INFO from PATH_TRANSLATED,
we also need to check if present in SCRIPT_NAME
and remove it.

After applying this patch.
With mod_php
_SERVER["REQUEST_URI"]     /info.php/foo/bar?q=1
_SERVER["SCRIPT_NAME"]     /info.php
_SERVER["PATH_INFO"]       /foor/bar
_SERVER["PHP_SELF"]        /info.php/foo/bar
_SERVER["QUERY_STRING"]    q=1

With mod_proxy_fcgi + SetHandler
_SERVER["REQUEST_URI"]     /info.php/foo/bar?q=1
_SERVER["SCRIPT_NAME"]     /info.php
_SERVER["PATH_INFO"]       /foo/bar
_SERVER["PHP_SELF"]        /info.php/foo/bar
_SERVER["QUERY_STRING"]    q=1

With mod_proxy_fcgi + ProxyPass
_SERVER["REQUEST_URI"]     /info.php/foo/bar?q=1
_SERVER["SCRIPT_NAME"]     /info.php
_SERVER["PATH_INFO"]       /foo/bar
_SERVER["PHP_SELF"]        /info.php/foo/bar
_SERVER["QUERY_STRING"]    q=1
2014-09-15 13:29:55 +02:00
Dmitry Stogov
88d7ca44f6 Refactored INI subsystem to use zend_string* instead of char* 2014-09-01 20:57:33 +04:00
Stanislav Malyshev
e55c641792 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix NEWS for fcgi fix merge
  restore FPM compatibility with mod_fastcgi broken since #694 / 67541, fixes bug 67606
2014-08-28 23:11:55 -07:00
David Zuelke
ee275e34c8 restore FPM compatibility with mod_fastcgi broken since #694 / 67541, fixes bug 67606 2014-08-28 23:06:00 -07:00
Xinchen Hui
df7b6779bc Fixed incompatible pointer type (int64) 2014-08-26 12:11:28 +08:00
Nikita Popov
59848e3fbb Remove ZEND_ACC_INTERACTIVE and CG(interactive)
As far as I can discern these are leftovers of the interactive
shell implementation that was used before PHP 5.4. Now the readline
ext makes use of normal eval calls for this.

So, dropping these until there is evidence to the contrary, as they
currently wouldn't work anyway.
2014-08-25 23:46:43 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
07359785c3 Merge remote-tracking branch 'php/master' 2014-08-20 08:48:43 +02:00
Tjerk Meesters
285934a4c9 Fixed off-by-one memory allocation that could lead to invalid memory reads on strlen()
Always properly null terminate strings before ini parsing
Remove unnecessary memset() statements
2014-08-20 12:13:19 +08:00
Andrea Faulds
376e545b01 Merge branch 'fpmConfFix' of github.com:DaveRandom/php-src 2014-08-20 00:28:43 +01:00
Anatol Belski
63d3f0b844 basic macro replacements, all at once 2014-08-19 08:07:31 +02:00
Dmitry Stogov
7497c8793d Merge branch 'master' into phpng
* master: (51 commits)
  Update Git rules
  Back to -dev (with EOL notice in NEWS)
  new NEWS block for the next release
  It's 2014 already, fix copyright year where user visible
  PHP 5.3.29
  Some changes were lost in the merge commit of #66091
  Updated NEWS for #66091
  Fixed #66091
  Updated NEWS for #66091
  Updated NEWS for #66091
  Fixed #66091
  updated NEWS
  updated NEWS
  updated NEWS
  backported the fix for bug #41577
  NEWS entry for e6d93a1 / d73d44c
  restore FPM compatibility with mod_fastcgi broken since #694 / 67541, fixes bug 67606
  Revert "Merge branch 'pull-request/694' into PHP-5.6"
  PHP 5.3.29RC1
  Fix missing type checks in various functions
  ...

Conflicts:
	ext/date/php_date.c
	ext/standard/math.c
2014-08-14 23:30:49 +04:00
Ferenc Kovacs
86aa8d2523 Merge branch 'PHP-5.6'
* PHP-5.6:
  NEWS entry for e6d93a1 / d73d44c
  restore FPM compatibility with mod_fastcgi broken since #694 / 67541, fixes bug 67606
  Revert "Merge branch 'pull-request/694' into PHP-5.6"
2014-08-12 14:48:48 +02:00
David Zuelke
e6d93a11ad restore FPM compatibility with mod_fastcgi broken since #694 / 67541, fixes bug 67606 2014-08-09 08:26:33 +02:00
David Zuelke
d73d44c237 Revert "Merge branch 'pull-request/694' into PHP-5.6"
This reverts commit d96de86b5b, reversing
changes made to b1e32a4f7a.
2014-08-09 08:14:23 +02:00
Xinchen Hui
235d0241d1 Merge branch 'PHP-5.5' into PHP-5.6 2014-07-25 10:52:41 +08:00
Dmitry Stogov
f2a2fccece Merge branch 'master' into phpng
* master:
  fix nmake snap when ext name is different in target dll
  force atoll macro usage on windows
  Enable $ replacement in exif, ldap, pdo_pgsql and tidy
  See bug #67635
  NEWS
  NEWS
  improve previous, add message during configure
  Fixed bug #67635 php links to systemd libraries without using pkg-config
  Improve fix for #66608
  Fixed segfault with empty break
  New added opcodes don't need to be resloved
  Update NEWS
  Update NEWS
  Update NEWS
  Fixed bug #66827 Session raises E_NOTICE when session name variable is array
  implemented copy libs of core exts in phpize mode
  fix copy the ext dll into the prefix path in phpize mode
  fix default prefix in phpize mode
  fix file with zero size usage in phpize mode

Conflicts:
	Zend/zend_opcode.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/session/session.c
2014-07-22 15:42:17 +04:00
renyongquan
ebf4ffc935 Set FPM_BACKLOG_DEFAULT to 511
It is too large for php-fpm to set the listen backlog to 65535.
It is realy NOT a good idea to clog the accept queue especially
when the client or nginx has a timeout for this connection.

Assume that the php-fpm qps is 5000. It will take 13s to completely
consume the 65535 backloged connections. The connection maybe already
have been closed cause of timeout of nginx or clients. So when we accept
the 65535th socket, we get a broken pipe.

Even worse, if hundreds of php-fpm processes get a closed connection
they are just wasting time and resouces to run a heavy task and finally
get error when writing to the closed connection(error: Broken Pipe).

The really max accept queue size will be backlog+1(ie, 512 here).
We take 511 which is the same as nginx and redis.
2014-07-22 16:16:22 +08:00
Remi Collet
a9c8499d4b Merge branch 'PHP-5.6'
* PHP-5.6:
  See bug #67635
2014-07-20 11:16:09 +02:00
Remi Collet
d55f23ea5a Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  See bug #67635
2014-07-20 11:15:59 +02:00
Remi Collet
658f7d77f9 See bug #67635
Improve previous fix:
- also rely on pkg-config for systemd < 209
- always check for header
- comments
2014-07-20 11:14:43 +02:00
Remi Collet
6055a53d34 Merge branch 'PHP-5.6'
* PHP-5.6:
  NEWS
  NEWS
  improve previous, add message during configure
  Fixed bug #67635 php links to systemd libraries without using pkg-config
2014-07-19 18:47:32 +02:00
Remi Collet
d5d16b6278 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  improve previous, add message during configure
  Fixed bug #67635 php links to systemd libraries without using pkg-config
2014-07-19 18:46:46 +02:00
Remi Collet
144a083954 improve previous, add message during configure 2014-07-19 18:42:40 +02:00
Remi Collet
7b60315672 Fixed bug #67635 php links to systemd libraries without using pkg-config
Patch from pacho at gentoo dot org

Rely on pkg-config for systemd >= 209
Failback on old check
2014-07-19 18:40:20 +02:00
Xinchen Hui
d8431ba09c Merge branch 'master' into phpng 2014-07-09 18:35:30 +08:00
Remi Collet
b26c97b1a2 Merge branch 'PHP-5.6'
* PHP-5.6:
  NEWS
  5.6 have fpm_globals.force_stderr
  Fix Bug #67530 	error_log=syslog ignored
2014-07-08 08:34:15 +02:00
Remi Collet
71a27605f4 5.6 have fpm_globals.force_stderr 2014-07-08 08:33:48 +02:00
Remi Collet
60fd4d445c 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-07-08 08:33:47 +02:00
Remi Collet
0c840ced7c Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  NEWS
  Fix Bug #67530 	error_log=syslog ignored
2014-07-08 08:30:44 +02:00
Remi Collet
f8acf826c3 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-07-08 08:29:24 +02:00
Dmitry Stogov
acfbb7b6dc Merge branch 'master' into test
* master: (67 commits)
  remove the NEWS entry for the reverted fpm fix
  remove the NEWS entry for the reverted fpm fix
  remove the NEWS entry for the reverted fpm fix
  Revert "Fix Bug #67530 	error_log=syslog ignored"
  --enable-fpm for the travis build
  fix the last fpm NEWS entry, the other bug is related, but not the same what we fixed here
  NEWS
  NEWS
  Fix bug #67091: make install fails to install libphp5.so on FreeBSD 10.0
  adding NEWS entry for the fix for bug #65641
  Updated NEWS file for recent phpdbg fixes
  Fixed issue krakjoe/phpdbg#94 - List behavior is inconsistent
  Fix issue krakjoe/phpdbg#97 - list now appends a newline if there is none The prompt should always ensure it is on a newline
  Fixed test
  Inform about back command existence in help - Fixes krakjoe/phpdbg#100 No way to list the current stack/frames
  Fix issue krakjoe/phpdbg#98 break if does not seem to work
  Fix issue krakjoe/phpdbg#99 register function has the same behavior as run
  Fix readline/libedit (Thanks to @remicollet)
  Replace incorrect `E` command with `ev` in watch help
  Fix typo in `finish` help
  ...

Conflicts:
	Zend/zend_ast.c
	Zend/zend_highlight.c
	Zend/zend_indent.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/info.c
2014-07-01 00:19:41 +04:00
Ferenc Kovacs
2d26a7cf62 Merge branch 'PHP-5.6'
* PHP-5.6:
  remove the NEWS entry for the reverted fpm fix
  remove the NEWS entry for the reverted fpm fix
  remove the NEWS entry for the reverted fpm fix
  Revert "Fix Bug #67530 	error_log=syslog ignored"
2014-06-30 18:39:31 +02:00
Ferenc Kovacs
d810c2139f Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  remove the NEWS entry for the reverted fpm fix
  remove the NEWS entry for the reverted fpm fix
  Revert "Fix Bug #67530 	error_log=syslog ignored"
2014-06-30 18:38:54 +02: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
Dmitry Stogov
b7715c7e8a Refactored parameter passing mechanism.
In PHP-5.6 and below each argument passed to user function was copies on VM stack twice.
Now we always have ZEND_INIT_FCALL (or simular) opcode that pushes "call frame" on top of VM stack.
"Call frame" is actually the same zend_execute_data structure.
All the following ZEND_SEND instructions push arguments on top of the stack in a way that they directly comes into corresponding CV variables of the called frame. Extra arguments are copied at the end of stack frame (after all CV and TMP variables) on function enterance.

There are two minor incompatibilities:
1) It's not allowed to decalre functions redefining arguments e.g. "function foo($a,$a) {}".
2) func_get_arg() and func_get args() return the current value of argument and not the original value that was sent.
2014-06-30 15:43:45 +04:00
Ferenc Kovacs
c73e1f80f5 Merge branch 'PHP-5.6'
* PHP-5.6:
  adding NEWS entry for the fix for bug #65641
  Fix SetHandler proxy:fcgi:// incompatibilities
2014-06-30 01:03:29 +02:00
Ferenc Kovacs
d96de86b5b Merge branch 'pull-request/694' into PHP-5.6
* pull-request/694:
  Fix SetHandler proxy:fcgi:// incompatibilities
2014-06-30 00:51:59 +02:00
Remi Collet
6fa814cfc3 Merge branch 'PHP-5.6'
* PHP-5.6:
  NEWS
  NEWS
  NEWS
  Fix Bug #67531 	syslog cannot be set in pool configuration
  Fix Bug #67530 	error_log=syslog ignored
2014-06-27 09:51:52 +02:00
Remi Collet
37aa57cd1b Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  NEWS
  NEWS
  Fix Bug #67531 	syslog cannot be set in pool configuration
  Fix Bug #67530 	error_log=syslog ignored
2014-06-27 09:51:15 +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
David Zülke
db537b1f3f Fix SetHandler proxy:fcgi:// incompatibilities
Apache 2.4.10+ will allow the following:

```
<FilesMatch \.php$>
SetHandler proxy:fcgi://localhost:9000
</FilesMatch>
```

This is much easier than using `ProxyPassMatch` (which prevents rewriting and other stuff) and rewrites (which are a bag of hurt because when combined with user-land `.htaccess` rewrites, there's always rewrite loops, prefix breakage etc (I've tried, for weeks).

It's basically the future of using Apache (via `mod_proxy_fcgi`) together with PHP-FPM. It's also available for older versions as a standalone module, very easy to install: https://gist.github.com/progandy/6ed4eeea60f6277c3e39

However, the two bits of code this commit deletes interfere with that. They both cover CGI-only mode and were copied from that SAPI into the FPM source. See e.g. https://bugs.php.net/bug.php?id=47042

The first deleted part mangled `SCRIPT_NAME` if something like

```
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) index.php/$1 [L]
```

is used (i.e. rewriting to `PATH_INFO`. The second part drops `PATH_INFO` if there was a `REDIRECT_URL` (with CGI mode, `SCRIPT_FILENAME` in Apache is the path to the PHP binary, and `PATH_INFO` contains the name of the script to run).

Clearly, neither applies in the case of FPM, so both are safe to delete.
2014-06-12 21:45:22 +02:00
Xinchen Hui
c242518bf0 There should been memory leaks(and don't use pointer cast) 2014-05-08 15:20:13 +08:00
Dmitry Stogov
cd4b4dfc4d Merge branch 'master' into refactoring2
Conflicts:
	Zend/zend_hash.c
	ext/date/php_date.c
2014-05-05 13:02:43 +04:00
Nikita Popov
404cc45ee2 Get php-fpm to work
At least phpinfo() works. Need to do more testing (how do you run
fpm with valgrind?)
2014-05-04 22:10:00 +02:00
Stanislav Malyshev
f2a3be9627 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix bug #67060: use default mode of 660
2014-04-29 09:17:10 -07:00
Stanislav Malyshev
c397fcc35f Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #67060: use default mode of 660
2014-04-29 09:16:24 -07: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
Dmitry Stogov
f9927a6c97 Merge mainstream 'master' branch into refactoring
During merge I had to revert:
	Nikita's patch for php_splice() (it probably needs to be applyed again)
	Bob Weinand's patches related to constant expression handling (we need to review them carefully)
	I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway)

Conflicts:
	Zend/zend.h
	Zend/zend_API.c
	Zend/zend_ast.c
	Zend/zend_compile.c
	Zend/zend_compile.h
	Zend/zend_constants.c
	Zend/zend_exceptions.c
	Zend/zend_execute.c
	Zend/zend_execute.h
	Zend/zend_execute_API.c
	Zend/zend_hash.c
	Zend/zend_highlight.c
	Zend/zend_language_parser.y
	Zend/zend_language_scanner.c
	Zend/zend_language_scanner_defs.h
	Zend/zend_variables.c
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
	ext/date/php_date.c
	ext/dom/documenttype.c
	ext/hash/hash.c
	ext/iconv/iconv.c
	ext/mbstring/tests/zend_multibyte-10.phpt
	ext/mbstring/tests/zend_multibyte-11.phpt
	ext/mbstring/tests/zend_multibyte-12.phpt
	ext/mysql/php_mysql.c
	ext/mysqli/mysqli.c
	ext/mysqlnd/mysqlnd_reverse_api.c
	ext/mysqlnd/php_mysqlnd.c
	ext/opcache/ZendAccelerator.c
	ext/opcache/zend_accelerator_util_funcs.c
	ext/opcache/zend_persist.c
	ext/opcache/zend_persist_calc.c
	ext/pcre/php_pcre.c
	ext/pdo/pdo_dbh.c
	ext/pdo/pdo_stmt.c
	ext/pdo_pgsql/pgsql_driver.c
	ext/pgsql/pgsql.c
	ext/reflection/php_reflection.c
	ext/session/session.c
	ext/spl/spl_array.c
	ext/spl/spl_observer.c
	ext/standard/array.c
	ext/standard/basic_functions.c
	ext/standard/html.c
	ext/standard/mail.c
	ext/standard/php_array.h
	ext/standard/proc_open.c
	ext/standard/streamsfuncs.c
	ext/standard/user_filters.c
	ext/standard/var_unserializer.c
	ext/standard/var_unserializer.re
	main/php_variables.c
	sapi/phpdbg/phpdbg.c
	sapi/phpdbg/phpdbg_bp.c
	sapi/phpdbg/phpdbg_frame.c
	sapi/phpdbg/phpdbg_help.c
	sapi/phpdbg/phpdbg_list.c
	sapi/phpdbg/phpdbg_print.c
	sapi/phpdbg/phpdbg_prompt.c
2014-04-26 00:32:51 +04:00
Stanislav Malyshev
185e5c0327 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix #66908: php-fpm reload leaks epoll_create() file descriptor
2014-04-20 16:25:25 -07:00
Stanislav Malyshev
0df431482f Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix #66908: php-fpm reload leaks epoll_create() file descriptor
2014-04-20 16:25:03 -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
Stanislav Malyshev
d3b433bb15 Merge branch 'PHP-5.6'
* PHP-5.6:
  Fix bug #66482, replace wrong item name 'priority' with 'process.priority' in php-fpm.conf
2014-04-13 17:33:02 -07:00
Stanislav Malyshev
c1d5937f7f Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fix bug #66482, replace wrong item name 'priority' with 'process.priority' in php-fpm.conf
2014-04-13 17:32:42 -07: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
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
Paul Annesley
a97ae8bc06 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-24 11:53:40 +04:00
Paul Annesley
a16304f836 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-24 11:47:44 +04:00
Dmitry Stogov
5de7115679 Use better data structures (incomplete; able to run bench.php) 2014-02-18 16:27:38 +04:00
Lior Kaplan
464b1bc4fb Merge branch 'PHP-5.6' 2014-02-14 17:19:33 +02:00
Veres Lajos
a7ec000f35 a few typofixes 2014-02-14 17:16:17 +02:00
Dmitry Stogov
f4cfaf36e2 Use better data structures (incomplete) 2014-02-10 10:04:30 +04:00
Antony Dovgal
98e6c8ca2d fix indentation 2014-01-17 12:49:21 +04:00
Gernot Vormayr
dff0d51243 Add some basic and apparmor tests to fpm 2014-01-17 12:49:07 +04:00
Gernot Vormayr
e3d3283405 Add --force-stderr to fpm 2014-01-17 12:49:00 +04:00
Gernot Vormayr
f6d137a716 Add apparmor change hat functionality to fpm 2014-01-17 12:48:33 +04:00
Antony Dovgal
a053e69991 fix indentation 2014-01-17 12:22:07 +04:00
Antony Dovgal
998f506b6d Merge branch 'fpm-apparmor-fixed' of https://github.com/notti/php-src
* 'fpm-apparmor-fixed' of https://github.com/notti/php-src:
  Add some basic and apparmor tests to fpm
  Add --force-stderr to fpm
  Add apparmor change hat functionality to fpm
2014-01-16 17:36:03 +04:00
Gernot Vormayr
e9883779a0 Add some basic and apparmor tests to fpm 2014-01-07 00:21:24 +01:00
Gernot Vormayr
32d9409a24 Add --force-stderr to fpm 2014-01-07 00:19:01 +01:00
Xinchen Hui
0f53e37494 Merge branch 'PHP-5.6' 2014-01-03 11:09:07 +08:00
Xinchen Hui
c081ce628f Bump year 2014-01-03 11:08:10 +08: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
Xinchen Hui
fb4678f1ac Merge branch 'PHP-5.6' 2013-12-27 20:46:08 +08:00
Xinchen Hui
a8cd9b417c Fixed bug #66358 (fpm starts segfault) 2013-12-27 20:45:43 +08:00
Kalle Sommer Nielsen
ed5a8d510f Pass the TSRMLS parameters to the sapi flush hook, this shaves off a few TSRMLS_FETCH() calls in our various SAPIs 2013-12-18 09:06:39 +01:00
Rasmus Lerdorf
a0244a69cc Merge branch 'PHP-5.5'
* PHP-5.5:
  Fix bug #66008
2013-10-31 03:18:36 -07: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
09ad5fbbb3 Merge branch 'master' of https://git.php.net/repository/php-src
* 'master' of https://git.php.net/repository/php-src:
  Improved performance of func_get_args() by eliminating useless copying
  fix limitation of upload size == (U)INT_MAX in CGI
  Link to more readmes
  test commit
  Update NEWS
  Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters
2013-10-28 13:46:40 +04:00
Chris Wright
9ad8e89d4f Allow unlimited line length in fpm config files
Fixes bug #65933
2013-10-28 09:35:01 +00:00
Michael Wallner
8962f3ff0c fix limitation of upload size == (U)INT_MAX in CGI 2013-10-28 07:37:47 +01:00
Antony Dovgal
73788d1c23 Merge branch 'PHP-5.5'
* PHP-5.5:
  increase backlog to the highest value everywhere
2013-10-27 22:57:31 +04: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
Michael Wallner
454a9fcb14 Merge branch 'master' of https://github.com/guggemand/php-src
* 'master' of https://github.com/guggemand/php-src:
  Dont reset other counters when incrementing slow_rq
2013-10-21 12:04:37 +02:00
Michael Wallner
41da537614 Merge branch 'master' of https://github.com/DylanArnold/php-src
* 'master' of https://github.com/DylanArnold/php-src:
  Call php_module_shutdown() for php-fpm child processes
2013-10-21 12:04:06 +02: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
Dylan Arnold
a911fbc80a Call php_module_shutdown() for php-fpm child processes 2013-09-09 13:06:38 +12: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
Gernot Vormayr
a90a93f1a4 Add apparmor change hat functionality to fpm 2013-07-02 13:06:02 +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
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
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
Remi Collet
2f12769db0 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  use limit_extensions as we use security_limit_extensions later (free)
  unused variable
2013-05-02 10:15:49 +02:00
Remi Collet
78c48af2f2 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  use limit_extensions as we use security_limit_extensions later (free)
  unused variable
2013-05-02 10:15:20 +02:00
Remi Collet
8492bbefbb use limit_extensions as we use security_limit_extensions later (free) 2013-05-02 10:15:12 +02:00
Remi Collet
a7d6cb2360 unused variable 2013-05-02 10:15:05 +02:00
Remi Collet
d42ae32738 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix possible null deref (detected by code coverity scan)
  Remove trailing space in NEWS
  NEWS for 514afd67
2013-05-02 09:38:38 +02:00
Remi Collet
be3f7ba4fb Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  fix possible null deref (detected by code coverity scan)
2013-05-02 09:38:12 +02:00
Remi Collet
ab117573cd fix possible null deref (detected by code coverity scan) 2013-05-02 09:38:00 +02:00
Remi Collet
fbff4ccf27 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  When Apache use RewriteRule to redirect, via mod_proxy_fgi, to php-fpm the SCRIPT_FILENAME may contains the QUERY_STRING.
2013-04-30 09:02:59 +02:00
Remi Collet
4a92ae3401 When Apache use RewriteRule to redirect, via mod_proxy_fgi, to php-fpm
the SCRIPT_FILENAME may contains the QUERY_STRING.

Ex : RewriteRule ^(.*)\.php$ fcgi://127.0.0.1:9000/$1.php [P]

From apache debug (build with -DFCGI_DUMP_ENV_VARS)
AH01062: sending env var 'SCRIPT_FILENAME' value 'proxy:fcgi://127.0.0.1:9000/var/www/html/info.php?foo'
AH01071: Got error 'Primary script unknown\n'
2013-04-30 08:55:18 +02:00
Karsten Schmidt
3fd5a40556 Dont reset other counters when incrementing slow_rq 2013-02-20 18:53:17 +01:00
Stanislav Malyshev
c877fcf6ec Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Added HTTP codes as of RFC 6585
2013-02-17 01:20:14 -08:00
Jonh Wendell
59b016192d Added HTTP codes as of RFC 6585
Added descriptions for the new HTTP codes:

- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 511 Network Authentication Required
2013-02-17 01:18:40 -08:00
Adam Harvey
77010bf9bf Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Update the arguments in the prototype of fpm_socket_unix_test_connect().
2013-01-16 10:19:13 +08:00
Adam Harvey
142c40f32c Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Update the arguments in the prototype of fpm_socket_unix_test_connect().
2013-01-16 10:18:00 +08:00
Adam Harvey
f63a9f6c11 Update the arguments in the prototype of fpm_socket_unix_test_connect().
Fixes bug #63999 (php with fpm fails to build on Solaris 10 or 11).
2013-01-16 10:06:56 +08:00
Xinchen Hui
a666285bc2 Happy New Year 2013-01-01 16:37:09 +08:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Xinchen Hui
a2045ff332 Happy New Year~ 2013-01-01 16:02:16 +08:00
Remi Collet
bc7f2b5f41 Merge branch 'PHP-5.3' into PHP-5.5
* PHP-5.3:
  Fixed Bug #63581 Possible buffer overflow
  Fixed Bug #63581 Possible null dereference
2012-11-28 10:38:37 +01:00
Remi Collet
487b7c7f32 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed Bug #63581 Possible buffer overflow
  Fixed Bug #63581 Possible null dereference
2012-11-28 10:38:13 +01:00
Remi Collet
bc492007da Fixed Bug #63581 Possible buffer overflow
In fpm-log, possible buffer overflow. Check for length is done at
the beginning of the loop, so is not done when overflow occurs
on the last loop (len = 1024 or 1025). (ack from fat).

This issue where found from by static code analysis tool and, so,
I can't provide any reproducer.
2012-11-28 10:35:04 +01:00
Remi Collet
f08060a48f Fixed Bug #63581 Possible null dereference
Possible NULL dereference when trying to delete the single item
of a list (ack from fat).

This issues where found from by static code analysis tool and,
so, I can't provide any reproducer.
2012-11-28 10:28:18 +01:00
Xinchen Hui
7e2c87bf2b Add missed file 2012-10-24 10:34:44 +08:00
Jerome Loyet
284ea56d4d Merge branch 'PHP-5.4'
* PHP-5.4:
  Add missing NEWS entry
  Fixed bug #62216
2012-09-28 11:22:59 +02:00
Jerome Loyet
b530f53c67 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62216
2012-09-28 11:21:12 +02:00
Jerome Loyet
bb02fd5772 Fixed bug #62216
Add PID to php-fpm init.d script
2012-09-28 11:18:08 +02:00
Jerome Loyet
68eb608f3c - Fixed bug #62887 (Only /status?plain&full gives "last request cpu") 2012-09-28 01:26:20 +02:00
Jerome Loyet
9ef925b351 - Fixed bug #62887 (Only /status?plain&full gives "last request cpu") 2012-09-28 01:25:51 +02:00
Jerome Loyet
151b16cf7f - Fixed bug #62887 (Only /status?plain&full gives "last request cpu") 2012-09-28 01:24:52 +02:00
Jerome Loyet
be043ab6d0 Merge branch 'fuckgit' into PHP-5.4
* fuckgit:
  - Fixed bug #62947 (Unneccesary warnings on FPM)
  - Fixed bug #63085 (Systemd integration and daemonize)

Conflicts:
	sapi/fpm/config.m4
2012-09-28 01:19:01 +02:00
Jerome Loyet
9ed421e3d7 - Fixed bug #62947 (Unneccesary warnings on FPM) 2012-09-28 01:09:31 +02:00
Jerome Loyet
72f3457161 - Fixed bug #62947 (Unneccesary warnings on FPM) 2012-09-28 01:08:48 +02:00
Jerome Loyet
e31553c204 - Fixed bug #62947 (Unneccesary warnings on FPM) 2012-09-28 01:08:08 +02:00
Jerome Loyet
c8b7ea0f57 - fix merge (fucking git merging system ... :( ) 2012-09-28 00:55:06 +02:00
Jerome Loyet
64a0e7cdc2 - Fixed bug #63085 (Systemd integration and daemonize) 2012-09-28 00:53:05 +02:00
Jerome Loyet
2259a8f18b - add missing php-fpm.service.in 2012-09-28 00:47:56 +02:00
Jerome Loyet
b2f4e686f0 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Fixed bug #63085 (Systemd integration and daemonize)
  - Fixed bug #62954 (startup problems fpm / php-fpm) - Fixed bug #62886 (PHP-FPM may segfault/hang on startup)

Conflicts:
	sapi/fpm/config.m4
2012-09-28 00:39:29 +02:00
Jerome Loyet
851a04bb7b - Fixed bug #63085 (Systemd integration and daemonize) 2012-09-28 00:33:05 +02:00
Jerome Loyet
b5eb1456aa - Fixed bug #62954 (startup problems fpm / php-fpm)
- Fixed bug #62886 (PHP-FPM may segfault/hang on startup)
2012-09-28 00:05:48 +02:00
Jerome Loyet
75c63c5503 - Fixed bug #62954 (startup problems fpm / php-fpm)
- Fixed bug #62886 (PHP-FPM may segfault/hang on startup)
2012-09-27 23:54:35 +02:00
Xinchen Hui
9d44ff640c Merge branch 'PHP-5.3' into PHP-5.4
Conflicts:
	ext/interbase/interbase.rc
2012-09-05 23:11:19 +08:00
Xinchen Hui
d64d9e3351 year++ 2012-09-05 23:08:05 +08:00
Lars Strojny
8e7081f3ac Merging PR 121 to add support for slow request counting on the PHP-FPM status page 2012-08-26 17:02:39 +02:00
Rasmus Lerdorf
5799ebdb0c Fix bug #62654 2012-07-25 02:03:47 +02:00
Rasmus Lerdorf
5f224412fa Fix bug #62654 2012-07-24 16:28:49 -07:00
Jerome Loyet
238caeb63c - Fixed bug #62205 (php-fpm segfaults (null passed to strstr)) 2012-06-01 11:23:01 +02:00
Jerome Loyet
ec4a1d576b - fix missing include for unix sockets 2012-06-01 11:22:18 +02:00
Jerome Loyet
43ec708882 - Comment unused function to avoid warnings 2012-06-01 11:22:02 +02:00
Jerome Loyet
38ca8cb7a1 - Fixed bug #62205 (php-fpm segfaults (null passed to strstr)) 2012-06-01 11:18:48 +02:00
Jerome Loyet
35abf3f20c - fix missing include for unix sockets 2012-06-01 11:16:53 +02:00
Jerome Loyet
59e0930d37 - Comment unused function to avoid warnings 2012-06-01 11:16:00 +02:00
Jerome Loyet
773e85a788 Fixed bug #61218 (the previous patch was not enough restritive on fcgi name string checks) 2012-05-26 19:37:09 +02:00
Jerome Loyet
2f7bd57f93 Fixed bug #61218 (the previous patch was not enough restritive on fcgi name string checks) 2012-05-26 19:36:01 +02:00
Jerome Loyet
60cca8b9c9 Fixed bug #61218 (FPM drops connection while receiving some binary values in FastCGI requests) 2012-05-26 19:27:45 +02:00
Jerome Loyet
e7ff3e839b Fixed bug #61218 (FPM drops connection while receiving some binary valuesin FastCGI requests) 2012-05-26 19:27:02 +02:00
Jerome Loyet
e052da3a6b Fixed bug #62033 (USR2 signal was sent even if not catch when daemonize and an error occured) 2012-05-26 18:48:40 +02:00
Jerome Loyet
0298b92b69 - Fixed bug #62033 (USR2 signal was sent even if not catch when daemonize and an error occured) 2012-05-26 18:44:35 +02:00
Jerome Loyet
decc394a20 - Fixed bug #62160 (Add process.priority to set nice(2) priorities) 2012-05-26 18:24:08 +02:00
Jerome Loyet
f6655b62d8 - Fixed bug #62160 (Add process.priority to set nice(2) priorities) 2012-05-26 18:22:12 +02:00
Jerome Loyet
0037598252 - add missing headers to avoid warnings 2012-05-26 17:38:08 +02:00
Jerome Loyet
63e11f9025 - add missing headers to avoid warnings 2012-05-26 17:37:33 +02:00
Jerome Loyet
d90003b549 - Fixed bug #62153 (when using unix sockets, multiples FPM instances can be launched without errors) 2012-05-25 21:22:54 +02:00
Jerome Loyet
a7761262f7 - Fixed bug #62153 (when using unix sockets, multiples FPM instances can be launched without errors) 2012-05-25 21:21:44 +02:00
Jerome Loyet
c2f33fb129 - Fixed bug #62033 (php-fpm exits with status 0 on some failures to start) 2012-05-25 21:13:57 +02:00
Jerome Loyet
bf9120ecae - Fixed bug #62033 (php-fpm exits with status 0 on some failures to start) 2012-05-25 21:10:17 +02:00
Jerome Loyet
1299503936 - Fixed bug #61026 (FPM pools can listen on the same address) 2012-05-23 11:53:04 +02:00
Jerome Loyet
5d61e56dd7 - Fixed bug #61026 (FPM pools can listen on the same address) 2012-05-23 11:52:04 +02:00
Jerome Loyet
0b44f16ea2 - Fixed bug #61839 (Unable to cross-compile PHP with --enable-fpm) 2012-05-23 11:40:22 +02:00