Modify PHP Upload Limit


I want to increase the PHP upload limit for my site ( and I have found a tutorial on wiki dreamhost ( Here I want to ask, what are the risk of modification if modification failed? Will it cost data lost?

I am new to this and it also is my first time doing it. I tried to do the modification using putty.exe. After I run the putty.exe, I keyed in ‘’ at the host name field and set to port 80. When I clicked on open button, putty open a new window with black color in it. The problem is that I cannot type and do anything with that window. What should I do in order to proceed?

From what I read from the tutorial (although I am not fully understand it), here I want to ask:

  1. Is it possible to do the modification by uploading all those files needed without using putty.exe?
  2. Where and how can I get the dreamhost original php.ini? So that later I can change the setting to increase the upload limit.

I will be very appreciate if you can provide detail steps by steps in the way to do the modification. Thanks.

The worst that will happen is that your site stops working. In which case you just delete those lines, or the entire file, in .htaccess.

For Putty, the port shouldn’t be 80. Leaving it blank should work, but you can also try 22 which is default for SSH. You also need to go to the panel here and Edit your User to allow for Shell access.

If you want to do everything at your end, use SFTP, not FTP. Then you can download DreamHost’s default php.ini. As long as you’re using a clean text editor that doesn’t add DOS linefeeds, you’re in good shape. Filezilla does SFTP and has a built in text editor.


Thanks a lot for your reply. I have tried to do everything at my side and upload through SFTP. The only part that I don’t understand and skipped is “Set permissions” from

Here are my steps:

  1. created a “cgi-bin” folder
  2. copy dreamhost original php.ini file and modify the upload_max_filesize value to 100M
  3. created php-wrapper.fcgi file using notepad (encoding ANSI) with the content:

export PHPRC=/home/MY USERNAME/
exec /dh/cgi-system/php5.cgi $*

  1. created .htaccess file using notepad (encoding ANSI) with the content:

Options +ExecCGI
AddHandler php5-cgi .php
Action php-cgi /cgi-bin/php-wrapper.fcgi
Action php5-cgi /cgi-bin/php-wrapper.fcgi

However, after I check, it still shows upload_max_filesize is 7M. What I have done wrong? What should I do to make it works? Thanks.

Notepad typically screws up text files when used in a Linux environment. Hopefully your SFTP program has a built in text editor. Try that one and see how the files look. Or try the WebFTP interface from the panel here.

WebFTP and/or your SFTP program can set the permissions as directed.


I have tried to view the file in webftp. The text appear to be the same like in notepad. I also changed the permission setting using my SFTP program, that is FireFTP.

But, it still shows the upload_max_filesize is 7M. What else do I need to do to make it works? Thanks.

Notepad is fine. Check phpinfo() to see if it’s actually loading your custom php.ini

<?php ;phpinfo() ;?>Have you edited the appropriate settings in your custom php.ini (in the cgi-bin directory) in order to change the upload limit from the 7M default to something higher? If so, which settings did you change?

Maximum Cash Discount on any plan with MAXCASH

How To Install PHP.INI / ionCube on DreamHost

Is it Wordpad that always screws up text files? Notepad is really plain text?


The issue isn’t whether the file is plain text or not - the problem with Notepad is that it creates files with Windows line endings. Some Linux programs are fine with this, but some things (shell scripts, in particular) get very confused by the “wrong” line endings. This is why we recommend using something else, like pico (in a shell) to do this sort of work!

Thanks for all your replies. I have checked, it still loads the original php.ini. I have changed the value of upload_max_filesize to 100M.

Regarding Windows line endings, I have tried to view those files in webftp. It seems that all is display clean & properly.

One thing I need to highlight here, I am using Joomla to run the site. What else that I need to do for the PHP modification works? Thanks.

Guys, I really need your help. Otherwise, I can’t proceed to develop the website. Thanks.

You’ll need to give yourself SSH/Shell access and use PuTTY to log in and examine what you have so far.

First order is to run the dos2unix command on each file you’ve uploaded. Here are some shell tips:

While you’re logged in, check permissions to see if they match what was required in the wiki:


Thanks a lot for your reply. I have found the problem, that is I uploaded .htaccess file to wrong place. Seems I am using Joomla, therefore I opened Joomla’s .htaccess file and then added:

Options +ExecCGI
AddHandler php5-cgi .php
Action php-cgi /cgi-bin/php-wrapper.fcgi
Action php5-cgi /cgi-bin/php-wrapper.fcgi

at the end of the file in freespire OS. However, after I uploaded the file to the server using FireFTP in Windows, the website is now stopped working and displaying error message “500 Internal Server Error”. How could I solve the problem? Thanks.

Thanks a lot for your GREAT help. The system is now working properly with the modified PHP upload limit.

Cool. How did you fix the 500 Error?


That error is actually caused by php-wrapper.fcgi. After, I recreate the file using putty.exe, Joomla shows that maximum file upload is now 200MB which I set in php.ini. But, I haven’t try to do huge file size upload test. Anyway, thanks for your great help.