Just documented the problem when I failed to install PHP5-FPM to Debian Squeeze.
failed to install php
The problem caused by repository. Here the instruction how to fix it.
First add this to
deb http://packages.dotdeb.org squeeze all
deb-src http://packages.dotdeb.org squeeze all
Second fetch and install the GnuPG key
sudo apt-key add dotdeb.gpg
Don’t forget to run
apt-get update and
Now, you should be able to install php5-fpm
apt-get install php5-fpm php5-cgi php5-common php5-suhosin php5-mysql php5-dev php5-curl php5-gd php5-imagick php5-mcrypt php5-snmp
To run, restart, and stop php, you should do this
service php5-fpm restart | stop | start
Break The Limit
The default php allowed you to upload file no more than 2MB, if you want more you should edit the
post_max_size, both code is written on
If you don’t know where
php.ini located, you can find it with this solution
my case, the result were
It’s no problem if you edit all of these, but you have more effort. As I installed PHP5-fpm I just edit
Do not randomly change the number, there are the rules to edit
post_max_size. Read the rules here.
In my case I edited the
Restart the php and see the
phpinfo() to make sure your configuration.
413 Request Entity Too Large
Other issue when you failed to upload is webserver itself. I use to use nginx as webserver. To solve that just edit
/etc/nginx/nginx.conf and add
on http section,
# Basic Settings
You can change 96 to whatever you want. The 96M represent client body size that size 96MB.