I use to just go here, http://iamskwerl.com/tech/2008/09/customizing-php5-on-dreamhost/ and follow that guide, and it'd work perfectly, but as of the past few months there's been a hitch in the install and no longer works. Anyone have any information they can throw my way or how I should go about this to get around the 7mb upload limit they have set? This is through Drupal, of course I can use FTP and upload much larger, but that will not suffice for our purposes.

Thanks for any help, I'm pretty lost.

I also found this wiki on it.

http://wiki.dreamhost.com/Custom_PHP.ini#Alternate_Non-shell_method

Not sure what to make of it, or how 'safe' it is to go about things that way in the long run.

Comments

aklouie’s picture

Here's what I ended up doing with a custom php.ini

Add to .htaccess

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

----------------------

Create directory cgi-bin and the files php-wrapper.cgi and php.ini. Directory must be executable

Use the dreamhost wiki's method for copying the default php.ini and change the max file sizes in it.
-----------------------

php-wrapper.cgi, ensure exectuability

#!/bin/sh
exec /dh/cgi-system/php5.cgi $*

-----------------------

And that worked for me

christopherareed’s picture

Woot, took 5 minutes, worked!

butler360’s picture

In case anyone else finds this topic, download this php file: http://sxi.sabrextreme.com/forum/viewtopic.php?f=2&t=2
Upload it to your server, run it, and go from there! Couldn't be easier. Then just find max_upload_limit and set it to a reasonable amount.

bowersox’s picture

This same technique helps work around Dreamhost's memory_limit and max_execution_time when running long sets of tests. If you are Getting Started with SimpleTest for Drupal 7 development you might need this technique.

Here are the php.ini settings I applied locally:

max_execution_time = 180
memory_limit = 256M

Brandon Bowersox-Johnson

theohawse’s picture

Hey guys, I ran the custom dh-phpini.php script from above, had to make a couple slight changes after it ran, here they are:

php.ini
chmod: 640
-Modified as needed


dispatch.fcgi
chmod: 755

#!/bin/sh
export PHPRC=/
export PHP_FCGI_CHILDREN=2
exec /dh/cgi-system/php5.cgi $*


dispatch.cgi
chmod: 755

#!/bin/sh
export PHPRC=/home/put-dh-user-here/put-domain-here.com/cgi-bin
exec /dh/cgi-system/php5.cgi


top of .htaccess

#--- DH-PHP handlers ---
AddHandler fastcgi-script fcg fcgi fpl
AddHandler php-fastcgi .php
Action php-fastcgi /cgi-bin/dispatch.fcgi



Also: there were tons of 500 error pages, but those disappeared after chmod'ing permissions, clearing browser cache, drupal cache and forcing it through update.php, cron too .Just somethin else to try for those bashing their heads against a wall :)