skip to Main Content

When sending a POST request, fpm-php chaotically returns either a normally processed PHP script <?=die("111");?> will return either “111” or a response of 200 and the body of the POST request itself, in this form: “rnd=1173943626&sessid=b2e74736d05a7d16efbfa99a603c66ad”.

Nginx.conf without any specific things, PHP processing is performed in this form:

location ~ .php$ {
   try_files       $uri @bitrix;
   fastcgi_pass     fpm-php:9000;
   fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
   include fastcgi_params;
   fastcgi_param REMOTE_ADDR $remote_addr;
   fastcgi_read_timeout 99999;
}

2

Answers


  1. Chosen as BEST ANSWER

    Solution - https://bugs.php.net/bug.php?id=80385&edit=1, closed fpm-php 9000 port for access from the network.


  2. First of all move include fastcgi_params directive to the top, before any fastcgi_param directive, to make sure it won’t override params, you define inside location.

    It seems same request is processed by different scripts, check what @bitrix fallback does.

    You can add access and error logs inside nginx configuration and after making request check that files. If it doesnt help, you can install nginx echo module, it really helps to debug.

    Which php version are you using? I have heard old version had same problem, under PHP 5.3

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search