Trouble with running on server
[1/5] from: fergus4::bellatlantic::net at: 24-Jan-2004 16:51
I cannot get my scripts to run on my server.
It is a Linux server running on Dual AMD 2.13 GHz.
I uploaded Rebol042 and renamed it rebol.
I've Chmod it for all Read and All Execute. (755)
My first line of my script points to the file...I think. I've tried so many paths but
none seem to work. I keep getting "Internal Server Error".
If I place rebol core in my cgi-bin directory and I run my script from that directory
what should the first line of my script look like?<
[2/5] from: SunandaDH:aol at: 24-Jan-2004 17:18
Hi Alan:
> It is a Linux server running on Dual AMD 2.13 GHz.
> I uploaded Rebol042 and renamed it rebol.
> I've Chmod it for all Read and All Execute. (755)
You also need to Chmod the script you want to run as 755.
> My first line of my script points to the file...I think. I've tried so
many
> paths but none seem to work. I keep getting "Internal Server Error".
>
> If I place rebol core in my cgi-bin directory and I run my script from
that
> directory what should the first line of my script look like?
Something like:
#!/----/cgi-bin/rebol -cs
where /---/ is the path to your cgi-bin folder. Other things to check:
-- do you have a REBOL header?
-- are you outputting a content-type header and a blank line before any HTML?
-- If you are uploading the script from a non-UNIX environment (Win, MAC) has
your upload converted the line endings correctly?
--Is the script free of syntax errors? Try 'DOing it in a REBOL console
session (tip:
quit: :halt
before you do)
Try this as a minimalist example:
#!/----/cgi-bin/rebol -cs
REBOL [] ;; empty REBOL header
print "Content-type: text/html^/" ;; print HTTP header and blank line
print "Allo Le Monde!" ;; print HTML page
quit ;; end with a Quit, not a Halt
If you are planning to do an extensive CGI development, check out some useful
toys in the Library, eg:
http://www.rebol.org/cgi-bin/cgiwrap/rebol/documentation.r?script=cgi-debug.r
Good luck!
Sunanda.<
[3/5] from: jason:cunliffe:verizon at: 24-Jan-2004 18:53
> My first line of my script points to the file...I think. I've tried so
many paths but none seem to work. I keep getting "Internal Server Error".
using regular Linux shell cd into the directory where your rebol is
then pwd to show the path
use that as the path in your first line of any scripts
#/somepath/somefolder/rebol -cs
That line does not use rebol path syntax. It uses the operating system path
syntax as returned by pwd
You can also use a relative path but full path maybe easier to debug
initially.
Also learn on your server where the server log files are stored. Then cd
into that using Linux shell and after you try any script which is not
working type
tail -10 error.log
error.log is the typical log file for errors your server produces.
The command above will show the last 10 lines of that file.
whenever I have trouble I keep am extra shell window open on this error.log
directory.
In my experience the most common trouble is permissions and the error.log
file can help confirm that.
Unfortunately they don't just say "permissions error" - instead something
aracan about 'corrupt message header'. Sorry I can remember the exact phrase
to google with.
When your scripts are working well no new items will appear at the tail of
the error.log file
hth
-Jason
[4/5] from: jason:cunliffe:verizon at: 24-Jan-2004 19:07
Premature end of script headers:
in the server error.log file means you have a permission problem
One of those nice user-friendly unix messages ;-)
- Jason <
[5/5] from: tim:johnsons-web at: 24-Jan-2004 15:22
* Alan <[fergus4--bellatlantic--net]> [040124 13:15]:
> I cannot get my scripts to run on my server.
>
> It is a Linux server running on Dual AMD 2.13 GHz.
> I uploaded Rebol042 and renamed it rebol.
> I've Chmod it for all Read and All Execute. (755)
Hi Alan:
> My first line of my script points to the file...I think. I've tried so
> many paths but none seem to work. I keep getting "Internal Server
> Error".
My version of rebol/core is at
/usr/bin/rebol
Cgi scripts are referenced as follows
; for cgi
#!/usr/bin/rebol -cs
; for internal scripting
#!/usr/bin/rebol -s
> If I place rebol core in my cgi-bin directory and I run my script from
> that directory what should the first line of my script look like?
I don't recommend it. I don't do it, so I don't know. Sorry.
And BTW, have your ScriptAlias'ed your cgi-bin?
to check cgi errors, you
should be able get those by
tail /var/log/httpd/error_log
(on RH 9.0)
as root or with appropriate privileges
I hope this is of some help.
regards
tim
--
Tim Johnson <[tim--johnsons-web--com]>
http://www.alaska-internet-solutions.com<