Problem in getting start CGI (installation problem)

Are you using LiveCode to create server scripts or CGIs?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
alex298
Posts: 101
Joined: Mon May 01, 2006 1:17 pm

Problem in getting start CGI (installation problem)

Post by alex298 » Wed Nov 29, 2006 11:41 am

Hello,

******************
Server: Linux
******************

I followed through the installation procedures:

1. CHMOD cgi-bin directory to 755

2. Upload the Revolution Application (version 2.6.1) to the cgi-bin directory.

3. Rename the filename of Revolution Application to "revolution".

4. Upload the cgitool.rev engine to cgi-bin directory.

5. CHMOD cgitool.rev to 755.

6. upload a test file (hello.cgi) to cgi-bin directory.

7. CHMOD hello.cgi to 755.

However when I run the hello.cgi, the famous "Internal Server Error" is always appear.

I tried to CHMOD revolution 755 and 555
I also tried I tried to CHMOD cgitool.rev and hello.cgi to 555.

However the same error appear.

Any idea how to solve the problem?

Thanks and best regards

Alex
Alex
Nice to meet all of you.

marielle
Livecode Opensource Backer
Livecode Opensource Backer

Re: Problem in getting start CGI (installation problem)

Post by marielle » Wed Nov 29, 2006 12:17 pm

You seem to do everything right.

Does your cgi look like this?

Code: Select all

#!revolution

on startup
  put "Content-Type: text/plain" & cr & cr
  put "Hello World!"
end startup
From what you say, I understand that revolution is in the same directory. If not, you may need to use this syntax: #!/home/httpd/cgi-bin/revolution.

I would bet you already read it. In case not, for more info: Introduction to Revolution CGIs
Last edited by marielle on Wed Nov 29, 2006 12:49 pm, edited 1 time in total.

marielle
Livecode Opensource Backer
Livecode Opensource Backer

Post by marielle » Wed Nov 29, 2006 12:46 pm

I had installed it on another server before but don't have access to it anymore. Your post decided me to install it on my current server.

test.cgi

with the following test file

Code: Select all

#!revolution

on startup
  put "Content-Type: text/plain" & cr & cr
  put "Hello World!"
end startup
Same config as you describe...

With this thing to be careful about. If you upload the file as "revolution" then your ftp client may be tempted to treat is as text (the first characters of the file are text). A useful precaution is to name your file revolution.bin, upload it, then rename it... alternatively make sure the file is uploaded as a binary.

This one : test2.cgi doesn't work when the "revolution" file got uploaded as text.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5147
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Nov 30, 2006 1:59 am

Are you sure that it is possible to install the Rev cgi engine on your server at all? If yes, you might want to try different versions of the engine. I know of one server that only works with an older version and another server that only works with a newer version of the Rev engine.

I don't think you need cgitool.rev for the "hello world" script. Make sure to save your script files in unix format.
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

marielle
Livecode Opensource Backer
Livecode Opensource Backer

Post by marielle » Thu Nov 30, 2006 2:17 pm

Mark wrote:I don't think you need cgitool.rev for the "hello world" script. Make sure to save your script files in unix format.
That's exact. cgitool.rev is nowhere on the server for the demo above. In fact cgitool.rev is something to run on your desktop that helps you install the revolution cgi engine on your server (but doing it manually is often good enough).

alex298
Posts: 101
Joined: Mon May 01, 2006 1:17 pm

Post by alex298 » Fri Dec 01, 2006 3:13 pm

Hi all,

Thanks for your help. But still no luck on that :cry:

## Does your cgi look like this?

Yes, I just copied from the tutorial:)

## From what you say, I understand that revolution is in the
## same directory.

Yes, all in the cgi-bin directory.

## I would bet you already read it. In case not, for more info:
## Introduction to Revolution CGIs

Yes, I read it before I tried to use RR as CGI. This is really an excellent tutorial.

## Are you sure that it is possible to install the Rev cgi engine on
## your server at all?

Actually I am not sure. This is just a shared web hosting account.

## If yes, you might want to try different versions of the engine.

Sorry, I am quite don't understand this. In fact I only have a version of the cgitool.rev engine. But you mentioned that cgitool.rev is really not required.

Thanks and best regards

Alex
Alex
Nice to meet all of you.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5147
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Fri Dec 01, 2006 3:32 pm

Alex,

Frist of all, you have to put the Revolution engine into your cgi-bin folder. On Windows, this would be revolution.exe, on Unix, Linux and Mac OS X, the engine is usually simply called revolution.

Go to ftp://ftp.runrev.com and download the cgi engine or one of the other distributions. If you decide to download a non-cgi distribution, you can take out the engine from that distribution and upload it to your server, into the cgi-bin folder.

You must use at least version 2.0.2 and no later than 2.6.1. Rev 2.7.0 and later will not work as a cgi engine.

I don't know what "just a shared web hosting account" means, but if this is some free service, you will probably be unable to run rev cgi on it. You could try a free account at www.memebot.com to experiment with. You should get a paid hosting service to install your own rev cgi engine. If you want, I can look up a few recommendable web hosts.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply

Return to “CGIs and the Server”