From: Bhagavatheeswaran Mahadevan Date: 2001-11-27T22:41:47+09:00 Subject: [ruby-talk:26655] Re: CGI This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C17749.9BD610E0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C17749.9BD610E0" ------_=_NextPart_001_01C17749.9BD610E0 Content-Type: text/plain I am trying to run this script.........a pretty simpleone #!/ruby/bin/ruby print "HTTP/1.0 200 OK\r\n" print "Content-type: text/html \r\n\r\n" print "Hello world \r\n" My ruby.exe is in ruby/bin/ruby The error.log file says bad header........I am also sending the error.log file......so u all can help me out......... <> . Thanks Suresh > -----Original Message----- > From: Dave Thomas [SMTP:Dave@PragmaticProgrammer.com] > Sent: 27 November 2001 19:06 > To: ruby-talk@ruby-lang.org > Subject: [ruby-talk:26653] Re: CGI > > Bhagavatheeswaran Mahadevan writes: > > > using http://localhost/cgi-bin/one.rb but still getting error page as > > "Internal Server Error" > > I have added the comment line in my script file... > > > > #!/ruby/bin/ruby > > > > > > but still my code not working............ > > > > > Could anybody please help me out...do I have to make some changes in the > > httpd.conf file............ > > What does your Apache error.log say? Is the script executable? And is > your Ruby really in /ruby/bin/ruby (rather than /usr/bin/ruby?) > > > Dave ------_=_NextPart_001_01C17749.9BD610E0 Content-Type: text/html Content-Transfer-Encoding: quoted-printable RE: [ruby-talk:26653] Re: CGI

I am trying to run = this script.........a pretty simpleone

#!/ruby/bin/ruby
print = "HTTP/1.0 200 OK\r\n"
print = "Content-type: text/html \r\n\r\n"
print = "<html><body>Hello world</body></html> = \r\n"


My ruby.exe is in = ruby/bin/ruby

The error.log file = says bad header........I am also sending the error.log file......so u = all can help me out.........

= <<error.log>> .


Thanks
Suresh

    -----Original Message-----
    From:   Dave Thomas = [SMTP:Dave@PragmaticProgrammer.com]
    Sent:   27 November 2001 19:06
    To:     ruby-talk@ruby-lang.org
    Subject:       = [ruby-talk:26653] Re: CGI

    Bhagavatheeswaran Mahadevan = <BMahadevan@NIIT.com> writes:

    > using http://localhost/cgi-bin/one.rb but still getting = error page as
    > "Internal Server = Error"
    > I have added the comment line in = my script file...
    >
    > #!/ruby/bin/ruby
    >
    >
    > but still my code not = working............
    >

    > Could anybody please help me = out...do I have to make some changes in the
    > httpd.conf = file............

    What does your Apache error.log say? = Is the script executable? And is
    your Ruby really in /ruby/bin/ruby = (rather than /usr/bin/ruby?)


    Dave

------_=_NextPart_001_01C17749.9BD610E0-- ------_=_NextPart_000_01C17749.9BD610E0 Content-Type: application/octet-stream; name="error.log" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="error.log" Apache server shutdown initiated... [Tue Nov 27 17:52:29 2001] [error] [client 127.0.0.1] malformed header = from script. Bad header=3DHTTP/1.0 200 OK: c:/program files/apache = group/apache/cgi-bin/one.rb [Tue Nov 27 18:00:02 2001] [error] [client 127.0.0.1] malformed header = from script. Bad header=3DHTTP/1.0 200 OK: c:/program files/apache = group/apache/cgi-bin/one.rb Apache server shutdown initiated... [Tue Nov 27 18:02:29 2001] [error] [client 127.0.0.1] malformed header = from script. Bad header=3DHTTP/1.0 200 OK: c:/program files/apache = group/apache/cgi-bin/one.rb [Tue Nov 27 18:02:52 2001] [error] [client 127.0.0.1] attempt to invoke = directory as script: c:/program files/apache group/apache/cgi-bin [Tue Nov 27 18:03:24 2001] [error] [client 127.0.0.1] File does not = exist: c:/program files/apache group/apache/htdocs/one.rb [Tue Nov 27 18:04:42 2001] [error] [client 127.0.0.1] File does not = exist: c:/program files/apache group/apache/htdocs/one.rb [Tue Nov 27 18:04:43 2001] [error] [client 127.0.0.1] File does not = exist: c:/program files/apache group/apache/htdocs/one.rb [Tue Nov 27 18:06:55 2001] [error] [client 127.0.0.1] malformed header = from script. Bad header=3DHTTP/1.0 200 OK: c:/program files/apache = group/apache/cgi-bin/one.rb [Tue Nov 27 18:15:54 2001] [error] [client 127.0.0.1] malformed header = from script. Bad header=3DHTTP/1.0 200 OK: c:/program files/apache = group/apache/cgi-bin/one.rb [Tue Nov 27 18:51:32 2001] [error] [client 127.0.0.1] couldn't spawn = child process: c:/program files/apache group/apache/cgi-bin/one.rb [Tue Nov 27 18:51:40 2001] [error] [client 127.0.0.1] couldn't spawn = child process: c:/program files/apache group/apache/cgi-bin/one.rb ------_=_NextPart_000_01C17749.9BD610E0--