AltME groups: search
Help · search scripts · search articles · search mailing listresults summary
world | hits |
r4wp | 106 |
r3wp | 1460 |
total: | 1566 |
results window for this page: [start: 1 end: 100]
world-name: r4wp
Group: #Red ... Red language group [web-public] | ||
Pekr: 4-Jun-2012 | Red is compiled, it is not a convenient solution imo to work with CGI imo ... | |
Endo: 4-Jun-2012 | Red will have scripting support I think, so it can be used as CGI. | |
Kaj: 4-Jun-2012 | Red is actually quite suitable for CGI, because the compiled executables are absolutely tiny, like they were in languages such as C when CGI was introduced. This means the performance will be quite good, not like the performance hit CGI suffers with heavy modern programming environments such as REBOL where the whole virtual machine needs to be started for every request. At the same time, you still have the advantages that made CGI popular: simplicity, robustness and security | |
Kaj: 4-Jun-2012 | You'll have to research the CGI interface a bit and maybe make it like the REBOL one. It's quite simple: you need standard output, which is just printing, standard input, and reading environment variables | |
Pekr: 14-Sep-2012 | Could you please elaborate? Is red executable going to be kind of launcher for our scripts? Hence it compiles them before running it? Most probably not a solution for CGI, as the compilation stage will happen each time? | |
DocKimbel: 14-Sep-2012 | For CGI, you should obviously pre-compile them if you want performances. The future JIT-compiler should be able to handle such cases fine though. But yes, the goal is to be able to run Red scripts directly in the same way REBOL does. The fact that Red compiles them should be transparent to users. The -o option will be roughly equivalent to what encap provides (except that scripts will be compiled to native code). | |
GrahamC: 22-Sep-2012 | OpenSSH is BSD http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/LICENCE?rev=HEAD | |
Arnold: 24-Sep-2012 | Is it necessary for a tryred to have Red be able to process cgi on the webserver. | |
Arnold: 26-Sep-2012 | Now Red can output texts it can produce strings with html code? And so theoretically is up to CGI processing maybe with a little help from REBOL. Or is that too early? | |
DocKimbel: 26-Sep-2012 | We could add CGI support earlier though. | |
GrahamC: 26-Sep-2012 | Addimg CGI support early would be good ... for online demos | |
Kaj: 26-Sep-2012 | CGI is based on the same principle. It's supposed to be a gateway from a Unix web server to a Unix file system, so you can secure it with operating system tools | |
Arnold: 27-Sep-2012 | Adding CGI would be good for online demo's? Well for building web-sites too! Finally drop php. | |
Arnold: 27-Sep-2012 | Unfortunately my websitehoster has a plesk system with Apache on it. I managed to have REBOL CGI working on it. It will process .r .rsp files. | |
Kaj: 28-Sep-2012 | I do that, too, but there's no CGI there, then | |
Arnold: 30-Nov-2012 | Great explanations Nenad! My apologies if sometimes I seem to ask for the known things.. For the documentation we need a Red marker pen and mark the REBOL documentation where appropriate for Red. I took a little time (just 5 minutes LoL) to see if I could find a starting point for the documentation extraction script from the suggested makedoc2.r script but 'parse is not my best REBOL skill. Besides graphics and a killer application as Pekr described, having CGI support for Red can bring a lot of attention to Red too imho. (And this could bring financing Red up too when Red programmers are making money making websites using Red.) | |
DocKimbel: 23-Jan-2013 | http://www.rebol.com/cgi-bin/blog.r?view=0527#comments Fork: "I am porting Red to R3--and while I won't claim I'm "almost done", I will say I've made significant progress. Red/System now builds a working hello.reds under both R3 and R2." Great! Like Nick says, hard to keep track of everything happening these days. :-) | |
Arnold: 29-Jan-2013 | The Rde presentation shows the use of the binary Red. In it shows how to compile to get a cgi and a dynamic library. Are these also implemented in the current compile scripts? In that case that holds a good argument to update the Redcompiler.r script. It needs some work anyhow I noticed, it is rather location dependent atm. | |
DocKimbel: 12-Feb-2013 | OpenCV binding is done by François Jouen, it's a work in progress. There's a Red/System version that you could find from this page (in french): http://www.digicamsoft.com/cgi-bin/rebelBB.cgi?thread=%3C25May2012200150764026200%3E There's a Red version that François sent me privately a few days ago for testing, but I haven't had the time yet to review it. | |
DocKimbel: 27-Mar-2013 | OpenCV 2D lines demo: http://www.wuala.com/fjouen/Code/OpenCV/Red/pub/lines2.jpg/ Webcam driver and videos playback code example in Red/System can be found in this thread: http://www.digicamsoft.com/cgi-bin/rebelBB.cgi?thread=%3C17Mar2013190850930275100%3E François is close to 100% covering of OpenCV for Red/System. Once that (huge) work done, we would need to create some good dialect to access all those features from Red. | |
DocKimbel: 4-Apr-2013 | New OpenCV Red/System code demo and video (image real-time filtering) posted by François: http://www.digicamsoft.com/cgi-bin/rebelBB.cgi?thread=%3C17Mar2013190850930275100%3E Video link: http://www.wuala.com/fjouen/Code/OpenCV/Red/pub/filtering.m4v/ | |
Arnold: 9-May-2013 | CGI is possible indeed. I did a small tutorial a while ago: http://arnoldvanhofwegen.com/blog/simple-red-cgi-scripting-possible/ | |
Pekr: 9-May-2013 | We can finance Doc anyway, but - he knows his priorities, and imo CGI is not one of them right now :-) Well, Red still needs some other basic stuff, namely objects, I/O (files, networking), parse ... we are getting there, it will just take some time .... | |
Group: Announce ... Announcements only - use Ann-reply to chat [web-public] | ||
Arnold: 2-Aug-2012 | I have put my example script for CGI forms with validation and refilling previously filled fields online on the rebol.org site. http://www.rebol.org/view-script.r?script=cgi-form-val-example.r Maybe somebody with more (CGI security) expertise can look at it and comment on safety issues please. | |
Arnold: 9-Nov-2012 | After the mirror game and the chessboard interface, the Red compiler script and various cgi scripts and showing all how radio buttons work in VID, I can now introduce to you the application to play checkers (10x10 international, in dutch dammen). Not bad for a REBOL newbie right? Wait a moment with all of your nominations please, because: There is a tiny issue left with the moving of the pieces when playing against the computer but it is minor compared to all other issues I have already fixed ;-) You can download the zip file with the program here http://arnoldvanhofwegen.com/stuff/damscripts.zip Program is started with do %damb.r and you can play after setting the color the computer has to play with on the panel you get when you click the top-left button. You can look under the hood and see the values the program gives the legal moves. You can put your own positions on the board and continue from that point. Enjoy! | |
Andreas: 7-Jan-2013 | I posted a short primer for CGI with current Rebol 3 releases as answer to a question on Stack Overflow: http://stackoverflow.com/questions/14123618/how-to-write-a-hello-world-cgi-with-rebol-3 If you want to play with R3 and CGI but don't know how, that should get you started. | |
Kaj: 14-Jan-2013 | I've implemented INPUT and GET-ENV in the C library binding for Red: http://red.esperconsultancy.nl/Red-C-library/dir?ci=tip It should now be possible to do CGI programming with Red. I've updated the console-pro interpreter: http://red.esperconsultancy.nl/Red-test/dir?ci=tip | |
Endo: 10-Apr-2013 | Online Red compiler: http://bircomteknoloji.com:8181/ Runs on Cheyenne on Windows, compiles using rebol.exe (v2.7.6) as CGI. | |
Group: Ann-Reply ... Reply to Announce group [web-public] | ||
Gregg: 2-Aug-2012 | I haven't reviewed your CGI stuff yet Arnold, but it looks useful. Thanks for posting it. | |
DideC: 31-Aug-2012 | Yes ! I don't know if it usefull or not, but I used the http://www.rebol.com/cgi-bin/blog.r?cmt-week=1 page to mark Abuse post (spam). If we are enough to do so, maybe it will be removed ! | |
Arnold: 14-Jan-2013 | I will have a look at this CGI capability of Red soon! | |
Group: Rebol School ... REBOL School [web-public] | ||
GrahamC: 24-Apr-2012 | These rules are going into a cgi script to allow local and national dialiing (and emergency) but stop international | |
JohnM: 15-May-2012 | Thank you all for addressing my concerns and for your answers about my first coding question. Ahh.. rejoin. Reading up on it makes me better understand how some things are to be done in Rebol. Continuing to the final goal... I have to extract an email address from a GET transfer. The methoed of sending the info to me is completely out of my control. An email address will be entered into a form on a website not controled by me. GET methoed will send the data to my script. The people who created the form on the external site advised that they label the email address as "trnEmailAddress". So now I want to see if I am correct in thinking how to extract and use the email address. Will using the decode a cgi form command (I know they are not commands in the tradiational sense) work. How does it work, does it create variables out of the GET (or Post when using Post, but I am forced to recieve the info via GET) stream? The GET stream in my case will include "&trnEmailAddress=person%40example%2Ecom. So can I do this? decode-cgi system/options/cgi/query-string send trnEmailAddress "Thank you. Rest of message." Thanks for your help. | |
Sunanda: 15-May-2012 | You can easily create an object! (ie a set of words) from the CGI input. This articles explaiins how: http://www.rebol.org/art-display-article.r?article=x60w ....Section 3 is the quick guide ....The next few pages describe all the things that can go wrong (probably more than you need to know right now) ....Section 7 points you to a script that handles all the edge cases for you. | |
JohnM: 16-May-2012 | Sunanda: Thanks again for issuing the World invitation. Everyone thanks for the continuing help. I have read the cited document, but it just leaves me with more questions. Is the following literal? cgi-string: read-cgi cgi-block: decode-cgi cgi-string cgi-obj: make object! cgi-block That is to say should I type exactly that? Or is cgi-string for example a theoretical variable assignment that I could call anything? Are they all proper commands, or is any part of that just for example purposes? I am thinking I should copy and paste it verbatium. I am also thinking I mispelt verbatum. I am stuck with GET. Does this mean I can leave out some code that makes up for not knowing if the original data is POST vs GET? These are hypothetical questions for better long term learning. I for now will go with the idea that everything is as straight fowarrd as it seems. I know that my GET stream will have "trnEmailAddress" in it which is a field that will contains an email address. So will the following generate a random number, extract the address and email the same random number to that email address? token: random/seed now/percise cgi-string: read-cgi cgi-block: decode-cgi cgi-string cgi-obj: make object! cgi-block send trnEmailAddress rejoin [ "Thank you. Your number is" token "." ] Graham: Thank you for the extra info on GUID, but Windows is not involved here. I realize that random number generating really isn't unless you have a monkey throwing darts at a numbered board. Regardless extra effort to make a number unique is useful and your advice appreciated. I do not think the corner cases will come up and the people who control the original form assured me that web page issues warnings if the form is not filled out correct which should help. I do realize that people are idiots, systems are not fool proof, etc. What I am saying is my basic needs are basic and I should be OK so I am not fretting over those examples. It is great though to know the solutions are out there when I need them. Tahnks. | |
Sunanda: 16-May-2012 | Yes, the names of the words are arbitrary. -- you can chose your own names. Whether the data came in via GET or POST makes no difference if you issue the READ-CGI just once. If the CGI string was yadda.com?email=[me-:-test-:-com]&token=0 then the cgi-obj will look like this: make object! [ email: "[me-:-test-:-com]" token: "0" ] Note the values are strings, so you need to convert the email value to an email! datatype: send to-email cgi-obj/email rejoin [ "Thank you. Your number is" cgi-obj/token "." ] | |
Sunanda: 16-May-2012 | If the CGI string was yadda.com which is what a lot of indexing bots will use, then the cgi-obj will look like this: make object! [ ] Hence you do need to do some data sanitisation, no matter how much the form people assure you the data will be right. | |
GrahamC: 16-May-2012 | John you have to seed the generator first and then generate your number And you can dispense with the cgi-string by cg-block: make object! decode-cgi read-cgi | |
GrahamC: 16-May-2012 | cgi-block is your variable, and the rest are functions | |
Endo: 17-May-2012 | Here is an example: cgi-obj: construct decode-cgi read-cgi ;check the input all [ in cgi-obj 'email trnEmailAddress: to-email trim form cgi-obj/email not empty? trnEmailAddress ] [ ;evrything seems ok send trnEmailAddress reform ["Thank you. Your number is" token "."] quit ] print "Error!" | |
Arnold: 11-Jul-2012 | Today I experimented with calling a REBOL script from my php script. Thanks to previous contributions of a.o. Ralph Roberts of abooks.com from 1999(!) and an entry on the PHP site I found out how to do this on my apache driven site. It was not quite as straightforward as Robert said like: include ("rebolnow.r"); Nor was it as simple as: system("rebolnow.r 2>&1", $myout); echo $myout; But it worked when I called out for the REBOL program first. Both two of the next examples worked for me: system("/path/to/cgi-bin/rebol -c %rebolnow.r 2>&1", $myout); echo $myout; AND secondly echo system("/path/to/cgi-bin/rebol -c %rebolnow.r"); Work! The REBOL script must be in the same dir as your PHP script (Not in your cgi-bin directory)(I didn't test sub dirs and other dirs but I suppose they work like usual) The script does not need the #!/path/to/rebol line at the top. The script should not print http-headers and When printing stuff the last line should read print "" because the last printed line will be repeated. Hope this helps more people to switch from php scripting to REBOL scripting for their websites. | |
Arnold: 31-Jul-2012 | And now for something completely different. I have a php based form I want to make into a REBOL cgi program. It is to upload some fields into an article-base in my mysql database. Where action is article.php in the php version I changed this to article.r for the REBOL version. I have now the article form shown and when I fill in some fields (but not all) and send the form I get the cgi object ( I use safe-cgi-data-read) but the contents of the formfields is now empty? Any clues what may be the case please? | |
SWhite: 31-Jul-2012 | I believe that if you do not fill in a field on the form, you do not get an item in the cgi objectl. I seem to recall being confused by that for a while. | |
Arnold: 31-Jul-2012 | Well, I tested again and I was mistaken in thinking php did show the field I previously had filled in when returning after submit and noticing some field was empty. It is the way the browser refills the field when it recognises what you have typed in before.. In the php version all fields of the form are empty as well. So no problem with how REBOL works. (I can display all of the cgi block and everything I typed in is there.) | |
Arnold: 31-Jul-2012 | Sunanda, absolutely. I went way too fast on this. Unfortunately there is no way to refill the form fields from the cgi data. Now I say so the DOM and a Javascript maybe able to. I tried some little things but it seems to mess things up more than doing good. | |
Arnold: 1-Aug-2012 | On the form validation issue. I managed to get things working as I initially intented. Using a Javascript function to change the text of the field: var changer = document.getElementById('fieldid'); changer.value = fieldvalue; Where fieldvalue was filled from the cgi data block cgi/fieldname It was really fun to get this right with all the needed double-quotes and curly braces that alle represent comments in rebol as you know and generate this from within the well-known function emit: func [code] [ repend html code] I had to add an id tag to all the form fields. | |
sqlab: 28-Aug-2012 | -c means cgi ==> So not ouput to the console | |
Endo: 28-Aug-2012 | BrianH: Yes I realized that at least one word is required. sqlab: I encap a script and run the executable, so I should able to use any command line parameter. And I don't encap with cgi option. Also -w parameter has no such a problem (which is "no-window option for REBOL) Anything that include "c" char prevents to print/probe to the console. On the other hand it doesn't prevent opening console window. I see "** Press enter to quit" message when program HALTed but PRINTs don't output anything. | |
DocKimbel: 7-Sep-2012 | If you are using REBOL in CGI mode: get-env "DOCUMENT_ROOT" get-env "REQUEST_URI" | |
Kaj: 7-Sep-2012 | These values are already processed by REBOL when it is started in CGI mode. I'm using cgi: system/options/cgi The request URI is then in cgi/path-info | |
Kaj: 7-Sep-2012 | The script name is in cgi/script-name or something like that | |
JohnM: 12-Nov-2012 | Hello, all. Back in May I was here asking for lots of help in creating a simple CGI script in REBOL. Wanted to say thanks. It was most appreciated, especially considering how rarely you get new people my questions must have seemed so simple to the point of boring the crap out of all of you hardcore experts. My regular job has insane hours and months pass by in what seems like minutes. The person I was doing it for suddenly had other things come up on his website and business that required attention first so it fell by the wayside. I intend to pick it up where I left off this week during an evening when I have more time. While I had a few minutes I had to send my thanks. And I see REBOL might become open source... good to see it moving forward instead of stagnating. | |
JohnM: 14-Nov-2012 | Thanks for the welcome back message. I left off asking about the mySQL driver. So I want to insert into a database a random number the code already generated and associate it with an email address that was provided by a CGI form. Have yet to create this in the real world but for now let us assume I will call the database "customers". The people who process the credit card and collect the email address advised me that the address will be labelled "trnEmailAddress". After finding the mySQL driver Here is what I figured out using placeholders for things like password, etc. Would appreicate knowing if this is correct. ; Loads MySQL driver do %mysql-driver/mysql-protocol.r ; Opens connection to MySQL server db: open mysql://[[user][:pass]@]host[:port]/database ; Send query to database server. Enters random number from above. customers is probably the name of the database I will create insert db ["INSERT INTO customers VALUES (?,?)" "trnEmailAddress" "token"] Next I need to insert an existing PDF file (an e-book) into a directory created by the script. The directory will be named after a random number that was earlier generated by the script. I am astounded that I can not find the command to copy a file. So the variable assigned to this random number is called "token". So I have the following. make-dir %token/ How do I copy a file into this new directory? Also, is that the corecct way to make a directory? | |
afsanehsamim: 16-Nov-2012 | guys ,i explained my mini project in database and game room ...they suggest me this room ! plz help me . my project is about one crossword which should show on web page ! i created html form and cgi file ... when user enter value and press submitt it should save in database ! my problem is i can not save value from form into database(MYSQL)... i am using mysql driver...i can make connectivity and retrieve data but i ca not save values ! plz guide me ,i do not have experience in REBOL... :( | |
Andreas: 16-Nov-2012 | Please read the CGI documentation suggested to you multiple times. | |
Andreas: 16-Nov-2012 | Basically, you create an HTML file and put it on your webserver. Let's call it "form.html": <form action="form.cgi"><input type="text" name="word"><input type="submit"></form> Then you create a REBOL CGI matching the "action" used above, so "form.cgi", and also put it on your webserver: #!/usr/local/bin/rebol278 -cs REBOL [] cgi-values: construct decode-cgi system/options/cgi/query-string ;; Now you can access the "word" value submitted via the HTML form ;; as cgi-values/word. ;; Let's echo the value back to the user, as an example: print rejoin [ "Content-type: text/html" crlf crlf cgi-values/word ] | |
Andreas: 16-Nov-2012 | Instead of echoing the value back to the user, you can do whatever you want in the CGI. Such as inserting the value in a database. | |
Ladislav: 23-Nov-2012 | ALERT is not meant for CGI, it is a GUI function. | |
afsanehsamim: 23-Nov-2012 | CGI | |
Ladislav: 23-Nov-2012 | So, no, if you are creating a CGI script, don't use ALERT | |
Pekr: 31-Jan-2013 | btw - do might be unsecure, e.g. with CGI code. Maybe 'construct would do the trick too, without evaluating the stuff? | |
Gregg: 23-Apr-2013 | REBOL, under Windows, uses its own GUI "console" window, so you have to trick it. Running it in CGI mode should work for you. | |
Artful: 23-Apr-2013 | so any difference to script execution if cgi mode is used? besides the no output window | |
Bo: 8-May-2013 | Actually, the first method I posted above is easier to understand for a lot of nested statements. Compare this real line of script from one of my programs. The way I normally write it: browse probe rejoin copy [http://www.respectech.com/log/show-invoice.cgi?user= username "&pass=" password "&submit=" replace/all client "&" "%26" "&invno=" invnum either amtdue [rejoin ["¬ice=1&amtdue=" to-decimal amtdue "&daysdue=" daysdue]][copy ""]] Lisp-y: browse (probe (rejoin (copy [http://www.respectech.com/log/show-invoice.cgi?user= username "&pass=" password "&submit=" (replace/all (client) ("&") ("%26")) "&invno=" invnum (either amtdue [rejoin ["¬ice=1&amtdue=" (to-decimal amtdue) "&daysdue=" daysdue]][copy ""])]))) Heirarchical (takes a lot more space, but is easier to follow -- however, doesn't have the parameter enforcement of parens): browse probe rejoin copy [ http://www.respectech.com/log/show-invoice.cgi?user= username "&pass=" password "&submit=" replace/all client "&" "%26" "&invno=" invnum either amtdue [ rejoin [ "¬ice=1&amtdue=" to-decimal amtdue "&daysdue=" daysdue ] ] [ copy "" ] ] | |
Group: Databases ... group to discuss various database issues and drivers [web-public] | ||
Sunanda: 19-Apr-2012 | An associative database would be fun to have in REBOL. The 'map data structure in R3 replaces 'hash, and is supposed to be better. There have been some linkups between REBOL and the relavance associative database, but nothing much has come of it. http://www.rebol.org/aga-display-posts.r?offset=0&post=r3wp500x1919 http://www.rebol.net/cgi-bin/r3blog.r?view=0161 http://www.relavance.com/ | |
Pekr: 21-Jul-2012 | After some time, I gave a try to the Sqlite DB. It kind of improved in some areas, even locking, so it is even more useable in concurrent environment. However - it still uses per file lock, and although it uses just milliseconds to lock the file, I have a problem with one aproach I am trying to take, and hence maybe the Sqlite is not right DB for my purpose, or my aproach is not correct. The reason why I wanted to use sqlite DB is, that it is easily movable to other target, and its performance is fine for even semi heavy solutions. I don't want to be dependant upon the some kind of "server", which stores its files who knows where, and to which I don't have proper access in cgi environment, unless I am a DB admin or server admin ... | |
afsanehsamim: 9-Nov-2012 | guys , i have one project (crossword )which uses mysql database! i want use mysql driver ,i know how we can create table and make connectivity with database ! crossword should show on web page ,and when user put characters in each field ,then press button ,it will chek with database and if it is correct ,user can continue otherwise shows error message ....i created crossword table with cgi and is working on web ,i have created database as well,now my problem is i do not know how can i fetch data and comparing with database? is there anybody for helping my mini project???? | |
afsanehsamim: 9-Nov-2012 | my understanding of work steps is : i have two files *.cgi and *.r ,in cgi file i created crossword that shows on web page ... in data.r i have made connectivity with database and create table ... and my codes are as following : in cgi file: | |
afsanehsamim: 9-Nov-2012 | #! "C:/wamp/bin/apache/Apache2.2.11/cgi-bin/rebol-core-278-3-1.exe" -cs REBOL [Title: "Table"] print "content-type: text/html^/" print [<HTML><BODY><TABLE bgcolor="black" border="1"> { <tr bgcolor="white"> <td style="width:30px; height:30px;"><input name="one-one" type="text" size="1"></td> <td style="width:30px; height:30px;"><input name="one-two" type="text" size="1"></td> <td style="width:30px; height:30px;"><input name="one-three" type="text" size="1"></td> </tr> <tr bgcolor="white"> <td style="width:30px; height:30px;"><input name="two-one" type="text" size="1"></td> <td style="background:black; width:30px; heigth:30px;" ></td> <td style="width:30px; height:30px;"><input name="two-three" type="text" size="1"></td> </tr> <tr bgcolor="white"> <td style="width:30px; height:30px;"><input name="three-one" type="text" size="1"></td> <td style="width:30px; height:30px;"><input name="three-two" type="text" size="1"></td> <td style="width:30px; height:30px;"><input name="three-three" type="text" size="1"></td> </tr> } ] print [</TABLE></BODY></HTML>] | |
afsanehsamim: 9-Nov-2012 | #! "C:/wamp/bin/apache/Apache2.2.11/cgi-bin/rebol-core-278-3-1.exe" -cs REBOL [Title: "Table"] print "content-type: text/html^/" print [<HTML><BODY><TABLE bgcolor="black" border="1"> { <tr bgcolor="white"> <td style="width:30px; height:30px;"><input name="one-one" type="text" size="1"></td> <td style="width:30px; height:30px;"><input name="one-two" type="text" size="1"></td> <td style="width:30px; height:30px;"><input name="one-three" type="text" size="1"></td> </tr> <tr bgcolor="white"> <td style="width:30px; height:30px;"><input name="two-one" type="text" size="1"></td> <td style="background:black; width:30px; heigth:30px;" ></td> <td style="width:30px; height:30px;"><input name="two-three" type="text" size="1"></td> </tr> <tr bgcolor="white"> <td style="width:30px; height:30px;"><input name="three-one" type="text" size="1"></td> <td style="width:30px; height:30px;"><input name="three-two" type="text" size="1"></td> <td style="width:30px; height:30px;"><input name="three-three" type="text" size="1"></td> </tr> } ] print [</TABLE></BODY></HTML>] | |
afsanehsamim: 9-Nov-2012 | i do not know how should i mix cgi file with database file | |
Arnold: 9-Nov-2012 | you have to mix them something like #! "C:/wamp/bin/apache/Apache2.2.11/cgi-bin/rebol-core-278-3-1.exe" -cs REBOL [Title: "Table"] do %mysql-protocol.r db: open mysql://[root-:-localhost]/test insert db {create table data ( name varchar(100), address text )} insert db {INSERT into data VALUES ('raj', 'pune'), ('ekta', 'delhi'), ('ankur', 'mumbai') } insert db "SELECT * from data" results: copy db print "content-type: text/html^/" print [<HTML><BODY><TABLE bgcolor="black" border="1"> { <tr bgcolor="white"> <td style="width:30px; height:30px;"><input name="one-one" type="text" size="1">} print results/name print {</td>} etc | |
afsanehsamim: 9-Nov-2012 | you're right,i configured my apache server for cgi ... i think i should configure again | |
TomBon: 9-Nov-2012 | just rename it to .cgi you have the correct shebang at the top. apache should recognize it automatically. don't forget to chmod your cgi to grant execution permission. | |
afsanehsamim: 11-Nov-2012 | #! "C:/wamp/bin/apache/Apache2.2.11/cgi-bin/rebol-core-278-3-1.exe" -cs REBOL [Title: "Table"] do %mysql-protocol.r db: open mysql://[root-:-localhost]/test insert db { DROP TABLE IF EXISTS data1; create table data1 ( oneone varchar(1), onetwo varchar(1), onethree varchar(1), twoone varchar(1), twothree varchar(1), threeone varchar(1), threetwo varchar(1), threethree varchar(1) )} print "content-type: text/html^/" print [<HTML><BODY>] print [<form><input type="submit" value=" submit !" />] print [<TABLE bgcolor="black" border="1">] print {<tr bgcolor="white"> <td style="width:30px; height:30px;"><input name="oneone" type="text" size="1">} insert db ["insert into data1 (oneone) values (?)" ] results: copy db print {</td>} | |
Pekr: 11-Nov-2012 | I think, that your script is wrongly constructed! What you seem to do is to just print a form, which then gets delivered to user's browser screen. But at that time, there is no value yet. You should study, how to do CGI in REBOL. You need a separate html form, then you need to read CGI values and store them in a DB ... | |
afsanehsamim: 11-Nov-2012 | but in those links ,i can not find database example! i read that link before ,i created html form and cgi as well, it is working properly ... the point is when user enter input and click submit it goes to cgi page. i need save that input in database ...plz guid me or show me one example how can i save value from the form into db? | |
Pekr: 11-Nov-2012 | please use: values: decode-cgi read-cgi then you will get block of values IIRC | |
Pekr: 11-Nov-2012 | >> blk: decode-cgi "var1=Petr" == [var1: "Petr"] >> type? blk == block! >> object: construct blk >> object >> object/var1 == "Petr" | |
Pekr: 11-Nov-2012 | so use: values: decode-cgi read-cgi result: construct values insert db ["insert into data1(oneone) values(?)" result/oneone] | |
Pekr: 11-Nov-2012 | there are two things - 1) you have to write a form, basically a html file, with fields, etc., and submit button, linking it to your cgi script 2) you have to write a CGI script, being able to read submitted values ... | |
afsanehsamim: 11-Nov-2012 | i am using the first one ... can i use codes which you mensioned in above ? values: decode-cgi read-cgi result: construct values insert db ["insert into data1(oneone) values(?)" result/oneone] | |
afsanehsamim: 11-Nov-2012 | >> do %compare.cgi Script: "Untitled" (none) Script: "MySQL Protocol" (12-Jul-2008) MySQL protocol loaded connecting to: localhost ** Script Error: Invalid path value: oneone ** Where: map-rebol-values ** Near: result/oneone >> | |
Ladislav: 11-Nov-2012 | Any one knows how can we save value from the form into database? - sure, Pekr told you how to do it. Your problem is that you do not do what Pekr told you to do. First, you need to create the form. Check: Do you really have the form? Second, you need to create a CGI script (this is not the form from the first point, the form from the first point is not a CGI script). Check: do you really have a CGI script ? Pekr told you that the example you posted was neither the form, nor the CGI script. | |
Pekr: 12-Nov-2012 | Create 2 files. Call the first one e.g. cgi-test.html, and upload it to your server. The only thing you have to change is the link to your .cgi script in there: <HTML> <TITLE>Simple Web Form</TITLE> <BODY> <b>Simple Web Form</b><p> <FORM ACTION="http://www.xidys.com/cgi-bin/cgi-test.cgi"> <INPUT TYPE="TEXT" NAME="Field" SIZE="25"><BR> <INPUT TYPE="SUBMIT" NAME="Submit" VALUE="Submit"> </FORM> </BODY> </HTML> Create a second file, called cgi-test.cgi (it has to align to how you name it in the above source file). Upload it to your cgi working directory. Remember to change the first line to contain the path, where your REBOL executable is placed: #!/usr/local/bin/rebcmd -sqc REBOL [] print join "Content-type: text/plain" newline start: now/time/precise submitted: decode-cgi read-cgi values: construct submitted prin "Submitted: " print mold submitted prin "values: " print mold values prin "values/field: " print mold values/field print now/time/precise - start print newline Now go to your URL, and try to submit some values. You can test it on my site at: http://www.xidys.com/cgi-test.html | |
Pekr: 12-Nov-2012 | but afsa, honestly - it does not even belong to the database group, but to Rebol School group - you seem to miss the basic understanding, of how CGI works on the server. Your problem is not in getting the value into DB, but handling CGI stuff in general. In above example, what you would put into your DB would be values/field ... | |
afsanehsamim: 16-Nov-2012 | Thankyou so much ladislav and Pekr ... guys i underestand whatever you said ... Pekr : you meant i should first decode values after that should values save in database? i have two files and both work properly! one html and another one is cgi ! i did your codes as well ... now plz tell me what is the next step ? As i told you before i should save value in database ,it is one part of my project !!!! :( i did this link http://www.rebol.com/docs/cgi2.html#section-2 and i underestood ... http://www.rebol.com/docs/cgi2.html#section-2http://www.rebol.com/docs/cgi2.html#section-2 | |
Endo: 16-Nov-2012 | how does it matter where the values come from? it is a totally different issue. try reading http://www.rebol.com/docs/cgi1.html http://www.rebol.com/docs/cgi2.html http://www.rebol.com/docs/cgi-bbs.html | |
afsanehsamim: 16-Nov-2012 | i decoded my values which i got from the form! my cgi and html are working ,plz tell me what should i do? | |
Andreas: 16-Nov-2012 | insert db ["insert into sql-tablename (sql-fieldname) values (?)" cgi-values/cgi-fieldname] | |
Andreas: 16-Nov-2012 | i suggest to get the html+cgi echoing working first, then getting a minimal script that inserts a value into your database working, and then putting the two pieces together by extending your "echo" cgi to insert into the database | |
Group: Web ... Anything related to the WWW [web-public] | ||
Pekr: 20-Jul-2012 | any tip for some session related function-set for REBOL CGI purposes? I am looking for the case, where Cheyenne is not an option, and need some simple stuff for sessions .... | |
Group: #Red Docs ... How should Red be documented [web-public] | ||
Gregg: 2-Dec-2012 | I do like a lot of the REBOL docs, which took time and effort to create. Wikis are good for reference information. I agree with Arnold that good examples are important. I'll add that giving people a starting point is helpful. For example, have example scripts for different types of apps or features; CGI, pipe and filter, command line handling, etc. I also think format fragmentation is bad. REBOL's docs are fragmented, which makes it hard to know the best place to put something. Being able to share data, or have a common doc db that can be rendered in different ways, would be great. | |
Group: !REBOL3 ... General discussion about REBOL 3 [web-public] | ||
Pekr: 27-Dec-2012 | BrianH: just for the reference - here's the console related blog and comments - http://www.rebol.net/cgi-bin/r3blog.r?view=0282#comments | |
GrahamC: 9-Jan-2013 | This does a post to-string write http://www.rebol.net/cgi-bin/r3-echo.r"trest" | |
Group: !R3 Extensions ... [web-public] | ||
TomBon: 18-Dec-2012 | R3 extension will open the door to many usefull extensions now. We should collect the current status of existing extensions and of course new ones we like to see. Quick check on current extensions (lib based) : cURL, ZMQ, ODBC, FMOD, IMagick... Another area is what is the best practice to create and maintain embedded extensions, how to integrate a dynamic built for this how to organize the source tree. Currently I am working on a embedded cgi extension as a testcase, this will lead also into questions like: mezz or native, embedded or lib? Extensions on my list: CGI, JSON, POSIX, PCRE and some math libs. | |
Andreas: 18-Dec-2012 | Good initiative, Tomas. For CGI, I think you should get by purely with mezzanine code (environment, stdin, stdout). | |
Andreas: 18-Dec-2012 | (And I think technically, no native code would make CGI not really an extension, but a "delayed embedded module".) | |
Group: !R3 Building and Porting ... [web-public] | ||
Bo: 19-Dec-2012 | From http://www.rebol.com/cgi-bin/blog.r?view=0519#comments To download a tarball of an executable REBOL 3.0 program for the Raspberry PI (build with Raspbian “wheezy” ) take a look at: http://www.TGD-Consulting.de/REBOL/r3-RPi.tar --- pi(at)raspberrypi ~/dev/r $ uname -a Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux pi(at)raspberrypi ~/dev/r $ ./r3 >> system/version == 2.101.0.4.10 >> system/build == 16-Dec-2012/13:13:11 >> system/product == core | |
Group: Community ... discussion about Rebol/Rebol-related communities [web-public] | ||
AdrianS: 31-Dec-2012 | This is a periodic posting of community links along with activity levels for discussion dedicated to Rebol and Rebol-like languages. The intent is to bring a dispersed community together by providing the current list of places where the community gathers along with reasonably accurate activity indicators for each place. This list will be posted in each location weekly or bi-weekly so that anyone dropping by will not have to look far in order to learn where else things are happening. Currently the activity stats are gathered manually and postings are also not automated. This will hopefully change as the requisite scripts to scrape and post automatically are developed. This updated list will eventually be available at http://rebol.comas the site is cleaned up post Rebol open sourcing. # Chats ## R3 Chat This is the primary forum for Rebol 3.0. It runs from any Rebol console in a text mode, but a GUI version is planned. - Run R3, type chat and follow the instructions (all platforms.) - Type "help" for more information or visit R3 DevBase Chat Forum (http://www.rebol.com/r3/devbase/index.html). - To view public messages from any web browser go to RebDev mobile/phone interface (http://www.rebol.net/cgi-bin/rebdev-web.r). - Problems? Please contact Rebol Technologies at (http://www.rebol.com/cgi-bin/feedback/post2.r). Activity: 4 messages this month ## Rebol chat on Stack Overflow (http://chat.stackoverflow.com/rooms/291/rebol) - Note that you will need a reputation of 20 in order to be able to post in the chat. - You can gain this minimal reputation (essentially a spam filter) by participating in the Stack Overflow group of sites. Activity: 380 messages this week ## AltME Worlds A private instant messaging system where rebolers hang out 24/7. The current world dedicated to Rebol and Rebol-like language discussion is called REBOL4 - Get client at http://www.altme.com/download.html - connect to the 'rebol-gate' world with user/pass, guest/guest - request account on REBOL4 world in the REBOL4 request group Web archives of public groups, first to last in the most active world, REBOL4, as well as the dormant world, REBOL3: REBOL4 (http://www.rebol.org/aga-groups-index.r?world=r4wp) Activity: 286 posts last 6 days REBOL3 (http://www.rebol.org/aga-groups-index.r?world=r3wp) # Forums ## Rebol Facebook group (http://www.facebook.com/groups/rebol) A new special interest group for Facebook users. Activity: 26 messages this month ## Rebol Google+ community (https://plus.google.com/communities/100845931109002755204) Activity: 4 messages this month ## Rebol Google Group (https://groups.google.com/forum/?fromgroups#!forum/rebol) Activity: 43 messages this month ## Synapse EHR Rebol Forum (http://synapse-ehr.com/community/forums/rebol.5) A web-based forum for R2 and R3, provided by Synapse EHR Activity: 13 messages this month ## RebelBB France (http://www.digicamsoft.com/cgi-bin/rebelBB.cgi) A simple forum, written in Rebol, for French speakers. Activity: 140 messages this month ## Nick's Rebol Forum (http://rebolforum.com/index.cgi) A micro-forum (just a few lines of Rebol) hosted by Nick Antonaccio. (Note: the captcha question is first.) Activity: 79 messages this month # Q&A (Question & Answer) ## Stack Overflow questions on Rebol http://stackoverflow.com/questions/tagged/rebol Activity: 219 questions tagged http://stackoverflow.com/questions/tagged/rebol3 Activity: 2 questions tagged |
1 / 1566 | [1] | 2 | 3 | 4 | 5 | ... | 12 | 13 | 14 | 15 | 16 |