Relay
From DreamHost
| The instructions provided in this article or section require shell access unless otherwise stated. You can use the PuTTY client on Windows, or SSH on UNIX and UNIX-like systems such as Linux or Mac OS X. |
Contents |
Prepare for Relay
You will need a database for this
When you got
- hostname (not localhost)
- databasename
- username
- password
You can continue
Install Relay
Login to your shell and browse to the folder where you want the relay folder to be
cd ~/mydomain.com
Download the latest distro
wget http://ecosmear.com/relay/download.php?download=true
Unpack the file
unzip relay*.zip
Remove the zipfile
rm relay*.zip
Change permissions
chmod 755 relay/ chmod 755 relay/upload.pl chmod 755 relay/uploads/ chmod 755 relay/filestore/
We have to make a little manual workaround to get the uploading to work.
Open install/index.php
nano relay/install/index.php
Search for file_get_contents..
Replace
$response = file_get_contents($uploadPath);
With
$ch = curl_init(); $timeout = 5; // set to zero for no timeout curl_setopt($ch, CURLOPT_URL, $uploadPath); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $response = curl_exec($ch); curl_close($ch);
Save the file
You wont need the shell from now on
Configure Relay
Now open up FF or another browser and go to http://yourdomain.com/relay/install/index.php
You should now see a pretty form where you should supply
- Database Hostname (NOT localhost)
- Database Name
- Database User
- Database Password
- Admin Name - Changes as you wish
- Admin Password - Change as you wish
- GhostScripts should be changed to /usr/bin/gs/
- ImageMagick should be changed to /usr/bin/convert
Click the button at the bottom.
You should now see a "log" where the last line is
Verifying Perl Installation... for the upload script @ http://yourdomain.com/relay/upload.pl?test ...done...
Now browse to http://yourdomain.com/relay/
You should be able to login with the admin name and password you entered in the beginning.
Please note that due to the 8M memory_limit imposed by Dreamhost (regardless of custom php.ini),you will be limited to 16MB uploads, and the download cart will fail to zip large files as well.
External links
Thx to

