|
Pages: [1]
|
 |
|
Author
|
Topic: My rebol script works on SSH but not (Read 538 times)
|
|
rebolnotes
|
I uploaded rebol to /usr/bin directory of my webhosting service (redhat linux). Change permissions to 755 and test by typing do %bin/test.r
It's ok.
Then I uploaded in cgi-bin directory of my server which is /var/www/cgi-bin/ this script (transfer type is ascii, end character is unix, and chmod 755)
#! /user/bin/rebol -c REBOL [Title: "Server Time"] print "content-type: text/html^/" print [<HTML><BODY>] print ["Date/time is:" now] print [</BODY></HTML>]
It doesn't work, the error log shows: Premature end of script headers: reboltest.cgi
My perl script on the other hand did work #! /usr/bin/perl print "Content-type: text/html\n\n"; print "<html><body><h1>Hello World!"; print "</h1></body></html>\n";
as well as my python script: #!/usr/bin/python
# Required header that tells the browser how to render the text. print "Content-Type: text/plain\n\n"
# Print a simple message to the display window. print "Hello, World!\n"
|
|
|
|
« Last Edit: June 17, 2007, 02:12:36 PM by rebolnotes »
|
Logged
|
|
|
|
|
Gabriele
|
What do you get if you run the script directly? (ie. type /var/www/cgi-bin/script.cgi on the command line)
|
|
|
|
|
Logged
|
|
|
|
|
rebolnotes
|
What do you get if you run the script directly? (ie. type /var/www/cgi-bin/script.cgi on the command line)
/var/www/cgi-bin/perltest.cgi works whereas /var/www/cgi-bin/reboltest.cgi gives this error message: bad interpreter: no such file or directory ( yeah I'm not really a Unix Guru  )
|
|
|
|
|
Logged
|
|
|
|
|
PeterWood
|
Is the directory correct in your shebang line?
#! /user/bin/rebol -c
You mentioned that you saved rebol in /usr/bin/rebol.
|
|
|
|
|
Logged
|
|
|
|
|
Gabriele
|
In your example above you used #!/user/bin/rebol - isn't that #!/usr/bin/rebol ?
|
|
|
|
|
Logged
|
|
|
|
|
rebolnotes
|
In your example above you used #!/user/bin/rebol - isn't that #!/usr/bin/rebol ?
Oops sorry I didn't sleep enough that day 
|
|
|
|
|
Logged
|
|
|
|
|
|
Pages: [1]
|
|
|
 |
News: 01-09-08 Alpha version of REBOL 3 has been released!
2295 Posts in 593 Topics by 3766 Members
Latest Member: SpombSibpap
|