1. EUPHORIA CGI + Apache
- Posted by cklester <cklester at yahoo.com> Jun 25, 2004
- 501 views
I've set up a simple page of instructions for getting Apache to serve EUPHORIA-generated HTML pages. Please check it out and let me know if there's anything I missed. I just set up Apache and EUPHORIA on my PC here at work. We were using IIS, but with the recent outbreak of IIS-targeting worms, I've decided to go with something... better. ;) Anyway, let me know!!! http://www.cklester.com/euphoria/ I am planning on putting up a simple tutorial for IIS, also, or maybe not. If you think I should, lemme know. Rob, you can add this to the EUPHORIA web pages section of the RDS home page, if ya want. :) -=ck "Programming in a state of EUPHORIA."
2. Re: EUPHORIA CGI + Apache
- Posted by "Michelle Rogers" <michellerogers at bellsouth.net> Jun 25, 2004
- 515 views
ck, i wish you were here, so i could just HUG you..this is the FIRST time i've gotten Euphoria to work!!! I had actually given up and was trying to teach myself perl!! Michelle Rogers ----- Original Message ----- From: "cklester" <guest at RapidEuphoria.com> To: <EUforum at topica.com> Sent: Friday, June 25, 2004 5:33 PM Subject: EUPHORIA CGI + Apache > > > posted by: cklester <cklester at yahoo.com> > > I've set up a simple page of instructions for getting > Apache to serve EUPHORIA-generated HTML pages. Please > check it out and let me know if there's anything I missed. > > I just set up Apache and EUPHORIA on my PC here at work. > We were using IIS, but with the recent outbreak of > IIS-targeting worms, I've decided to go with something... better. ;) > > Anyway, let me know!!! > > http://www.cklester.com/euphoria/ > > I am planning on putting up a simple tutorial for IIS, also, > or maybe not. If you think I should, lemme know. > > Rob, you can add this to the EUPHORIA web pages section of > the RDS home page, if ya want. :) > > -=ck > "Programming in a state of EUPHORIA." > > > >
3. Re: EUPHORIA CGI + Apache
- Posted by cklester <cklester at yahoo.com> Jun 26, 2004
- 488 views
Michelle Rogers wrote: > > ck, i wish you were here, so i could just HUG you..this is the FIRST time > i've gotten Euphoria to work!!! All right! Very cool!! I'm glad it helped. :) > I had actually given up and was trying to teach myself perl!! Perl?! Gross! heheh.
4. Re: EUPHORIA CGI + Apache
- Posted by Dave Probert <zingo at purpletiger.com> Jun 26, 2004
- 479 views
A really useful article. Can you give a simple "Hello World" example of a Euphoria CGI script? I've tried:
#!C:\euphoria\bin\exw.exe puts(1,"Hello World")
But when I try to access the file via: http://localhost/cgi-bin/hello.exw I just get a "Page cannot be displayed" or a "500 Server Error" (dependent on browser and slight httpd.conf changes) I've checked the mods from your article and double checked the httpd.conf file, but still cannot get it to work correctly. It's probably just me that's messed up somewhere, but I'm not an Apache/CGI guru :(
5. Re: EUPHORIA CGI + Apache
- Posted by "Elliott S. de Andrade" <quantum_analyst at hotmail.com> Jun 26, 2004
- 495 views
>From: Dave Probert <guest at RapidEuphoria.com> >Reply-To: EUforum at topica.com >To: EUforum at topica.com >Subject: Re: EUPHORIA CGI + Apache >Date: Fri, 25 Jun 2004 23:45:25 -0700 > >posted by: Dave Probert <zingo at purpletiger.com> > >A really useful article. > >Can you give a simple "Hello World" example of a Euphoria CGI script? > >I've tried: >}}} <eucode> >#!C:\euphoria\bin\exw.exe >puts(1,"Hello World") ></eucode> {{{ > You need to insert the correct CGI headers. Those specify if you're outputting HTML code, plain text, pictures, and can do other stuff, like a redirect. Try this for an example:
#!C:/euphoria/bin/exw.exe -- i believe you need / and not \ puts(1, "ContentType: text/html\n\n") puts(1, "< html > < body > Hello World! < /body > < /html >")
I put spaces between the < and the tags just in case they get removed on the list. Hopefully, you'd still be able to see the tags. ~[ WingZone ]~ http://wingzone.tripod.com/
6. Re: EUPHORIA CGI + Apache
- Posted by Dave Probert <zingo at purpletiger.com> Jun 26, 2004
- 489 views
Thankyou extremely. Absolutely spot on reply. Just dropping the Content-Type in there worked perfectly (comment it out and the error appears again) Though the < html >, etc tags show as is - ie they don't get tramsformed for some reason - I'll look into that. It's probably some error on my part. (Yes I did remove the spaces ;) ) Thanks again. Both CKL and Elliott.
7. Re: EUPHORIA CGI + Apache
- Posted by Dave Probert <zingo at purpletiger.com> Jun 26, 2004
- 494 views
Quick update: The ContentType line works, but should actually be Content-Type The hyphen makes a big difference. Then the html tags work fine. For those who are also struggling and following this thread - don't forget the \n\n at the end of the line - those matter too :)
8. Re: EUPHORIA CGI + Apache
- Posted by "Michelle Rogers" <michellerogers at bellsouth.net> Jun 26, 2004
- 489 views
I have a question, too.. in perl you get the variable from the form on the last screen by using... name=param('namekey') can anyone tell me how to get the variable from the form in euphoria? Michelle Rogers ----- Original Message ----- From: "Dave Probert" <guest at RapidEuphoria.com> To: <EUforum at topica.com> Sent: Saturday, June 26, 2004 4:23 AM Subject: Re: EUPHORIA CGI + Apache > > > posted by: Dave Probert <zingo at purpletiger.com> > > Quick update: > The ContentType line works, but should actually be Content-Type > > The hyphen makes a big difference. > > Then the html tags work fine. > > For those who are also struggling and following this thread - don't forget the \n\n at the end of the line - those matter too :) > > > >
9. Re: EUPHORIA CGI + Apache
- Posted by irv mullins <irvm at ellijay.com> Jun 26, 2004
- 504 views
Michelle Rogers wrote: > > I have a question, too.. > in perl you get the variable from the form on the last screen by using... > > name=param('namekey') > > > can anyone tell me how to get the variable from the form in euphoria? Yes. Get http://www.rapideuphoria.com/cgi.tar.gz Therein are demo'ed various ways of accepting form data. You will need to parse the input string and convert the escaped characters before you can use them. You'll find the necessary routines in that package as well. Regards, Irv
10. Re: EUPHORIA CGI + Apache
- Posted by irv mullins <irvm at ellijay.com> Jun 26, 2004
- 497 views
irv mullins wrote: > > Michelle Rogers wrote: > > can anyone tell me how to get the variable from the form in euphoria? > > Yes. Get <a > href="http://www.rapideuphoria.com/cgi.tar.gz">http://www.rapideuphoria.com/cgi.tar.gz</a> > Therein are demo'ed various ways of accepting form data. You will need > to parse the input string and convert the escaped characters before > you can use them. You'll find the necessary routines in that package > as well. Oh.. perhaps you don't have a way to untar that package. I'll zip it and post it to my website in a couple of minutes. Look for it on the downloads page at http://ellijay.com/users/irvm/ Irv
11. Re: EUPHORIA CGI + Apache
- Posted by Neil Fraser <euphoria at neil.fraser.name> Jun 26, 2004
- 494 views
cklester wrote: > I've set up a simple page of instructions for getting > Apache to serve EUPHORIA-generated HTML pages. Please > check it out and let me know if there's anything I missed. What's giving me headaches are includes. Normal includes like this fail: include machine.e They have to be rewritten to be explicit: include /home/fraser/euphoria/include/machine.e That's fine for my programs. But when I call standard libraries which call their own includes, these fail. Which forces me to edit the libraries and hack in my full path. This is really bad practice. What's the proper solution? How do I get the EUINC set up properly within a Linux/Apache/CGI environment?
12. Re: EUPHORIA CGI + Apache
- Posted by "Elliott S. de Andrade" <quantum_analyst at hotmail.com> Jun 26, 2004
- 486 views
>From: Dave Probert <guest at RapidEuphoria.com> >Reply-To: EUforum at topica.com >To: EUforum at topica.com >Subject: Re: EUPHORIA CGI + Apache >Date: Sat, 26 Jun 2004 01:15:42 -0700 > >posted by: Dave Probert <zingo at purpletiger.com> > >Thankyou extremely. Absolutely spot on reply. > >Just dropping the Content-Type in there worked perfectly (comment it out= =20 >and the error appears again) > >Though the < html >, etc tags show as is - ie they don't get tramsformed= =20 >for some reason - I'll look into that. It's probably some error on my=20 >part. (Yes I did remove the spaces ;) ) > Err, no, I meant on the EUforum webpage. I heard that HTML tags that= =20 weren't really HTML code (ie, not formatting for the e-mail, but text in th= e=20 e-mail) might disappear. It may be fixed now, though. >Thanks again. Both CKL and Elliott. > ~[ WingZone ]~ http://wingzone.tripod.com/ hs=20 FREE*=20=20=20 http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=10= 34&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
13. Re: EUPHORIA CGI + Apache
- Posted by "Elliott S. de Andrade" <quantum_analyst at hotmail.com> Jun 26, 2004
- 490 views
>From: Dave Probert <guest at RapidEuphoria.com> >Reply-To: EUforum at topica.com >To: EUforum at topica.com >Subject: Re: EUPHORIA CGI + Apache >Date: Sat, 26 Jun 2004 01:23:44 -0700 > >posted by: Dave Probert <zingo at purpletiger.com> > >Quick update: >The ContentType line works, but should actually be Content-Type > >The hyphen makes a big difference. > Ah, sorry, I couldn't remember which it was. It was a bit late... >Then the html tags work fine. > >For those who are also struggling and following this thread - don't forget >the \n\n at the end of the line - those matter too :) > The \n\n signifies the end of the headers. You can do something longer like this, which shows why you would need them:
puts(1, "Content-Type: text/html\n") printf(1, "Content-Length: %d\n", {length("some HTML code")}) puts(1, "Expires: Sunday, 27-Jun-2004 12:00:00 GMT\n") puts(1, "\n") --done headers puts(1, "some HTML code")
~[ WingZone ]~ http://wingzone.tripod.com/ _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN Premium http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
14. Re: EUPHORIA CGI + Apache
- Posted by "Michelle Rogers" <michellerogers at bellsouth.net> Jun 27, 2004
- 494 views
hmm..normal includes are working for me....but I'm using windows Michelle Rogers ----- Original Message ----- From: "Neil Fraser" <guest at RapidEuphoria.com> To: <EUforum at topica.com> Sent: Saturday, June 26, 2004 9:52 AM Subject: Re: EUPHORIA CGI + Apache > > > posted by: Neil Fraser <euphoria at neil.fraser.name> > > cklester wrote: > > I've set up a simple page of instructions for getting > > Apache to serve EUPHORIA-generated HTML pages. Please > > check it out and let me know if there's anything I missed. > > What's giving me headaches are includes. Normal includes like this fail: > include machine.e > They have to be rewritten to be explicit: > include /home/fraser/euphoria/include/machine.e > > That's fine for my programs. But when I call standard libraries which call > their own includes, these fail. Which forces me to edit the libraries and > hack in my full path. This is really bad practice. > > What's the proper solution? How do I get the EUINC set up properly within > a Linux/Apache/CGI environment? > > > >
15. Re: EUPHORIA CGI + Apache
- Posted by cklester <cklester at yahoo.com> Jun 27, 2004
- 592 views
Dave Probert wrote: > > Can you give a simple "Hello World" example of a Euphoria CGI script? Hi, Dave! I've updated the web page to provide a simple "Hello, world!" sample script. Let me know if y'all need anything else. ;) -=ck "Programming in a state of EUPHORIA."
16. Re: EUPHORIA CGI + Apache
- Posted by cklester <cklester at yahoo.com> Jun 27, 2004
- 491 views
Michelle Rogers wrote: > > hmm..normal includes are working for me....but I'm using windows When you use Linux/FreeBSD, you have to make sure that the "user" that runs Apache will have permission to the EUPHORIA directory. I also notice on Windows that I don't have this problem. On my FreeBSD box, I do have to be explicit about stuff. For my Linux web host, I put exu and all the needed includes in the same folder as where the scripts are... :/ -=ck "Programming in a state of EUPHORIA."
17. Re: EUPHORIA CGI + Apache
- Posted by Mario Steele <eumario at tuscanchat.com> Jun 29, 2004
- 490 views
cklester wrote: >When you use Linux/FreeBSD, you have to make sure that the "user" that >runs Apache will have permission to the EUPHORIA directory. > >I also notice on Windows that I don't have this problem. On my FreeBSD >box, I do have to be explicit about stuff. > >For my Linux web host, I put exu and all the needed includes in the >same folder as where the scripts are... :/ > > The reason for this, is cause sometimes Apache doesn't allow access to certian Enviroment Variables, in order to prevent hacking. If you want a Enviroment Variable to work, you'll have to set it up in the httpd.conf file. This applies to both Windows, and Linux. The easiest way to do this is put these lines in your httpd.conf SETENV EUINC="C:\euinc" SETENV EUPHORIA="C:\euphoria" -- OR for linux -- SETENV EUINC="/home/eumario/euinc" SETENV EUPHORIA="/home/eumario/euphoria" That should solve your problems with it not finding the Include files properly. But be sure to have loadmodule "env.so" or whatever it may be on which ever system. It should be in the default httpd.conf file, and may be commented out. L8ers Mario
18. Re: EUPHORIA CGI + Apache
- Posted by cklester <cklester at yahoo.com> Jun 29, 2004
- 494 views
Mario Steele wrote: > > cklester wrote: > > >For my Linux web host, I put exu and all the needed includes in the > >same folder as where the scripts are... :/ > > > If you want > a Enviroment Variable to work, you'll have to set it up in the > httpd.conf file. This applies to both Windows, and Linux. The easiest > way to do this is put these lines in your httpd.conf > SETENV EUINC="C:\euinc" > SETENV EUPHORIA="C:\euphoria" > > -- OR for linux -- > SETENV EUINC="/home/eumario/euinc" > SETENV EUPHORIA="/home/eumario/euphoria" Thanks, Mario! Very helpful. -=ck "Programming in a state of EUPHORIA."