Dreamhost Moved You to a New Server and Your Site Shows an 'Internal Server Error'
If you had a custom php.ini setup on your website, using http://sxi.sabrextreme.com/dh-phpini then this post is to help you fix the Internal Server Error after a Dreamhost server migration and then restore your previous custom php.ini entries.
—————————————————————
Step 1. Delete these lines from ~/<yourdomain.com>/.htaccess
#--- DH-PHP handlers --- AddHandler fastcgi-script fcg fcgi fpl AddHandler php-fastcgi .php Action php-fastcgi /cgi-bin/dispatch.fcgi
After this your site should work again, without the Internal Server Error, but you’ll still need to put your custom php.ini values back in-place with the subsequent steps.
—————————————————————
Step 2. Set domain to use PHP 5.3 in Dreamhost Control Panel (Manage Domains -> Click ‘Edit’ Under Fully Hosted User For Domain You Want to Update -> Web Options / PHP Mode Select: PHP 5.3.x FastCGI (default) -> Click ‘Change Settings’ -> Wait 10 minutes or so before doing step 3)
—————————————————————
Step 3. Per http://wiki.dreamhost.com/PHP.ini#phprc “In your user’s home directory /home/<username>/ make a new folder .php. This folder name starts with a ‘.’ or dot, and if you’re using an FTP program you may need to turn on “view hidden files and folders” to see it after you make it. Inside that make another folder 5.3. The shell command for all that is:”
mkdir -p ~/.php/5.3
—————————————————————
Step 4. In ~/.php/5.3/ create a new text file called: phprc
—————————————————————
Step 5. Put any php.ini custom values in phprc, for example if you wanted to increase your upload filesize limit:
upload_max_filesize = 50M post_max_size = 50M
To note, you should be able to look through your previous custom php.ini values in /home/<username>/<yourdomain.com>/cgi-bin/php.ini
—————————————————————
Step 6. (optional) Run this terminal command to apply the updates, or optionally just wait 10 minutes or so for the updates to take effect on their own.
killall php53.cgi
—————————————————————
Step 7. Verify your new settings were applied by viewing the output of the following in a PHP page:
<?php phpinfo(); ?>
—————————————————————
Hopefully your website is working 100% again at this point.
















