in reply to Re: exe on local machine
in thread exe on local machine

Ok, first off I can't set up a web server on every person's machine so that's not gonna work. And the reason I need to get this cgi script off of my host because it's simply comsuming to much bandwidth and besides it takes a long time to load because of all the data it must transfer.

Basically you have a html page with a form on it. FORM name=generatemap action=../cgi-bin/mapeditor/upload.cgi method=post target=map encType=multipart/form-data and a few fields in the form INPUT type=radio value=open name=ac etc... etc... exactly what type of input fields doesn't matter
the user clicks on the submit button
then, the data is submitted to the cgi (upload.cgi) like I mentioned before.
upload cgi then generates an html page that the viewer sees in their browser (of course)

Now I have converted the perl script into a c++ exe.... The problem is if I put the html page and the exe on my local machine instead, then when I click the submit button it asks to download the exe instead of running it.

And so that's what I need a solution to.
As for what I used to convert the perl to an exe, well that don't matter much. I can just as easily recode the program in c++. However, I did try this program: http://www.indigostar.com/perl2exe.htm

Replies are listed 'Best First'.
Re: Re: Re: exe on local machine
by bikeNomad (Priest) on Jul 05, 2001 at 20:05 UTC
    Why can't you set up a local web server? It doesn't have to accept connections from other machines. Many products do it... we're only talking about a single Perl program, not something like Apache. You may want to use a port other than port 80, but you can do this with an 8K program and provide an entire web environment, into which you can add other CGI and/or static pages.
(jeffa) 3Re: exe on local machine
by jeffa (Bishop) on Jul 05, 2001 at 21:45 UTC
    If you want a stand alone application - write a stand alone application, Tk would provide an adequate UI. Get ready to waste lots of time installing it and keeping it upgraded, however. A better route would be a networked application, where a central server does the majority of the computing and the clients provide the UI.

    If you want a networked application, you will have to do the socket connections yourself (be sure and take a gander at CPAN first - lots of wheels ready to roll). You will need to write a server program that runs on a central box in your network, and you will need to write the client program to talk to the server on a designated port. Then you install the clients as needed on the other boxes in your network (of course, now you are back to having to maintain upgrades).

    But why do that when it has already been written. It's called HTTPD!

    So, what i am getting at is that you are trying to solve the problem with a purple banana - wrong solution! What you need is to beef up the server - either with hardware or by switching from plain-jane CGI to mod_perl.

    The former is easier, but the later is cheaper (free!) and worth the trouble in the long run.

    Jeff

    R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
    L-L--L-L--L-L--L-L--L-L--L-L--L-L--