World: r3wp
[CGI] web server issues
older newer | first last |
Graham 26-Aug-2005 [280] | You're missing Lady and Lord in that list of titles :) |
François 27-Aug-2005 [281] | You are right, i will add them as soon as possible ;-) |
Sunanda 27-Aug-2005 [282] | Looks good. The problem with having a list of titles is you'll *never* think of them all [Ambassador, Brother, Comrade :-)] A type-in field would be more flexible. |
François 27-Aug-2005 [283x2] | Well, i indeed think this is kind of silly. I will therfore limit to the 3M: Mister, Madam and Miss... |
I will add a tab 'Projets' with sub-tabs 'All', 'Rebol', 'Non rebol' where a reboler can describe projects he/she made are intend to make... | |
Jean-François 27-Aug-2005 [285] | I would be curious to know what are Zip code called in other countries. Here in Canada we have postal codes. How about France, Germany, Italy, GB, etc... |
Ashley 27-Aug-2005 [286] | Post codes in Australia (4 digits with the first indicating state ... most of the time) |
Gabriele 27-Aug-2005 [287x2] | CAP, Codice Avviamento Postale (postal startup code, no idea what startup has to do with it) |
... for italy | |
Sunanda 27-Aug-2005 [289] | post code in the UK -- a convoluted combination of letters and digits with a space in the middle. |
Ingo 27-Aug-2005 [290] | Postleitzahl (PLZ) in Germany, 5 digits, more or less starting with low numbers in the north, and ending with high numbers in the south. |
Jean-François 28-Aug-2005 [291] | buy the way, the ZIP in Zip code stands for Zone Improvement Plan. So, I guess when making an international form to input adress, we should maybe ask for "postal code" or " post code", it might be more generic then ZIP code. |
yeksoon 28-Aug-2005 [292] | Zip = Postcode in Singapore (6digit) |
Gregg 29-Aug-2005 [293] | Postal Code is a common generic term in UIs. |
François 5-Sep-2005 [294] | The Rebol Directory Project has been updated... www.rebolgique.net |
Volker 5-Oct-2005 [295] | what do i put in .htaccess to make rebol-files non-text/plain? and what return i in headers from cgi? |
Sunanda 5-Oct-2005 [296] | This is what we do at REBOL.org: print "Content-Type: text/plain" print "Content-Disposition: attachment; filename=sqd.r" You can see that one in action with this URL: http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=sqd.r |
james_nak 25-Oct-2005 [297] | I'm trying to set up rebol in my new host and I'm coming up with "Premature end of script headers" in the error log. "Server error 500 " shows up in the browser, btw. I'm going through my usual routine of error checking. Does anyone know what the permissions are for the cgi-bin directory are to be at. One time, long ago, I had this problem and fixed it with chmod. The files themselves are set to 755. |
Volker 25-Oct-2005 [298] | 5 is read execute, that should be ok. script-headers is the "Content-type: text/html^/^/". When you have output on rebol-side before (like error-message), this is the servers way to handle that. my usual way is to put "Content-type: text/plain^/^/" as first statement and get readable output that way. Does not help if the script is not running at all of course. btw, the rebol-exe has the right args too? Easy to forget. |
james_nak 25-Oct-2005 [299] | Yes, I actually moved over a script I know worked (from the rebol viewpoint). |
Volker 25-Oct-2005 [300] | Means rebol runs there, your script not? |
james_nak 25-Oct-2005 [301x3] | Wow, don't know why but it works now. Thanks Volker. |
I'll backtrack to see what had happened. Me thinks it has to do with the my script "do"ing a library script. Maybe something was wrong with that. | |
Of course it always worked on the other hosts. | |
Volker 25-Oct-2005 [304] | most time path-issues then. some folderpath changed i guess. |
james_nak 25-Oct-2005 [305x2] | Btw, I just got one of those virtual dedicated servers and so there are a lot of little things I have to do which I didn't owrry about before. |
owrry = worry | |
Volker 25-Oct-2005 [307] | but if the script runs, you can track the error-message. either by that header, or also helpfull: echo %/make-sure-you-can-write-here/echo.txt . that captures the last output, and you can use ftp to look at it. |
james_nak 25-Oct-2005 [308x2] | Good idea. I just went back and recreated a 2nd test and it worked fine as well. Hmmmm. |
I bet the chmod didn't take. | |
Volker 25-Oct-2005 [310] | thats another trap :) i always ls the rights after a change now.. |
james_nak 25-Oct-2005 [311] | Yep. Isn't it crazy how many changes we make when it's something rather easy after all? |
Volker 25-Oct-2005 [312x2] | Setting up configurations? yes, thats true. |
After all Carl decided to do rebol when he set up a linux-server.. | |
james_nak 25-Oct-2005 [314] | Well, then I'm glad it's difficult. With me it's about everything. Back to testing. Thanks alot. |
Sunanda 25-Oct-2005 [315] | < "Premature end of script headers"> Usual cause: wrong line terminations....Maybe you uploaded a test file from/to UNIX/MAC/Win without checking the "asciii" box to get automatic CRLF/CR/LF conversions. |
james_nak 26-Oct-2005 [316] | Sunanda, thanks. I have in fact done that before. I think what was really happening was that the files were not chmoded correctly. All is well now including mysql through Rebol (which I thought was going be very difficult to fix). Again thanks. |
RebolJohn 15-Nov-2005 [317] | Hello everyone.. I have a CGI problem/question. I have a Win-apache-rebol server that isn't propagting the cgi info properly.. Upon posting.. the query-string is empty. I am not sure what I am missing.. Details: page1.rcgi ======================== #!c:\rebol\rebol.exe -cs rebol [] print "content-type: text/html^/" print "<html><body>" print " <form action='page2.rcgi' method='POST'>" print " <input type='text' name='var01' size='16' value='test'>" print " <input type='submit' name='go' value='Lookup'>" print " </form>" print "</body></html>" page2.rcgi ======================== #!c:\rebol\rebol.exe -cs REBOL [ ] print "content-type: text/html^/" print "<html><body>" print mold system/options/cgi print "<hr>" print "</body></html>" if I .. ( decode-cgi system/options/cgi/query-string ), my vars are all undefined. Also, looking at the 'print mold system/options/cgi' shows query-string="" if I change page1 form-action to ... "action='page2.rcgi?x=123" then the query-string on page2 gets populated with x=123 and the value 123 gets assigned to 'x' when I 'decode-cgi'. However, my form fields NEVER get populated. Does anyone have any advice? John. |
Sunanda 15-Nov-2005 [318] | You are using "post" -- that needs some extra processing compared to get. See: http://www.rebol.com/docs/cgi2.html-- loook for read-cgi function |
RebolJohn 15-Nov-2005 [319] | Duh.. Thanks alot. I changed it to GET and all works fine. I have been scrappin' over this for 3 days now. Thanks again. |
Sunanda 15-Nov-2005 [320] | Glad to help......Get is probably better unless the form data exceeds 1k or so. |
BrianH 15-Nov-2005 [321] | I prefer to use get for variables that are part of a logical location, like a page viewer, search variables and such. I use post if the data being submitted causes changes (other than logging and such). Anything you want to be bookmarked you pass with get. |
Sunanda 15-Nov-2005 [322] | Get is also repeatable....useful if you have a convoluted script or need to re-read the variables (eg in an error handler to log what triggered the problem). Whereas post reads from a port and exhausts its input. |
Volker 1-Dec-2005 [323] | Is there an example for temple somewhere? Was quite surprised google found nothing, and i got the source finally through detective. Now i need to get the cgi started and a simple demo. |
Chris 1-Dec-2005 [324] | Has it actually been released? I thought last word was that it was due for some optimization... |
Pekr 5-Dec-2005 [325x4] | I just today was supposed to do quick small form maintanance using Rebol. My friend gave-up on php, as he can't code. So - basically it all worked, I just have few questions: |
1) How do I prevent printing rebol output, e.g. error messages to the browser? What is general aproach here? Should it be avoided to not eventually disclose script's content? | |
2) how secure is following? str: copy "" result: decode-cgi read-cgi foreach [word valu] result [append str join "" [word ": " value newline] I mean - above block in 'join statement is reduced - is it secure? | |
3) I have older version of rebcmd from linux sdk I bought. But it did not used 'read-cgi at that time (well, here we are with SDK coming late ;-) My question is - I uploaded rebol core into cgi-bin directory: a) is it desirable aproach or should it be avoided? b) how do I assure, that if I ftp rebol executable to cgi-bin dir, to have sufficient right of the target directory, so that it could be run? | |
Graham 5-Dec-2005 [329] | mostly that's where i put it .. I can't put it anywhere else |
older newer | first last |