Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: FastCGI and EXEs under Windows

by fizbin (Chaplain)
on Oct 27, 2005 at 16:19 UTC ( #503398=note: print w/replies, xml ) Need Help??

in reply to FastCGI and EXEs under Windows

There should be no reason it can't - fastcgi on IIS handles compiled C .EXE files all the time - but there may be a good reason why you can't generate proper exe files. Quoting from the CGI::Fast docs:

In addition, you'll need a version of the Perl interpreter that has been linked with the FastCGI I/O library. Precompiled binaries are available for several platforms, including DEC Alpha, HP-UX and SPARC/Solaris, or you can rebuild Perl from source with patches provided in the FastCGI developer's kit. The FastCGI Perl interpreter can be used in place of your normal Perl without ill consequences.

The activestate builds I've got my hands on are not linked with the FastCGI I/O library. You'll either have to find a library that does the FastCGI stuff in perl (shouldn't be /too/ hard a standard to do all in perl) or you'll have to rebuild ActivePerl with the FastCGI stuff linked in.

Update: Never mind - you'll just need an ActiveState version of the FCGI module, and you'll have to make sure that PerlApp includes that module in the generated EXE file.
@/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/

Replies are listed 'Best First'.
Re^2: FastCGI and EXEs under Windows
by Stephen Toney (Sexton) on Oct 27, 2005 at 16:23 UTC
    Thanks. I can see CGI::Fast in my ActiveState installation. So you think that will generate the proper EXEs? That would be terrific!

      CGI::Fast is not the same as FCGI. You'll need both modules. Fortunately, FCGI is available via ppm3. (FCGI implements the low-level bits of the fastcgi protocol; CGI::Fast implements an interface to fastcgi that looks like CGI. CGI::Fast depends on FCGI and uses it internally)

      Also, what someone else said about PerlApp with regards to recovering source code. It makes recovery of source code hard - harder than pp, so hard that it can't be done without B::Deparse tricks - but doesn't make it totally impossible.

      However, I wouldn't worry about it. Just put into your license text that says that decompiling, disassembling, or reverse engineering the source code is against the license. That's really all you can do.

      Frankly, I don't understand the extreme paranoia some people develop with regards to their source code. Maybe I don't code things that are special enough - or sell to clients shady enough - to be that paranoid about it.

      @/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/
        Many thanks for the clarification! It's much appreciated.

        We certainly have a no-decompile/r.e. clause in our contracts. And we trust our clients. But we don't trust some of their other vendors who are competitors in some areas and at times have access to the server. PerlApp makes it that much harder. I don't think it's paranoia.

        Another reason for delivering an EXE is so the clients don't have to acquire and install Perl. In our market many many servers are run by people who wouldn't know how to do this or wouldn't want to.

        Also it's easier for the clients if we deliver a single EXE than make sure each client is up to date on the 20 scripts that comprise the app.

        So there are good arguments for almost anything!

        Thanks again. Stephen
      Even if they do generate the proper EXE's ... those will not "protect your source code." Get a proper license and some lawyers if you are that paranoid that your code is actually worth stealing.
        How come? The contents of the EXEs are certainly not readable. Are you saying they can be decompiled?

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2022-08-09 01:11 GMT
Find Nodes?
    Voting Booth?

    No recent polls found