Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Webhosting with Perl/CGI

by Anonymous Monk
on Jun 07, 2012 at 13:14 UTC ( #974937=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks,
what free webhosting with Perl/CGI support would you suggest? The purpose is just learning Perl/CGI by doing. Ad banner would be therefore no problem.
Thanks!

Comment on Webhosting with Perl/CGI
Re: Webhosting with Perl/CGI
by ww (Bishop) on Jun 07, 2012 at 13:23 UTC
    If learning is the sole point, it would make more sense to me (YMMV) to install Apache or another widely used server on your own machine... as you'll likely need to know at least a bit about common Apache configurations to deal with some of their ticks and quirks (aka "invented here" which varies from provider to provider).

    That said, you can find numerous answers to very similar questions by using Google against PerlMonks or by using our own Super Search. Failure to do so may be read as lack of effort on your part.

Re: Webhosting with Perl/CGI
by RedElk (Hermit) on Jun 07, 2012 at 14:08 UTC

    This link was helpful for me.

Re: Webhosting with Perl/CGI
by Your Mother (Canon) on Jun 07, 2012 at 14:30 UTC

    What ww said, though you don't even need a "real" webserver at this point.

    File hai.cgi

    #!/usr/bin/env perl use strictures; use CGI qw(:standard); print header(), start_html("OHAI"), h1("HAI DER"), blockquote("I CAN HAZ SEE GEE AIEE?"), p("KTHXBAI!"), end_html();

    Command line-

    moo@cow[201]~>plackup -L Shotgun -p 8080 -MPlack::App::WrapCGI -e 'Pla +ck::App::WrapCGI->new(script => "/home/moo/hai.cgi")' # HTTP::Server::PSGI: Accepting connections at http://0:8080/

    Then visit your CGI at something like http://localhost:8080 depending on your box.

    Helpful reading

Re: Webhosting with Perl/CGI
by Anonymous Monk on Jun 08, 2012 at 08:08 UTC
    Thank you all!
    Have installed XAMPP (portable) for Win32 now. (I am afraid that the Plack is a mental overload for me :-( )
    XAMPP has a "Mini-Perl" however, i.e. without any modules.
    Is it possible to "exchange" Mini-Perl to a real Perl installation (or to link XAMPP to my installed ActivePerl)?
    Thanks!
        Thank you, this was really helpful!
        First, after changing the shebang I could use my installed ActivePerl.
        Second, it appears that only Lite version of XAMPP comes with miniPerl, the "real" one comes with Perl 5.10 with a lot of modules and with ppm etc. to install some other ones.
      My XAMPP experience is limited to Windows so ... In your cgi script put the location of the perl you wish to use on the shebang line.
      Actually, you don't need to know anything about Plack or read all the documentation. Just install the modules YourMother has listed and use the command as shown, just replace the path with the path to your cgi script. Should be all you need.
Reaped: Re: Webhosting with Perl/CGI
by NodeReaper (Curate) on Jun 10, 2012 at 13:02 UTC
Reaped: Re: Webhosting with Perl/CGI
by NodeReaper (Curate) on Jun 12, 2012 at 12:53 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://974937]
Approved by toolic
Front-paged by toolic
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2014-07-13 11:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (249 votes), past polls