-1

The upload_max_filesize is set to 2 MB and I am having issues changing it. I am used to changing such settings in a php.ini file, however, I was unable to find such file on my server. I assume FastCGI does not have such a file?

I was able to find the following file /etc/php5/fpm/php.ini however, changing this did not affect my upload limit in phpMyAdmin. I read somewhere that you can enter php configuration details directly into the nginx.conf file but I'm not entirely sure if that's correct or how that works...

Any guidance is greatly appreciated!

Oliver Chalk
  • 1
  • 1
  • 3
  • Did you restart PHP? – Michael Hampton Mar 27 '17 at 07:45
  • On Amazon Linux (similar to centos) it's /etc/php.ini . Best thing to do is create a file that calls the phpinfo(), view that page, which will tell you what its configuration file is : https://mediatemple.net/community/products/dv/204643880/how-can-i-create-a-phpinfo.php-page – Tim Mar 27 '17 at 08:11
  • Are you sure that you do not have anything in /etc/php5/apache/? – Orphans Mar 27 '17 at 09:38

1 Answers1

0

A you can have multiple php.ini files for one system. So you must identify the correct one at first. For your system you have one php.ini file for the PHP-FPM daemon (here: /etc/php5/fpm/php.ini) and one php.ini file for CLI (here: /etc/php5/cli/php.ini).

The PHP-FPM daemon is a dedicated server accessed by your web server via Fast-CGI interface and executing PHP scripts. This is the way Nginx handles PHP. Nginx does not have a mod_php like Apache has.

The CLI stands for Command-Line-Interface and means everything you do with PHP from your command line (e.g. cron-Scripts). It makes sense to allow different settings (e.g. no time limitation, no memory limitation). Therefor you have a different configuration.

After you have changed your php.ini for the PHP-FPM you must reload or restart the PHP-FPM daemon to take effect.

Debian Jessie:

sudo systemctl reload php5-fpm

Ubuntu:

sudo service reload php5-fpm

After you have changed your php.ini for the CLI it will be used the next time you will execute PHP on command line or in Cron.

Jens Bradler
  • 6,133
  • 2
  • 16
  • 13