1. Euphoria + CGI + Linux

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

new topic     » topic index » view message » categorize

2. Re: Euphoria + CGI + Linux

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

new topic     » goto parent     » topic index » view message » categorize

3. Re: Euphoria + CGI + Linux

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

new topic     » goto parent     » topic index » view message » categorize

4. Re: Euphoria + CGI + Linux

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 ]

new topic     » goto parent     » topic index » view message » categorize

5. Re: Euphoria + CGI + Linux

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

new topic     » goto parent     » topic index » view message » categorize

6. Re: Euphoria + CGI + Linux

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..

new topic     » goto parent     » topic index » view message » categorize

7. Re: Euphoria + CGI + Linux

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"

new topic     » goto parent     » topic index » view message » categorize

8. Re: Euphoria + CGI + Linux

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

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu