File size limit



I’m posting for a friend whose site is hosted with DreamHost, as I’m trying to help him with his blog and have come up stumped.

We’re trying to raise the maximum file size limit, but to no avail. Whenever he tries to upload a file when posting to his blog, using either the browser or the flash uploader, he’s told that “This file is too big. Your php.ini upload_max_filesize is 7M.”

Following the instructions on the Wiki, I’ve created a new php.ini for him and have raised post_max_size and upload_max_filesize to larger values. php_info() shows that both of these are correct (i.e., the values are being read from that php.ini), but it still won’t let him upload a larger file.

Any help or advice would be gratefully appreciated. Many thanks in advance!


Here’s a really good link with some info not posted on the Wiki:

My recommendation is to simply add a .htaccess file:

AddHandler application/x-httpd-php .php
php_value post_max_size 150M
php_value upload_max_filesize 150M
php_value memory_limit 250M

Save [color=#CC0000]$97[/color] on all plans by using promo code: SRVR97. More Here


Thank you for the reply. I’ve tried creating a .htaccess file but it does not seem to respect the values I specify for file upload.

At the moment, the folder structure is similar to below (with the real domain name changed):


for the site at I’ve tried creating the .htaccess file for by creating it within ~/blog, and while it takes effect when pointing to the CGI script specified on the Wiki, it does not appear to work when using the method you gave for .htaccess. Should I create it somewhere else?

Many thanks.


The prerequisite for using directives in an Apache configuration file is that you have to be running mod_php (Apache module). Since DreamHost stopped installing it some time ago OP will have to stick with PHP-CGI unless he’s on an old machine they haven’t removed the module from yet.

:cool: -//-