You are not logged in (Sign In)

Dreamhost Setup Tips

Dreamhost currently offers XSLT Support

From the Dreamhost Users Wiki (as per January 30, 2008): When attempting to install Symphony, if you encounter the following error message “Your PHP Installation does not have an XSL processor available,” please submit a support ticket [to Dreamhost support] and request that PHP be recompiled on your server with XSLT support. Some XSLT Processor options include Sablotron XSLT (PHP4) or LibXSLT (PHP5).

If images outputted through Symphony’s image controls are loading in your browser as garbled code, simply request that [Dreamhost] support recompile PHP on your server with GD support. This should alleviate the problem.

Dreamhost Setup: An outdated / alternative solution

Configuring php.ini (example allow_url_fopen)

DreamHost php5.ini file does not allow external document() XSLT requests. This will look specifically at turning allow_url_fopen on, but is easily customizable for other configs.

Much of this info was taken from the DreamHost wiki

First make sure your user has ssh access through the DreamHost panel.

To access your site through ssh enter the following in a terminal window:

ssh username:domain.com

Next, create a cgi-bin directory:

mkdir ~/[your website directory]/cgi-bin/

This directory will be hosting your local copy of php and your php.ini file.

Next we will create a script to retrieve the latest copy of php.cgi and php.ini and quickly modify the php.ini file to allow fopen access.

Make a file in ~/ called php-update.sh containing the following, where [your website directory] is appropriately substituted.

For PHP4:

#!/bin/sh
CGIFILE="$HOME/[your website directory]/cgi-bin/php.cgi"
INIFILE="$HOME/[your website directory]/cgi-bin/php.ini"
cp /dh/cgi-system/php.cgi "$CGIFILE"
cp /etc/php/cgi/php.ini "$INIFILE"

perl -p -i -e '
s/.*allow_url_fopen.*/allow_url_fopen = On/;
' "$INIFILE"

For PHP5:

#!/bin/sh
CGIFILE="$HOME/[your website directory]/cgi-bin/php.cgi"
INIFILE="$HOME/[your website directory]/cgi-bin/php.ini"
cp /dh/cgi-system/php5.cgi "$CGIFILE"
cp /etc/php5/cgi/php.ini "$INIFILE"

perl -p -i -e '
s/.*allow_url_fopen.*/allow_url_fopen = On/;
' "$INIFILE"

Prepare script for execution

Execute the following commands in your ssh session. This will give you permission to execute the php-update.sh that we just created.

chmod +x php-update.sh

Now we will execute the script to copy the php.cgi and modified php.ini files into our cgi-bin directory.

./php-update.sh

Set up a cron task to keep php up to date

If there are no errors, type:

crontab -e

And then enter the following in the text editor that shows up:

@weekly /home/myusername/php-update.sh

This will update the php binary and config file once a week and ensure you’re up to date with any DreamHost updates.

On OS X the editor that will most likely appear is pico. To save your changes and exit press ctrl+X choose Yes and accept the default file name. Configure your website to use new the php.ini that we just set up

Edit your .htaccess file ~/[your website directory]/.htaccess to contains the lines:

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

This is telling Apache (the webserver) to use the php.cgi and php.ini that php-update.sh copied into ~/[your website directory]/cgi-bin.

 
You are not logged in
installation-and-configuration/compatible-hosts/dreamhost/setup-tips.txt · Last modified: 2008/01/30 20:30 by tfp