Allow htaccess to override php.ini

In order .htaccess to override the configuration on php.ini you must edit your apache configuration.

In order for the .htaccess code below to work in your site

<IfModule mod_php5.c>
php_value upload_max_filesize 10MB
php_value post_max_size 10MB

You’ll will need to insert the code below to /etc/apache2/sites-available/default

<VirtualHost *:80>
        ServerAdmin webmaster@localhost


    <Directory /var/www/>
        AllowOverride All


Then restart apache
$ /etc/init.d/apache2 restart


ubuntu server add .htaccess directory
allow php.ini to be override using .htaccess
php.ini increase upload size
php ini httpd conf htaccess
.htaccess is not overriding php.ini
.htaccess override php.ini
changing php ini values using .htaccess
change php ini htaccess not working