DocumentRoot "e:/dev/webpub" #windows doesn't like .files so dot.htaccess works or whatever fancies you. AccessFileName dot.htaccess --> AccessFileName dot.htaccess --> IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t *.rb **Eruby install only [if you're going to use Eruby ALONE no mod_ruby]** download binary from ruby-mirror/binaries/mswin32|mingw/1.8/ext MSWIN http://www.ibiblio.org/pub/languages/ruby/binaries/mswin32/ext/eruby-1.0.4-i386-mswin32-1.8.zip MINGW http://www.ibiblio.org/pub/languages/ruby/binaries/mingw/1.8/ext/eruby-1.0.5-i386-mingw32-1.8.tar.gz or compile eruby with your compiler(mingw in my case) sources at http://modruby.net/ current: eruby-1.0.5.tar.gz tar -xvzf eruby-1.0.5.tar.gz ruby configure.rb --enable-shared && make && make install in httpd.conf add: AddType application/x-httpd-eruby .rhtml #use your own path to eruby Action application/x-httpd-eruby "e:/usr/local/bin/eruby.exe" AddType application/x-httpd-cgi .rhtml #not really needed AddHandler cgi-script .cgi add "+ExecCGI" directive to pertinent directories sections or add it in the global DocumentRoot(be warned thought, this allows executable cgis in ALL DocumentRoot an subdirs good for localhost but probably not smart for real servers). add as first line to the cgi files(*.rb,*.rhtml...) #!e:/usr/local/bin/eruby.exe <--change to own path, to avoid internal server errors. Save this in docroot as eruby_test.rhtml, run it. ------------------------------------ #!e:/usr/local/bin/eruby.exe <% begin require 'Find' #test to check requiring puts "Welcome to eruby Test
"
val=Dir["*"]
val.each do |entry|
if FileTest.directory?(entry)
print '[DIR]  #{entry}\t\t\t#{File.mtime(entry)}\n")
end
puts "
" rescue puts "Content-Type: text/plain" puts "

" puts "Error #{$!}: #{$!.backtrace}
" end ------------------------------------- **Install using mod_ruby + eruby** get mod_ruby binary at: http://www.moriq.com/ruby/win32-apache2-ruby1.8.1-mod_ruby/ sources at http://modruby.net/ copy *.so to apache2/modules/ add the line in httpd.conf from the source of eruby copy the /lib/apache + autoreload.rb to the \usr\local\lib\ruby\site_ruby\1.8 LoadModule ruby_module modules/mod_ruby.so Options Indexes FollowSymLinks ExecCGI AllowOverride None Order allow,deny Allow from all RubyRequire "E:/usr/local/lib/ruby/site_ruby/1.8/apache/ruby-run" SetHandler ruby-object RubyHandler Apache::RubyRun.instance SetHandler ruby-object RubyHandler Apache::ERubyRun.instance test file 1.rbx: -------------------- #!e:/usr/local/bin/ruby #print "HTTP/1.1 200 OK\n" #print "Content-Type: text/plain\n\n" require 'cgi' cgi = CGI.new cgi.out { "hello world" } -------------------- :-( been unable to run mod_ruby [Tue Feb 10 20:45:03 2004] [error] access to E:/dev/webpub/ruby/1.rbx failed for (null), reason: file permissions deny server execution OK maybe I'm doing something wrong on the conf file, so the files aren't autorized to execute...check later trying to run eruby_test gives me: [Tue Feb 10 20:47:01 2004] [error] mod_ruby: error in ruby (eval): (eval)uninitialized constant Apache::ERubyRun (NameError) from (eval):0:in `value' the *.so doesn't have eruby support? SO I get my conf back to eruby only, anyway eruby is enough for me, there's fcgi but haven't gotten around installing it. php? install is quite simple, thought(like eruby) but there's files that need to be copied here and there, mostly php4apache2.dll,php4ts.dll to php dir and lots|few changes to php ini depending on your needs, easier to go but, been there...now using eruby. perl, :-O? well never have used it, but it should be as eruby/cgi: #!/usr/bin/perl -code- install Activeperl point your *.pl with a shebang and done hope it helps, btw got around thumbnails? ;-) [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => <4029BD38.8060309@prodigy.net.mx> [ref] => [htmlstate] => on_nl2br [postusername] => Osuka [ip] => rocioestradacas [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> Help! - Ruby

Help! - Ruby

Need step by step instruction(and what other windows dlls to get) on how to get CGI to work with my apache 2.0.48(windows version) for the following scripting language: ruby, perl, and php. Thanks...

  1. #1

    Default Help!

    Need step by step instruction(and what other windows dlls to get) on how to
    get CGI to work with my apache 2.0.48(windows version) for the following
    scripting language: ruby, perl, and php.

    Thanks


    Useko Guest

  2. #2

    Default Re: Help!

    Useko Netsumi wrote: 

    did this:

    #in the /apache2/conf/httpd.conf
    #adjust DoentRoot "E:/dev/Daemon/Apache2/htdocs" to your dir holding
    the pages my case
    DoentRoot "E:/dev/Daemon/Apache2/htdocs" --> DoentRoot "e:/dev/webpub"
    #windows doesn't like .files so dot.htaccess works or whatever fancies you.
    AccessFileName dot.htaccess --> AccessFileName dot.htaccess
    <Files ~ "^\.ht"> --> <Files ~ "^dot.ht">
    IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t *.rb


    **Eruby install only [if you're going to use Eruby ALONE no mod_ruby]**
    download binary from ruby-mirror/binaries/mswin32|mingw/1.8/ext
    MSWIN
    http://www.ibiblio.org/pub/languages/ruby/binaries/mswin32/ext/eruby-1.0.4-i386-mswin32-1.8.zip
    MINGW
    http://www.ibiblio.org/pub/languages/ruby/binaries/mingw/1.8/ext/eruby-1.0.5-i386-mingw32-1.8.tar.gz
    or compile eruby with your compiler(mingw in my case) sources at
    http://modruby.net/ current: eruby-1.0.5.tar.gz

    tar -xvzf eruby-1.0.5.tar.gz
    ruby configure.rb --enable-shared && make && make install

    in httpd.conf add:
    AddType application/x-httpd-eruby .rhtml
    #use your own path to eruby
    Action application/x-httpd-eruby "e:/usr/local/bin/eruby.exe"
    AddType application/x-httpd-cgi .rhtml
    #not really needed
    AddHandler cgi-script .cgi

    add "+ExecCGI" directive to pertinent directories sections or add it in
    the global DoentRoot(be warned thought, this allows executable cgis
    in ALL DoentRoot an subdirs good for localhost but probably not smart
    for real servers).

    add as first line to the cgi files(*.rb,*.rhtml...)
    #!e:/usr/local/bin/eruby.exe <--change to own path, to avoid internal
    server errors.
    Save this in docroot as eruby_test.rhtml, run it.
    ------------------------------------
    #!e:/usr/local/bin/eruby.exe
    <%
    begin
    require 'Find' #test to check requiring
    puts "<HTML><HEAD><TITLE>Welcome to eruby Test</TITLE></HEAD><BODY><pre>"
    val=Dir["*"]
    val.each do |entry|
    if FileTest.directory?(entry)
    print '<img src="/icons/folder.gif" alt="[DIR]" /> <a href="'
    else
    print '<img src="/icons/unknown.gif" alt="[DIR]" /> <a href="'
    end
    printf("#{entry}\">#{entry}</a>\t\t\t#{File.mtime(entry)}\n")
    end
    puts "</pre></BODY>"
    rescue
    puts "Content-Type: text/plain"
    puts "<br><br>"
    puts "Error #{$!}: #{$!.backtrace}<br>"
    end

    -------------------------------------

    **Install using mod_ruby + eruby**
    get mod_ruby binary at:
    http://www.moriq.com/ruby/win32-apache2-ruby1.8.1-mod_ruby/
    sources at http://modruby.net/

    copy *.so to apache2/modules/ add the line in httpd.conf
    from the source of eruby copy the /lib/apache + autoreload.rb to the
    \usr\local\lib\ruby\site_ruby\1.8

    LoadModule ruby_module modules/mod_ruby.so
    <Location / >
    Options Indexes FollowSymLinks ExecCGI
    AllowOverride None
    Order allow,deny
    Allow from all
    </Location>

    <IfModule mod_ruby.c>
    RubyRequire "E:/usr/local/lib/ruby/site_ruby/1.8/apache/ruby-run"
    <Files *.rbx>
    SetHandler ruby-object
    RubyHandler Apache::RubyRun.instance
    </Files>
    <Files *.rhtml>
    SetHandler ruby-object
    RubyHandler Apache::ERubyRun.instance
    </Files>
    </IfModule>

    test file 1.rbx:
    --------------------
    #!e:/usr/local/bin/ruby
    #print "HTTP/1.1 200 OK\n"
    #print "Content-Type: text/plain\n\n"
    require 'cgi'
    cgi = CGI.new
    cgi.out {
    "hello world"
    }
    --------------------

    :-( been unable to run mod_ruby
    [Tue Feb 10 20:45:03 2004] [error] access to E:/dev/webpub/ruby/1.rbx
    failed for (null), reason: file permissions deny server execution
    OK maybe I'm doing something wrong on the conf file, so the files aren't
    autorized to execute...check later

    trying to run eruby_test gives me:
    [Tue Feb 10 20:47:01 2004] [error] mod_ruby: error in ruby
    (eval): (eval)uninitialized constant Apache::ERubyRun (NameError)
    from (eval):0:in `value'
    the *.so doesn't have eruby support?

    SO I get my conf back to eruby only, anyway eruby is enough for me,
    there's fcgi but haven't gotten around installing it.

    php? install is quite simple, thought(like eruby) but there's files that
    need to be copied here and there, mostly php4apache2.dll,php4ts.dll to
    php dir and lots|few changes to php ini depending on your needs, easier
    to go but, been there...now using eruby.

    perl, :-O? well never have used it, but it should be as eruby/cgi:
    #!/usr/bin/perl
    -code-
    install Activeperl point your *.pl with a shebang and done

    hope it helps, btw got around thumbnails? ;-)


    Osuka Guest

  3. #3

    Default Re: Help!

    I just installed apache/php this weekend with Windows XP and got great
    instructions at inikis.com.



    --

    "Useko Netsumi" <net> wrote in message
    news:c0bkoq$14oro8$news.uni-berlin.de... 
    to 


    Erika Guest

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •