PHP form limited to 1000 fields

Since PHP 5.3.9 form are limited to 1000 fields by default.
To fix it, you can edit your php.ini file and modify this variable

max_input_vars = 4000

And don’t forget to restart apache.

You can also edit it in your .htaccess file

 php_value max_input_vars 4000 

Change it directly in your php file with this

 ini_set('php_value max_input_vars', 4000); 

won’t work.

But change this varible may not fix your issue.
If you have suhosin installed, you laso have to edit his configuration file (/etc/php5/apache2/conf.d/suhosin.ini)

suhosin.get.max_vars = 4000 
suhosin.post.max_vars = 4000 
suhosin.request.max_vars = 4000 

To check your suhison configuration, use phpinfo() or in your php script

echo ini_get('suhosin.post.max_vars');

Invalid command ‘Header’, perhaps misspelled or defined by a module not included in the server configuration

You have this error message on your apache logs

/home/www/.htaccess: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration

Check the .htaccess file and there is no Header command…

<FilesMatch "\.(xml|jpg)$">
FileETag None
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</FilesMatch>

In fact, this issue is due to the header apache’s module whose’s missing.
To install it, run

a2enmod headers

And don’t forget to restart apache

service apache2 restart

Remove index.php from URL .htaccess

How to remove index.php from URL using .htaccess file ?
That is this easy :

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[^/]*/index\.php [NC]
RewriteRule ^index\.php(.+) $1 [R=301,L]
</IfModule>

Maybe you are using a magento website and you need to keep index.php for the backoffice.
Then add this condition to the .htaccess file

RewriteCond %{REQUEST_URI} !^[^/]*/index\.php/admin.*

and don’t forget to enable rewrite module

a2enmod rewrite