Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks,
I have been scouring the web in search of an answer, and now I come to your perly gates.
I have a perl datbase script that takes input from a html form, manipulates a text file and spits the results out to another html page on demand. All's working fine on the server.
I have been asked to demonstrate the database to my peers. But there are two problems:
1. I will not have web access during the presentation.
2. I am restricted to laptops running NT. I have tried to install indigoperl, but the apache service will not start (restricted?). Activeperl will not install either.
Give to me straight: Is it possible to create a folder tree containing the basic perl elements to run such a script? I would like to put this onto a cd, with database, so that my colleagues can run it on their (also restricted) laptops without further configuration.
We're talking the barest essentials. No messing with the registry, etc.
Hope someone can shower me with their abundant knowledge.
Cheers,
Ja
Re: Database script - run from CD without installing?
by fglock (Vicar) on Mar 07, 2005 at 20:22 UTC
|
HTTP::Daemon works fine with NT. And you can use PAR to package your script into an .exe file.
update: I've used HTTP::Daemon here (warning: some ugly code written 5 years ago). It runs fine in NT with PAR.
| [reply] |
Re: Database script - run from CD without installing?
by Zaxo (Archbishop) on Mar 07, 2005 at 20:25 UTC
|
Are you allowed to write files on these miserable appliances? Do they have any kind of httpd?
Since you can't install any of the missing pieces you need (They expect you to demo a perl app without perl?!), perhaps your best bet is do an end-around and boot linux from the cd. Be sure not to write to NT filesystems, AFAIK that is destructive. You could use USB "keychain" storage for your writable file system.
It is also possible to use PAR to produce an executable with perl and all your modules and your script included, but you need a working perl installation on windows to do that. And it still doesn't solve the lack of httpd.
| [reply] |
|
Be sure not to write to NT filesystems, AFAIK that is destructive
With captive-ntfs, it is not destructive in my
experience. The more difficult problem is finding
a convenient way, after booting, to rapidly get
things configured properly so that Apache will
serve out the thing (on localhost presumably),
which probably means copying a replacement
httpd.conf or whatnot into place (i.e., into
the /etc subtree on the RAM-based filesystem)
and (re)starting Apache.
But yes, it should be possible to do this with Knoppix.
"In adjectives, with the addition of inflectional endings, a changeable long vowel (Qamets or Tsere) in an open, propretonic syllable will reduce to Vocal Shewa. This type of change occurs when the open, pretonic syllable of the masculine singular adjective becomes propretonic with the addition of inflectional endings."
— Pratico & Van Pelt, BBHG, p68
| [reply] |
Re: Database script - run from CD without installing?
by FitTrend (Pilgrim) on Mar 07, 2005 at 20:18 UTC
|
You could compile your script as an independent executable using perl2exe or perlapp (activestate). A search on google could yield other compile packages as well. This way you can create a single EXE with all the necessary modules without installing activestate perl. Then you can place the compiled exe and the database on a CD for distribution.
Hope this helps
| [reply] |
Re: Database script - run from CD without installing?
by chanio (Priest) on Mar 08, 2005 at 01:41 UTC
|
You could download this working Apache with Perl, PHP, MySQL all working from the start (I use it on Windows) ! ApacheFriends . Just install it on one drive's root. Then change the Apache config to use a predefined C:\ folder. Then record all your apps and the complete Apache drive into your CD. When you do the demo, first create the C: predefined folder, and load it with your updatable data, then put your CD and start Apache. You don't need to mention any CD drive. So, it should work fine! Notice that the install doc that I am pointing mentions also installing it all in a Memory stick. Just if you have one, by chance :).
| [reply] |
|
| [reply] |
|
Certainly, but it reminds me that I am still having trouble with managing my Apache 2 server with LINUX.
I am not longer caring about security at all! I just want it to work as expected and then I might be looking at the security risks. But my local LINUX Apache server is a mess...
That is the reason that I am not able to even suggest it to others. I am feeling very paranoid at these subjects :) .
Besides the security reasons, the Apachefriends solution works as a charm! And that was the subject of the question: to use it on Windows.
Nevertheless, I love Knoppix and all its magic, (may be an uncorresponded love, who knows :) )
UPDATED
Now there is the LAMPIX option! :) . I'll soon be giving it a try...
| [reply] |
Re: Database script - run from CD without installing?
by inman (Curate) on Mar 08, 2005 at 09:18 UTC
|
Assuming that you are able to log on as an administrator then you should be able to install and run both Apache and the ActiveState Perl distribution. If you are restricted then the chances are that your user account is not part of the local administrators group. Have a word with the IT function in your company, explain the situation and ask them to try and do make you a local admin account.
The slightly more in depth approach is to install Apache and a Perl distro on a server that you can control and then copy the resulting directory structures. This will work on the basis that both applications were initially targeted at the Unix community and as such make minimal use of the windows registry. Just make sure that the location to which you copy the directory structure is the same as on the server. e.g. The location of Perl should be C:\Perl on both computers. | [reply] |
Re: Database script - run from CD without installing?
by Anonymous Monk on Mar 08, 2005 at 17:06 UTC
|
I'm very grateful for all the advice. Thank you.
Whilst looking into your suggestions, I stumbled again on microweb (http://www.indigostar.com/microweb.htm) and went in for a closer look. It works beautifully!, and very easy to set up. Runs off a CD...
Aaaaaand relax.
License is a bit steep, but it saves me a lot of precious time, so I'll go with it.
Nice one,
Ja
| [reply] |
|
|