Here is an article in wiki on how to customize php.ini file. I'm not sure whether you are following this.
I believe you will need to modify these two variables in php.ini file
I don't think putting gallery in a private password protected folder causes any problem. But if it is for your private backup, you may have broken Dreamhost TOS. According to TOS, all the files in our server are for hosting but not for personal backup. Be careful.
$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] [url=http://dreamhost.com/r.cgi?296804/signup|DH3]Sign Up NOW[/url] or More Codes Here