Page 1 of 1

cgi vs pl extension

PostPosted: 02. September 2011 20:42
by ggalan
i am running a simple ruby page on xampp
everything works fine when the extension is cgi but when i change it to .pl i get a error 500
Code: Select all
Error message:
syntax error at D:/xampp-1.74/htdocs/helloWorld_ruby.pl line 3, near "#line 1 D:/xampp-1.74/htdocs/helloWorld_ruby.pl #!/xampp-1.74/Ruby192/bin/ruby puts "Content-Type: text/html\n\n"" ,

also this doesnt seem to have any effect when i go to localhost:3000
but i did add the line "AddHandler cgi-script .cgi .pl"
Code: Select all
Listen 3000
#LoadModule rewrite_module modules/mod_rewrite.so
<virtualHost *:3000>
ServerName rails
DocumentRoot "d:\xampp-1.74\htdocs\\ruby\public"
   <Directory "d:\xampp-1.74\htdocs\\ruby\public">
      Options ExecCGI FollowSymLinks
      AllowOverride all
      Allow from all
      Order allow,deny
      AddHandler cgi-script .cgi .pl
      AddHandler fastcgi-script .fcgi
   </Directory>
</VirtualHost>

any suggestions?

Re: cgi vs pl extension

PostPosted: 03. September 2011 19:22
by JonB
AFAIK - (besides any other thoughts) XAMPP's Apache can't run FCGI as it is a thread-safe compilation.

:shock:

Re: cgi vs pl extension

PostPosted: 03. September 2011 20:54
by ggalan
i was following this article
http://jakebohall.com/getting-rails-to- ... pp/03/2008
people seem to be fine with it

Re: cgi vs pl extension

PostPosted: 03. September 2011 21:56
by JonB
well then - you have your answers don't you. :wink:
Update 04/15/09

I now dual boot to Linux to play with ROR vs. fighting to install ruby on rails on a windows machine. I found it to be an endless battle of debugging.


Me: I stand by my comment about Apache and FastCGI, most folks want/need PHP support, and I think in that situation, its a non-starter. I suspect that is the general case - I'd disable it as all it does is complicate debugging, its a performance enhancer only. I understand that Apache does not make a good Rails server (I researched it a while ago), I think the problem was involved with instance control for Ruby.

For us, its all an unsupported hack.

:)

Re: cgi vs pl extension

PostPosted: 03. September 2011 22:34
by ggalan
thank you for your help, i commented it out
#AddHandler fastcgi-script .fcgi
but still the same result, will look into ubuntu as an option to windows