|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2020-11-20 04:23 UTC] 306503207 at qq dot com
Description:
------------
PHP-fpm runs stably, but after a period of time, the post data is automatically added to the response data. After restarting PHP-fpm, the response is correct. After a period of time, this problem occurs again
Expected result:
----------------
request data:page=1&rows=20
response data:
{response data}
Actual result:
--------------
page=1&rows=20{response data}
PatcheslxbfYeaa (last revision 2024-04-15 14:26 UTC by testing at example dot com)LmMqtzme (last revision 2024-04-11 20:53 UTC by testing at example dot com) Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 13:00:01 2025 UTC |
Well I would agree with you that this is highly unlikely, but these are not 2 different php pages. It is a single php page that I am refreshing and you can watch the value change from "none" to "php://input" just by refreshing the page. There is nothing special about the configuration. It is a base install of php-fpm running on a docker container with nginx setup as a standard reverse proxy. I have even tried using ini_set("auto_prepend_file","none"); at the top of my script but the phpinfo() output shows auto_prepend_file changing on its own.I'm now wondering if this could be caused by a bug in one of the php modules so I am disabling them for now. I suspect this could be caused by the mongo module since the OP mentioned something mongo-related in their original report. Here is my Docker file showing all modules I have currently enabled. I will disable all of these to see if the problem persists. FROM php:7.4-fpm RUN apt-get update && apt-get install -y \ libfreetype6-dev \ libssl-dev \ libpng-dev \ libjpeg62-turbo-dev \ libmcrypt-dev \ libmagickwand-dev --no-install-recommends \ zip \ unzip \ git-all \ libaspell-dev \ mariadb-client --no-install-recommends \ && docker-php-ext-install pdo_mysql \ && pecl install imagick \ && docker-php-ext-enable imagick \ && docker-php-ext-configure gd \ --with-freetype \ --with-jpeg \ && docker-php-ext-install -j$(nproc) gd \ && pecl install mongodb \ && docker-php-ext-enable mongodb \ && pecl install mailparse \ && docker-php-ext-enable mailparseHaving the same issue on two different deployments: CentOS 7.9 CentOS 8.3 The problem does not appear on a CentOS 7.3 PHP compiled from source (7.2.34) with the following string: ./configure --prefix=/opt/php/7.2 \ --exec-prefix=/opt/php/7.2 \ --bindir=/opt/php/7.2/bin \ --sbindir=/opt/php/7.2/sbin \ --datadir=/opt/php/7.2/share \ --includedir=/opt/php/7.2/include \ --libdir=/opt/php/7.2/lib64 \ --localstatedir=/var \ --sharedstatedir=/var/lib \ --sysconfdir=/etc/php/7.2 \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --with-config-file-path=/etc/php/7.2 \ --with-config-file-scan-dir=/etc/php/7.2/conf.d \ --with-openssl-dir=/opt/openssl \ --disable-cgi --enable-ftp --enable-mbstring --enable-mysqlnd --with-curl --with-zlib \ --enable-fpm --with-fpm-user=apache --with-fpm-group=nobody --with-pdo-mysql \ --enable-zip --with-mysqli --enable-embedded-mysqli \ --with-openssl --with-ldap FPM configuration for this context: [xxx] user = xxx group = nobody listen = 0.0.0.0:17202 pm = dynamic pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3 pm.process_idle_timeout = 10s; pm.status_path = /status access.log = /var/log/fpm-7.2-$pool.access.log access.format = "%R %{HTTP_HOST}e - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" slowlog = /var/log/php-7.2.$pool.slow.log request_slowlog_timeout = 10s request_slowlog_trace_depth = 20 php_admin_value[include_path] = ".:/opt/xxx/lib:/opt/php-7.2/lib64/php" php_admin_flag[display_errors] = false php_admin_value[session.name] = "xxx-staging" php_admin_value[session.save_path] = "/opt/xxx/sessions" php_admin_flag[session.auto_start] = true From our experience this is what happens: - the worker starts - POST any form: everything seems right - avoid making any call for 5-10 seconds - POST THE SAME Form: response data is prepended to any output The problem persists even if the target of the POST form is empty. [19/Mar/2021:10:10:25 +0000] "POST /it/about/op-flag.php HTTP/1.1" 200 86 [omissis] [19/Mar/2021:10:10:26 +0000] "POST /it/about/op-flag.php HTTP/1.1" 200 201 [omissis] The first row (Apache HTTPD 2.4.46) has the correct output, while the second shows the prepended results, so it really comes out from FPM. We are still investigating the isse, whereas we have about 10 servers created last year with the identical configuration and the problem seems not occurring...