Loading ...
Sorry, an error occurred while loading the content.
 

RE: [PBML] Re: Help getting started...

Expand Messages
  • Charles K. Clarkson
    ... The Windows HTTP server (IIS) is difficult to install on plain XP. You can install Apache to run CGI scripts locally through a web page. This is what I
    Message 1 of 7 , Jun 26, 2005
      coolredfiero <> wrote:

      : I am running windows xp.

      The Windows HTTP server (IIS) is difficult to install on plain
      XP. You can install Apache to run CGI scripts locally through a
      web page.

      This is what I have set up on my own Windows XP box. If you
      avoid poor programming practices, many scripts will transfer from
      XP to linux without a problem.

      Setting up Apache takes some work. You need to read the Apache
      docs to configure the server. You'll probably want the older
      version of Apache. It is doubtful your web server is using a
      version above 2.0. Look for versions starting with "1.33".

      You can find the Apache HTTP server at this address. As with
      almost anything made for linux you'll need to read a bit to find
      the correct file to download. Once you have Apache install it as
      a service on XP. My installation allows me to run scripts from
      "http://localhost/".

      <http://httpd.apache.org/download.cgi>


      : perl.exe opens a window and runs the scripts and closes the
      : window so fast that I can't see what happened.

      It sounds like you are running the script by double-clicking
      on the script file. Unless your script tells Windows to stay open
      after it is run, it will close immediately. That's the default
      behavior for windows.

      You can get a window to open by asking for input at the end of
      the script. The third to last line (<STDIN>) keeps the window open
      as Windows waits for input. Press enter to close the window.


      #!/usr/bin/perl

      use strict;
      use warnings;
      use CGI '-noxhtml';
      my $q = new CGI;

      print
      $q->header(),
      $q->start_html(),
      $q->h1( 'Howdy' ),
      $q->end_html();

      <STDIN>;

      __END__

      Of course this doesn't work well for CGI scripts.

      Perl Express probably has an option to run scripts from a menu
      item. A window will open and close and the output will be
      captured. That's how the editor (Ultraedit) I use works. Look for
      an option to run DOS commands.


      : I do have some experience with some other languages.

      Good. Larry, the guy who started Perl stole a lot of features
      from other languages. You should read an introduction to Perl CGI
      programming. Ovid has written a good introduction to CGI scripts
      at this address.

      <http://users.easystreet.com/ovid/cgi_course/>


      : I am learning perl because most of the scripts on my website
      : are in perl and I just purchased a script and the writer
      : did not keep his promise to set it up.

      If you can get into the mind of the author, you can probably
      set up the script with only a little bit of experience.


      : How much does Linux cost?

      Nothing. It is free.


      HTH,

      Charles K. Clarkson
      --
      Mobile Homes Specialist
      254 968-8328
    Your message has been successfully submitted and would be delivered to recipients shortly.