Setting up a Rev CGI Environment in your Dreamhost Web Space

Are you using LiveCode to create server scripts or CGIs?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
phildavis
Posts: 2
Joined: Sat Apr 08, 2006 6:24 pm
Location: West Linn, Oregon USA

Setting up a Rev CGI Environment in your Dreamhost Web Space

Post by phildavis » Fri Apr 14, 2006 5:24 am

A few months ago I opened a web hosting account at dreamhost.com. You may have seen Dreamhost mentioned on the use-revolution list as a 'preferred host', and they do deliver a lot of bang for the buck. The URL is http://dreamhost.com .

With the help of other Rev users on the use-revolution list, I recently set up a Revolution CGI environment on my dreamhost.com web site. It wasn't hard!

Here's what I did:

Download the Linux version of Revolution to my local computer. My Dreamhost web space is on a Debian Linux server (so says their support people), so I downloaded the Rev Linux install from here:
http://downloads.runrev.com/revolution/ ... /linux.tgz

Decompress and extract the download. The .tgz means it's a 'gz' compressed .tar file. The .tar file was created by 'gluing' all parts of the Revolution installation together into one big 'tarball'; then the .tar file was compressed.

The standard unzip feature in Windows XP doesn't know what to do with a .tgz file, but WinZip does. On Mac OS X, the standard archive tool can handle it.

Upload the essential parts to your web space. I was able to get Rev CGI scripts to work by uploading only the revolution.x86 file. I created a directory in my server space and put this file and all my CGI's in there.

Set permissions. You can do this with most FTP applications - any that has a CHMOD function. Dreamhost supports only FTP connections, so it's a good thing! Traditionally, the permissions for an executable thing (including your CGI scripts) are set to '755'.

You're Done! Now you're ready to create, upload and run Rev CGIs.

toddgeist
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 21
Joined: Sat Apr 15, 2006 9:12 pm

Can't get it to work

Post by toddgeist » Tue Apr 18, 2006 4:47 pm

Hello,

I tried to follow the directions, but I am getting an 500 Internal Server Error.

I placed both the engine and my very simple "hello world" script in a folder called rev. My FTP client (Transmit) reportsd that both are set to 755. My text editor (TextWrangler) reports that the line breaks are Unix.

Here is my script

Code: Select all

#!revolution

on startup
  put "Content-Type: text/plain" & cr & cr
  put "Hello World!"
end startup
IN my Dreamhost Control Panel I have the "Extra Security" box checked, and I have "fast cgi support" checked.

Any ideas why this is not working?

Thanks

Todd

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5462
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Post by FourthWorld » Fri Apr 20, 2007 9:05 pm

FWIW, I just learned something about working with DreamHost servers which may save some of you some time:

Apparently if your file ends in suffixes other than ".cgi", rather than execute it'll just return the file's contents. This is true even when the execute bit is set correctly for the file's permissions.

On other server's I've used the suffix is unimportant, and I commonly use ".mt" as is the old MetaCard convention.

But with DreamHost, your files will work great once you rename them to end with ".cgi".

cyoung_mi
Posts: 4
Joined: Mon Mar 17, 2008 12:31 am

Post by cyoung_mi » Thu May 15, 2008 3:29 am

Now that the new version is out..
the above links no longer work.

Where do we go to download what we need to get CGI's working?

Post Reply

Return to “CGIs and the Server”