CGI Setup Problems with GoDaddy

Are you using LiveCode to create server scripts or CGIs?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
archimede
Posts: 7
Joined: Fri Oct 17, 2008 4:01 pm

CGI Setup Problems with GoDaddy

Post by archimede » Fri Oct 17, 2008 4:14 pm

Hi everybody,
I have a GoDaddy Linux hosting account and I would like to setup a Revolution CGI.

I followed carefully all the instructions I found on the Hyperactive Software website:

-I converted the script linefeeds to the Linux/Unix format;
-I set the script extension to .cgi;
-I uploaded the Revolution Unix engine (version 3.0) living in the 'Runtime' folder and renamed it 'revolution';
-I set all file permissions to 755

...and,last but not least,I have a Deluxe account that should support CGIs.
Unfortunately,when I try to run my script opening the link myhost.com/cgi/test.cgi,the browser returns a '500 Internal Server Error'.
Where did I go wrong?
When you say I have to install the Revolution engine,does this mean I have to upload the entire x86-32 folder,including the Externals,or just the 'Standalone' file?

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Post by BvG » Sat Oct 18, 2008 11:36 am

if there's a scripting error in the cgi, then it won't work. Try a very minimalistic cgi, to avoid that (and maybe post it for us to look over). As for the engine, you need just the executable, but it has to be the correct one for the target platform. normally that'd be the linux engine named "standalone" from this folder: "your rev installation/runtime/linux/x85-32"
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

archimede
Posts: 7
Joined: Fri Oct 17, 2008 4:01 pm

Re:

Post by archimede » Sat Oct 18, 2008 8:31 pm

I don't think there are script errors.I did use a very simple script.It's the sample script used in the HyperActive tutorial:

#!revolution

on startup
put "Content-Type: text/plain" & cr & cr
put "Hello World!"
end startup

I've even tried to replace the first line with #!revolution-ui,given that my engine version is newer than 2.7.
Then I converted it to the Unix format using two automated conversion utilities.The standalone file I uploaded is the one required for the Linux platform.

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Post by BvG » Sat Oct 18, 2008 9:12 pm

The -ui is mandatory, but needs a space. Also the string at the start depends on the actual name and place of the engine, and some hosts demand that you to put the full path there, so watch out for that. Try this script (with appropriately changed name of the engine at the start):

Code: Select all

#!engineNameHere -ui

on startup
put "Hello World!" into buffer
put "content-type: text/plain; charset=ISO-8859-1"  & cr
put "Content-Length:" && the length of buffer & cr & cr
put buffer
end startup
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

archimede
Posts: 7
Joined: Fri Oct 17, 2008 4:01 pm

Re:

Post by archimede » Sat Oct 18, 2008 11:42 pm

I've added the blank space to the first string,but no way.
Then I've also tried to add the path details:

#!cgi/revolution -ui

on startup
put "Content-Type: text/plain" & cr & cr
put "Hello World!"
end startup


but it still doesn't work.The CGI,however,lives in the same folder that contains the engine.

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Post by BvG » Sun Oct 19, 2008 12:15 pm

with path I meant the whole path of your virtual hosting folder, most often something in the rein of (not an actual example):

serv233/users/vhost1277/u1232378/webserver/cgi-bin/


In addition, there might be some error reporting build into your hosting service. Can you look if that exists, and if then what it reports when you try to run the script?

Finally if you have the possibility of telnet (most don't), maybe you could try to run the engine via telnet (again with the -ui param), because then errors would show up directly in the terminal.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

keyless
Posts: 211
Joined: Wed Dec 12, 2007 11:21 pm

Post by keyless » Tue Jun 09, 2009 2:46 am

Were you able to get Rev CGI working on GoDaddy Deluxe account? Was thinking of upgrading my acount, but wanted to know if it worked first.

Post Reply

Return to “CGIs and the Server”