Help setting up Rev CGI

Are you using LiveCode to create server scripts or CGIs?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

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

Help setting up Rev CGI

Post by keyless » Wed Jun 04, 2008 8:30 am

I've got a Linux hosting account with GoDaddy. I'm have their new Hosting Configuration 2.0 which doesn't have a cgi-bin or cgi folder, supposedly you can just upload executables and CGI files to any folder. I've uploaded the engine (renamed Revolution) and "hello world" test file, I named test.cgi. I made sure they were both 755.

Doesn't seem to work. any suggestions?

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

Post by keyless » Wed Jun 04, 2008 9:26 pm

Doesn't look good. Godaddy only mentions perl,php,ruby & python when the mention CGI in help files.

Anyone ever use revcgi on godaddy hosting?

Tim
Posts: 29
Joined: Wed Oct 31, 2007 12:56 pm

Post by Tim » Thu Jun 05, 2008 10:10 am

Hi keyless,

Could you give us more information to go on please? i.e. Which version of the engine are you using? Also, what exactly does your "hello world" test.cgi program contain?

Regards,

Tim.

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

Post by keyless » Thu Jun 05, 2008 5:42 pm

Hi tim,

I was trying the 2.6.1 linux engine.

my cgi looks like this

Code: Select all

#!revolution 

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

I found this in the GoDaddy help files which makes it look like it might be able to work.
http://help.godaddy.com/topic/317/article/26

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 » Thu Jun 05, 2008 6:03 pm

1. try the 2.9 engine (build an app with linux included, then get the engine for linux from the revolution folder)
2. if your host offers it, look at the error logs, most of the time they contain something interesting if stuff doesn't run.
3. make sure your app and your text cgi are in the correct place to be run (some host allow cgi's to run anywhere).
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 » Thu Jun 05, 2008 6:15 pm

BvG wrote:1. try the 2.9 engine (build an app with linux included, then get the engine for linux from the revolution folder)
2. if your host offers it, look at the error logs, most of the time they contain something interesting if stuff doesn't run.
3. make sure your app and your text cgi are in the correct place to be run (some host allow cgi's to run anywhere).
I did try 2.9 engine
when I try and view my cgi file in browser, it just opens and shows the code, it doesn't process it or throw any error, so I doubt it is logging anything

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Post by Janschenkel » Thu Jun 05, 2008 7:11 pm

Then either Apache isn't configured to execute your files in the directory that you've stored them, or your cgi scripts don't have the 'executable' flag set. If it's the latter, you can fix that by typing

Code: Select all

chmod 755 <your file name>
from the command line.

Hope this gets you closer to a solution.

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

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

Post by keyless » Thu Jun 05, 2008 7:26 pm

Janschenkel wrote:Then either Apache isn't configured to execute your files in the directory that you've stored them, or your cgi scripts don't have the 'executable' flag set. If it's the latter, you can fix that by typing

Code: Select all

chmod 755 <your file name>
from the command line.

Hope this gets you closer to a solution.

Jan Schenkel.
I did set both to 755.

I noticed in the godaddy control panal that I don't have a CGI utility the help files say should be there, so I will contact their support.

Oh I see what the problem is, perhaps I need to upgrade to a Deluxe account to use straight CGI.
Last edited by keyless on Thu Jun 05, 2008 8:16 pm, edited 1 time in total.

Mark Smith
Posts: 179
Joined: Sat Apr 08, 2006 11:08 pm
Location: London, UK
Contact:

Post by Mark Smith » Thu Jun 05, 2008 8:08 pm

What extension are you giving your cgi scripts? Many servers do not have Apache configured to run scripts unless they have the ".cgi" extension.

Mark

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

Post by keyless » Thu Jun 05, 2008 8:18 pm

Mark Smith wrote:What extension are you giving your cgi scripts? Many servers do not have Apache configured to run scripts unless they have the ".cgi" extension.

Mark
I named it test.cgi


I need to check if I actually have a deluxe account with godaddy, just found out the standard doesn't do CGI.

Tim
Posts: 29
Joined: Wed Oct 31, 2007 12:56 pm

Post by Tim » Thu Jun 05, 2008 8:22 pm

Hi,

If you are using the 2.9 Linux engine, then things are a little different.

Firstly you need to use the Standalone engine. I cant off the top of my head remember where this lives - but I am sure someone will pipe in!

Take the Standalone engine and put it in your cgi-bin. Rename it to "Revolution" or something suitable. chmod as before.

You must use the -ui command line option when calling this (for no User Interface) so your cgi file (assuming you have renamed the Standalone engine to "revolution", and it is in the /cgi-bin/ folder) would be:

#!/cgi-bin/revolution -ui

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


One thing to note - your Web Host MUST have all the base X11 libraries installed. Although the -ui option does not create a user interface, it DOES still try and initilize some of the X libs - so these must be installed.

Hope all this helps,

Regards,

Tim.

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

Post by keyless » Thu Jun 05, 2008 8:43 pm

Tim wrote:Hi,

If you are using the 2.9 Linux engine, then things are a little different.

Firstly you need to use the Standalone engine. I cant off the top of my head remember where this lives - but I am sure someone will pipe in!

Take the Standalone engine and put it in your cgi-bin. Rename it to "Revolution" or something suitable. chmod as before.

You must use the -ui command line option when calling this (for no User Interface) so your cgi file (assuming you have renamed the Standalone engine to "revolution", and it is in the /cgi-bin/ folder) would be:

#!/cgi-bin/revolution -ui

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


One thing to note - your Web Host MUST have all the base X11 libraries installed. Although the -ui option does not create a user interface, it DOES still try and initilize some of the X libs - so these must be installed.

Hope all this helps,

Regards,

Tim.
it lives in the runtime folder.

I'm checking now to make sure CGI is turned on for my account. GoDaddy no longer used cgi-bin, they make it so cgi can be in any folder. I'll play with that as soon as I'm sure my account is CGI enabled

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

Post by keyless » Mon Jun 09, 2008 8:21 am

keyless wrote:
Tim wrote:Hi,

If you are using the 2.9 Linux engine, then things are a little different.

Firstly you need to use the Standalone engine. I cant off the top of my head remember where this lives - but I am sure someone will pipe in!

Take the Standalone engine and put it in your cgi-bin. Rename it to "Revolution" or something suitable. chmod as before.

You must use the -ui command line option when calling this (for no User Interface) so your cgi file (assuming you have renamed the Standalone engine to "revolution", and it is in the /cgi-bin/ folder) would be:

#!/cgi-bin/revolution -ui

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


One thing to note - your Web Host MUST have all the base X11 libraries installed. Although the -ui option does not create a user interface, it DOES still try and initilize some of the X libs - so these must be installed.

Hope all this helps,

Regards,

Tim.
it lives in the runtime folder.

I'm checking now to make sure CGI is turned on for my account. GoDaddy no longer used cgi-bin, they make it so cgi can be in any folder. I'll play with that as soon as I'm sure my account is CGI enabled

It was my account. Only GoDaddy's Deluxe Accounts and above have the CGI access I think I would need to get this to work.

Post Reply

Return to “CGIs and the Server”