Need help with mod_ruby under Win32

I

Iouri Kloubakov

Hi,

I know there are not many people on this mailing list who use my
configuration but hope that someone can help solve my problem.

Windows XP SP1
Apache 2.0.49
mod_ruby 1.1.1
(from http://www.moriq.com/ruby/win32-apache2-ruby1.8.1-mod_ruby/)

I've copied "lib/apache" folder from mod_ruby-1.1.3 source distribution
to "c:\ruby\lib\ruby\site_ruby\1.8" and updated httpd.conf with:

<IfModule mod_ruby.c>
RubyRequire apache/ruby-run
<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
</IfModule>

Now, when I'm trying to open "http://localhost/test.rbx" I am getting
the following error:

"access to C:/Program Files/Apache Group/Apache2/htdocs/test.rbx failed
for (null), reason: file permissions deny server execution"

If I rename the file to "test.r" the browser shows it.
 
K

Kaspar Schiess

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

in site_ruby/apache/ruby-run.rb and ruby-debug.rb:

~ #~ unless r.finfo.executable?
#~ r.log_reason("file permissions deny server execution", r.filename)
#~ return FORBIDDEN
~ #~ end

Commented out because not needed on my Windows XP SP1 machine, so you
are not alone.

I had other troubles with that setup, so I kind of gave up. Basic
mod_ruby runs fine though.

kaspar

semantics & semiotics
code manufacture

www.tua.ch/ruby
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAyzMNFifl4CA0ImQRAuKPAKCQQ4ffEOLLB9Cw7F8A3v1T6u8FWwCeKLWO
ThpfNumklos30BQElK6RK64=
=t5mc
-----END PGP SIGNATURE-----
 
I

Iouri Kloubakov

-----Original Message-----
From: news [mailto:[email protected]]On Behalf Of Kaspar Schiess
Sent: June 12, 2004 12:41

in site_ruby/apache/ruby-run.rb and ruby-debug.rb:

~ #~ unless r.finfo.executable?
#~ r.log_reason("file permissions deny server execution",
r.filename)
#~ return FORBIDDEN
~ #~ end

Commented out because not needed on my Windows XP SP1 machine, so you
are not alone.

Thanks, Kaspar. I am not getting this error any more.
I had other troubles with that setup, so I kind of gave up. Basic
mod_ruby runs fine though.

I'd like to get basic mod_ruby working before I give up too.
Right now Apache "freezes" (so that I have to restart it) on
the following simple "test.rbx" script:

print "HTTP/1.1 200 OK\r\n"
print "Content-Type: text/plain\r\n\r\n"
print "hello world"
 
I

Iouri Kloubakov

-----Original Message-----
From: Iouri Kloubakov [mailto:[email protected]]
Sent: June 12, 2004 16:16
-----Original Message-----
From: news [mailto:[email protected]]On Behalf Of Kaspar Schiess
Sent: June 12, 2004 12:41
I had other troubles with that setup, so I kind of gave up. Basic
mod_ruby runs fine though.

I'd like to get basic mod_ruby working before I give up too.
Right now Apache "freezes" (so that I have to restart it) on
the following simple "test.rbx" script:

print "HTTP/1.1 200 OK\r\n"
print "Content-Type: text/plain\r\n\r\n"
print "hello world"

After some debugging done, I found that Apache crashes on the
call to "setup_cgi_env" in "ruby-run.rb". I guess, it's some
incompatibility between mod_rudy.so/1.1.1 for Windows and Apache 2.0.49.

Yura.
 
I

Iouri Kloubakov

-----Original Message-----
From: Iouri Kloubakov [mailto:[email protected]]
Sent: June 12, 2004 17:50

After some debugging done, I found that Apache crashes on the
call to "setup_cgi_env" in "ruby-run.rb". I guess, it's some
incompatibility between mod_rudy.so/1.1.1 for Windows and Apache 2.0.49.

I found the problem but I am not good with patches.

File: mod_ruby.c
Function: mod_ruby_clearenv()
Fix: replace call to putenv(buf) with call to ruby_unsetenv(buf)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,800
Messages
2,569,657
Members
45,411
Latest member
CarmaStarn
Top