Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: How to run a linux/perl-based website on a CD for Windows

by Polyglot (Chaplain)
on Jul 10, 2012 at 00:46 UTC ( [id://980795]=note: print w/replies, xml ) Need Help??


in reply to Re: How to run a linux/perl-based website on a CD for Windows
in thread How to run a linux/perl-based website on a CD for Windows

I have looked at PAR::Packer, and even managed to compile my script with it, which runs fine from the command prompt, but I have been unable to see how this would still be usable via a browser. Thoughts?

The browser tried to show the binary code! (And of course, the HTML output does little good at the command prompt.)

Blessings,

~Polyglot~

  • Comment on Re^2: How to run a linux/perl-based website on a CD for Windows

Replies are listed 'Best First'.
Re^3: How to run a linux/perl-based website on a CD for Windows
by ww (Archbishop) on Jul 10, 2012 at 01:56 UTC
    Whoa, there, Polyglot; you do understand how HTML works and that CGI executables have to be executed by the server?

    If your attempt merely pointed the browser at the compiled script, it's not going to work as you appear to expect.

      To be honest, I've never programmed a CGI script in anything but Perl. I've always known, however, even from the beginning, that there were other ways to do it. I guess some use C or python, or ASP, or whatever. I have no experience with any of the alternatives, and have no idea whether any of them functions from a compiled state or not. So, yes, I suppose I am ignorant in this area. Programming is my hobby, not my bread and butter. This is why I appreciate perlmonks so much. It is wonderful to be able to share with other programmers.

      I know that the Perl script is compilable, but it still must be interactive, and needs to be able to access the MySQL database. I don't see how mysql would integrate with a compiled Perl program based on user inputs, nor how I can convert the web form into something that would be independent from a browser.

      Another puzzle, for me, since I've never done this before, is whether or not the compiled program would accept the "GET" or "POST" style tokens as command line arguments, or how I would pass the variables into it. Perhaps it's best that I just stick with Server2Go. I don't know any other way, and maybe there isn't really any other option. What do people do with compiled Perl/CGI programs anyway?

      Blessings,

      ~Polyglot~

Re^3: How to run a linux/perl-based website on a CD for Windows
by flexvault (Monsignor) on Jul 10, 2012 at 12:19 UTC

    Polyglot,

      The browser tried to show the binary code!

    You already have some good answers, but to give you a little idea of what is going on when the browser gives the binary instead of the results of the binary. Most browsers are clients and expect to 'talk' to a server. This is really important when using cgi. What you need to do is install a small server on the CD that will execute your 'cgi-bin' scripts. I have never used it, but I believe CPAN has a Perl server that you might be able to include.

    Now if you really are going to charge for this CD, then my next comments are academic.

    You are already hosting the application, so the only reason the person from another country would want the CD is to get to your Perl scripts. So my question to the 'tracker' is "Why don't you put a link on your site to my site?" If that isn't acceptable, then just ignore the request.

    In the past, I used to offer 'free demos' that could be downloaded by anyone. But when you find your demo being sold on eBay for $5.00 as a real system, you quickly change the policy. Your name will be on it, so many will expect you to support it.

    Just a heads up!

    Good Luck!

    "Well done is better than well said." - Benjamin Franklin

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://980795]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-26 01:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found