I configure the php-server for processing prices. Apache works in conjunction with Nginx. Mode php - CGI . In the php.ini file , among other things, these settings are indicated:

file_uploads = On upload_max_filesize = 100M post_max_size = 300M 

The nginx.conf file indicates

 http { ... client_max_body_size 128m; } 

However, the maximum size of downloaded files still can not exceed 2MB. When loading files that exceed 2Mb in size, the global variable $_FILES contains an error: $_FILES['Price']['error'] == 1

It seems to have done everything correctly, but it still does not work, for some reason, as I need. In which direction should I look? What are the smoking manuals?

UPD: Server is controlled by ISPmanager PU. PHP v7 is connected as an alternative version for CGI , since ISPmanager does not have PHP v7 out of the box, only v5.33. Therefore, we had to use CGI, because the alternative versions are only connected in this mode, and there was no time to play with updating the standard stack and linking it to the panel - the server is purely intermediate for generating prices.

  • what writes in logs? does it beat nginx or apache? - AK
  • show the output of phpinfo - what do you write in the settings of these variables? I somehow made a mistake in the Apache config and put the letter M in the wrong case, or something else, so the variable was not set. And you have something like this on nginx, you need to check what it means by the documentation m means small - AK
  • Occasionally there are sites where launched as fcgi - not your case? You have to set FcgidMaxRequestLen in addition to the variables you quoted - AK
  • four
    A typo in the title is even pitiful. - D-side
  • 9
    @ D-side Vladimir apache, north wind. Works with Nginx, evil nemeryannom. Mode of operation - CGI. - Nick Volynkin

1 answer 1

Giving additional information on his question, he accidentally guessed about solving the problem.

Since I use an alternative version of PHP in CGI mode, the configs for this version should be separate, in theory. And it turned out that way. I found them - they are directly in /var/www/php-bin-isp-php70/ . There also lies php.ini specifically for this version. And I changed / /etc/php.ini , which is responsible for the standard version of PHP in Apache mode.

In general, I edited the config /var/www/php-bin-isp-php70/php.ini and now everything works.

Thanks to everyone who participated in solving my problem. :)

  • four
    It's good that everything ends well. - AK