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.
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.
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.
* '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
# For THTTPD:
# The code that uses a call to this function is for older versions of PHP anyway so its not covered
# For Zend OpCache:
# Added a new define for 5.6 and wrapped the code around that so its still compatible with older version
The timeout argument to select() is modified to reflect the time
remaining when the function returns on a non-timeout condition.
Passing a pointer to const data and casting away the const-ness is
asking for trouble, but for some reason, this trouble manifests
itself only on non-x86 architectures [whose implementation of select()
in glibc is different from the one supplied for x86]
Fix this by passing a stack copy of the timeout argument to select()
* PHP-5.5:
Updated NEWS
Removed UPGRADING note
Rewrote test using tcp instead of http:// stream
Implemented FR #65917 (getallheaders() is not supported by the built-in...)
* CLIGetAllHeadersBackport:
Removed UPGRADING note
Rewrote test using tcp instead of http:// stream
Implemented FR #65917 (getallheaders() is not supported by the built-in...)
* PHP-5.5:
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
- Implemented apache_request_headers() and getallheaders() alias in CLI server
- Implemented apache_response_headers() in CLI server using FastCGI code
Conflicts:
NEWS
UPGRADING
* pull-request/500:
limit virtual_cwd_activate() duplicated call to ZTS only
reverted the previous commit, both calls are needed in TS mode
virtual_cwd_activate() should be called only in one place
back to do_alloca()
removed unnecessary call
simplify the state free macros
compact the code to preserve the error info after state freeing
back to do_alloca(), reverted the wrong replacement
enabled windows to use stack in both ts/nts mode, some more fixes
moved to do_alloca() usage where appropriate
fixed invalid free
fixed virtual cwd header in phar
updated NEWS
fixed all the places where last error could be lost
preserve the error code
applied and fixed the original patch
initial move on renaming files and fixing includes
Conflicts:
ext/opcache/ZendAccelerator.c
* '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
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.
* PHP-5.5:
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
* 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
* PHP-5.5:
added fixed tests for ICU >= 51.2
fixed failing tests for ICU >= 51.2
FIX BUG #65219 - Typo correction
FIX BUG #65219 - USE DB not being sent for FreeTDS version < 0.92 FreeTDS <0.92 does not support DBSETLDBNAME option and therefore will not work with SQL Azure. Fallback to dbuse command in letter versions.
- Fixed bug #65818 (Segfault with built-in webserver and chunked transfer encoding)
- BFN
* slim-postdata:
slim post data
add NEWS entry; add simple test
more precise condition
make this work in vc11 too
Use int64_t and atoll() after discussion with johannes
ws
Patch for https://bugs.php.net/bug.php?id=44522 to allow uploading files above 2G.
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>
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>
* 2Guploads:
add NEWS entry; add simple test
more precise condition
make this work in vc11 too
Use int64_t and atoll() after discussion with johannes
ws
Patch for https://bugs.php.net/bug.php?id=44522 to allow uploading files above 2G.
unify stdint type usage
above 2G.
This is essentially the same as the patch
"uploads_larger_than_2g_HEAD_v2 (last revision 2012-03-26 03:59 UTC) by
jason at infininull dot com)" but using off_t instead of signed long
(originally: uint)
I tested this on 64bit linux and succeeded uploading a file of 4.8 G.
The File did not get corrupted or truncated in any way.
I did not yet test this under windows or 32 bit linux
Note that there are still limitations:
* Did not test for files > 8 G
* php does not yet reject absurdly high values
* Still limited by underlying file system specific limits and free space
* in upload
* tmp dir and destination dir
* 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
* 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.
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).
* 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.
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.
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.
* 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)
* 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)
- 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)
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'
* pull-request/313:
Patch for Bug #64544. The process title change module keeps track of the locally allocated environ, so it doesn't need to worry about when environ changes underneath it, for example by putenv()/setenv()
The process title change module keeps track of the locally allocated
environ, so it doesn't need to worry about when environ changes
underneath it, for example by putenv()/setenv()
* PHP-5.4:
- fix x64 issues on windows with the various time types (overflow, signed and unsigned bits ops, etc.) causing crashes on start, error or log, must be done in win32/time.c for some of these functions too
Added descriptions for the new HTTP codes:
- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 511 Network Authentication Required
fdset management using bit operator is broken on non-x86 arch
and cause built-in server the enter an infinite loop of "select"
and never handle any request.
Without this fix, a webpage using eval() may return code 500. That might display
fine and the 500 go unnoticed, but using AJAX or wget, the 500 will cause problems.
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.
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.