SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    John 8:24 JREAM's Avatar
    Join Date
    Sep 2007
    Location
    Florida
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How is Perl/Python/Ruby run on webserver?

    Does it all run through CGI?
    So you have to link !#usr/bin/interpreter top?

    Reason I ask is because, I'm used to PHP just popping things into the public_html directory which I like.

    Can you do this with perl/py/ruby? Or does it HAVE to be in the CGI directory? That would bother me a LOT.

  2. #2
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,266
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    So far as I know, no, you don't HAVE to have stuff in the cgi-bin folder. That's the traditional place for Perl, and others picked it up.

    Modern use of Python use wsgi (web server gateway interface) and Ruby's got Rack and Perl's got the similar Plack (works with psgi, Perl's version of wsgi). Okay, these are more for "web applications" than web scripts, but then again, what's the difference?

    http://search.cpan.org/~miyagawa/PSGI-1.03/PSGI/FAQ.pod

    http://wsgi.org/wsgi/

    http://rack.rubyforge.org/

    Or does it HAVE to be in the CGI directory?
    I believe so long as your server is configured correctly and knows where the scripts are and where the files are the script should be calling, you can put your programs anywhere you want (within reason). You can also have stuff in a folder called cgi-bin but use mod-rewrite to remove that from urls (if that's the issue, tho it doesn't sound like it).

  3. #3
    John 8:24 JREAM's Avatar
    Join Date
    Sep 2007
    Location
    Florida
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey cool this will be helpful some links. My eyes are about burned out now from reading so much :P There is something called IronPython which works with .NET and plugs into VisualStudio, I found that impressive! I've never used VisualStudio anyway. Thanks!

  4. #4
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,266
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    I thought IronPython was C/Python, or Java Python or something... 'cause I vaguely remember an IronRuby out there : )

    I've never worked with CGI or webservers (not that far yet, lawlz) so don't take my word for any of it... and you can always ask on Perlmonks.org for what the options are for Perl.

    You might want to check out this node, but it's more talking about, "don't try to roll your own" rather than the web app Plack-stuff (keep in mind this was posted back in 2001, before such things existed):
    http://perlmonks.org/?node_id=51012

  5. #5
    SitePoint Member
    Join Date
    Jul 2010
    Location
    Germany
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One problem with CGI is that it's very slow, that's why all the programming languages mentioned now offer better ways to connect to the web server.

  6. #6
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,266
    Mentioned
    50 Post(s)
    Tagged
    2 Thread(s)
    Yeah like CGI::Fast and/or mod_perl. Really, there are lots of fast-cgi modules for Perl...

    This is actually where Perl got the accusation of being slow, when in fact it was just basic CGI slowness from the Bad Old Days of the web : )


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
  •