1. Euphoria + CGI + Linux
- Posted by Erik-Jan van Kampen <e.vankampen at student.tudelft.nl> Oct 08, 2004
- 448 views
Hello all, I am trying to get a simple cgi-program to run on a Apache 2.0 server running on RedHat 9.0. The script I try to run is :
#!exu puts(1,"Content-type: text.html\n\n") puts(1,"<html>") puts(1,"<title>" & "TEST" & "</title>") puts(1,"</head>") puts(1,"<body>") puts(1,"TEST") puts(1,"</body>") puts(1,"</html>")
I have put exu with all of the includes and the scriptfile into the usr/local/apache2/cgi-bin directory and set the file permissions of exu and eutest.exu to -rwx--xr-x and all other files to -rw-r--r--. When I click on a link to this program I get the following server error(in the error log): (2)No such file or directory: exec of '/usr/local/apache2/cgi-bin/eutest.exu' failed When I run: exu eutest.exu or ./exu eutest.exu I get the correct output on screen, but when I try ./eutest.exu in the /cgi-bin directory I get the following error: : bad interpreter: No such file or directory Changing the first line of the script into #!./exu makes no difference What am I doing wrong? Thanks for any help, Erik-Jan van Kampen
2. Re: Euphoria + CGI + Linux
- Posted by Erik-Jan van Kampen <e.vankampen at student.tudelft.nl> Oct 08, 2004
- 446 views
Erik-Jan van Kampen wrote: > > Hello all, > > I am trying to get a simple cgi-program to run on a Apache 2.0 server running > on RedHat > 9.0. > > The script I try to run is : > }}} <eucode> > #!exu > puts(1,"Content-type: text.html\n\n") > puts(1,"<html>") > puts(1,"<title>" & "TEST" & "</title>") > puts(1,"</head>") > puts(1,"<body>") > puts(1,"TEST") > puts(1,"</body>") > puts(1,"</html>") > </eucode> {{{ > I have put exu with all of the includes and the scriptfile into the > usr/local/apache2/cgi-bin > directory and set the file permissions of exu and eutest.exu to -rwx--xr-x and > all > other files to -rw-r--r--. > When I click on a link to this program I get the following server error(in the > error > log): > > (2)No such file or directory: exec of '/usr/local/apache2/cgi-bin/eutest.exu' > failed > > When I run: exu eutest.exu or ./exu eutest.exu I get the correct output on > screen, > but when I try ./eutest.exu in the /cgi-bin directory I get the following > error: > > : bad interpreter: No such file or directory > > Changing the first line of the script into #!./exu makes no difference > What am I doing wrong? > > Thanks for any help, > Erik-Jan van Kampen > I forgot the <head> tag between lines 3 and 4, but including his didn't solve the problem. Erik-Jan
3. Re: Euphoria + CGI + Linux
- Posted by Jonas Temple <jtemple at yhti.net> Oct 08, 2004
- 421 views
Erik-Jan van Kampen wrote: > > }}} <eucode> > > #!exu > > puts(1,"Content-type: text.html\n\n") > > puts(1,"<html>") > > puts(1,"<title>" & "TEST" & "</title>") > > puts(1,"</head>") > > puts(1,"<body>") > > puts(1,"TEST") > > puts(1,"</body>") > > puts(1,"</html>") > > </eucode> {{{ Erik, Maybe try pointing to the exact location of exu in the first line: #!/usr/bin/exu or wherever your exu is located. Jonas Temple http://www.yhti.net/~jktemple
4. Re: Euphoria + CGI + Linux
- Posted by "Carl R. White" <euphoria at cyreksoft.yorks.com> Oct 08, 2004
- 434 views
Erik-Jan wrote: [cgi not working] You'll need to make sure that the exu executable is world-executable as well as the script - most webservers don't run interpreters as the owner of the space the script is running from. Not by default anyway. HTH Carl (Yes I'm still lurking out here on the fringe.) -- [ Carl R White == aka () = The Domain of Cyrek = ] [ Cyrek the Illogical /\ www.cyreksoft.yorks.com ]
5. Re: Euphoria + CGI + Linux
- Posted by Erik-Jan van Kampen <e.vankampen at student.tudelft.nl> Oct 08, 2004
- 435 views
Jonas Temple wrote: > > Erik-Jan van Kampen wrote: > > > }}} <eucode> > > > #!exu > > > puts(1,"Content-type: text.html\n\n") > > > puts(1,"<html>") > > > puts(1,"<title>" & "TEST" & "</title>") > > > puts(1,"</head>") > > > puts(1,"<body>") > > > puts(1,"TEST") > > > puts(1,"</body>") > > > puts(1,"</html>") > > > </eucode> {{{ > Erik, > > Maybe try pointing to the exact location of exu in the first line: > #!/usr/bin/exu > > or wherever your exu is located. > > Jonas Temple > <a href="http://www.yhti.net/~jktemple">http://www.yhti.net/~jktemple</a> > Jonas, I tried pointing to the exact location of exu (which is the same directory as the script file) and it worked!!! Then I tried just the #!exu again since that should also be valid and it still worked perfectly!! I'm guessing I had put something like a space or a wrong line ending after the first line which caused the problem. Thanks for your response, Erik-Jan
6. Re: Euphoria + CGI + Linux
- Posted by Robert S <robsz1 at comcast.net> Oct 08, 2004
- 432 views
Erik-Jan van Kampen wrote: > > Jonas Temple wrote: > > > > Erik-Jan van Kampen wrote: > > > > }}} <eucode> > > > > #!exu > > > > puts(1,"Content-type: text.html\n\n") > > > > puts(1,"<html>") > > > > puts(1,"<title>" & "TEST" & "</title>") > > > > puts(1,"</head>") > > > > puts(1,"<body>") > > > > puts(1,"TEST") > > > > puts(1,"</body>") > > > > puts(1,"</html>") > > > > </eucode> {{{ > > Erik, you also have a </head> tag but no <head> tag. Not that it affects exu..
7. Re: Euphoria + CGI + Linux
- Posted by Robert S <robsz1 at comcast.net> Oct 08, 2004
- 599 views
Erik-Jan van Kampen wrote: > > Jonas Temple wrote: > > > > Erik-Jan van Kampen wrote: > > > > }}} <eucode> > > > > #!exu > > > > puts(1,"Content-type: text.html\n\n") > > > > puts(1,"<html>") > > > > puts(1,"<title>" & "TEST" & "</title>") > > > > puts(1,"</head>") > > > > puts(1,"<body>") > > > > puts(1,"TEST") > > > > puts(1,"</body>") > > > > puts(1,"</html>") > > > > </eucode> {{{ > > Erik, >you also have a </head> tag but no <head> tag. Not that it affects exu.. And its "Content-type: text/html\n\n" not "text.html"
8. Re: Euphoria + CGI + Linux
- Posted by Erik-Jan van Kampen <e.vankampen at student.tudelft.nl> Oct 08, 2004
- 433 views
Robert S wrote: > > Erik-Jan van Kampen wrote: > > > > Jonas Temple wrote: > > > > > > Erik-Jan van Kampen wrote: > > > > > }}} <eucode> > > > > > #!exu > > > > > puts(1,"Content-type: text.html\n\n") > > > > > puts(1,"<html>") > > > > > puts(1,"<title>" & "TEST" & "</title>") > > > > > puts(1,"</head>") > > > > > puts(1,"<body>") > > > > > puts(1,"TEST") > > > > > puts(1,"</body>") > > > > > puts(1,"</html>") > > > > > </eucode> {{{ > > > Erik, > > >you also have a </head> tag but no <head> tag. Not that it affects exu.. > And its "Content-type: text/html\n\n" not "text.html" > Thanks, I had already fixed both items you pointed out and it's working fine now Erik-Jan