PTM Logo Version 0.5.1 Beta
Home    SVN    Downloads    Documentation    Forum    Contact
This Site is 100%
Powered by PTM

SourceForge.net Logo
Documentation
I   Index
II   GNU GPL
III   Description
IV   Installation
  UNIX
  Win32
V   Language Overview
VI   Tags
VII   Variables
VIII   Functions
IX   Modules
Documentation
View / Download this file.
-----------------------------------
PTM WIN32 INSTALLATION INSTRUCTIONS
-----------------------------------

  Because this is a Win32 release, the installation information provided here
  will be for installation in a Microsoft Windows environment running the
  Apache web server. However, much of the focus of this content is on Apache's
  httpd.conf config file and is, therefore, very similar on a Unix/Linux
  configuration as well.

  It should first be stated that the PTM Parser Application (PPA)
  may be installed/used in three ways:

    1) As a standalone parser to which all requests are directed and
       subsequent redirection and loading of files is handled automatically
       with use of the packaged .htaccess file

    2) As a built-in server-side PTM parser loaded via Apache's httpd.conf

    3) Via the command line, accepting file names from the command line
       via the predefined global @ARGV variable

  ASSUMPTIONS
    - Perl is installed to c:\perl\bin\perl.exe and is in your system's PATH
      variable list
    - *.cgi files have been associated with Perl to run as cgi-scripts
    - You have standard Perl modules such as CGI, Fcntl, and possibly DBI
      and any required DBD modules (for the PTMDB module) installed

  Please contact your system administrator if you are unsure of any of these
  assumptions.

  -----------------------------------------------------------------------
  STANDALONE PARSER - Emulated Integration - You are a User on the server
  -----------------------------------------------------------------------

  1) Copy the "ptm_test" directory to your web accessible DocumentRoot directory
     (the base directory of your web accessible file tree)

  2) Copy the PPA (ptm.cgi) and any PTM Perl module files (*.pm) from the "ptm"
     directory into your web server's /cgi-bin/ directory

  3) Open the PPA (ptm.cgi) in your text editor of choice and modify the
     $_DOCUMENT_ROOT line's value to be either the absolute physical path
     to your DocumentRoot directory (the base directory of your web accessible
     file tree) or the relative physical path from your /cgi-bin/ directory to
     your DocumentRoot directory.

     - EXAMPLE:
       - Assume /cgi-bin/ is "C:\www\cgi-bin\"
       - Assume DocumentRoot is "C:\www\html\"

       Modify the PPA's $_DOCUMENT_ROOT line to be one of the following:
       (REMEMBER -- Perl uses forward slashes '/' instead of backslashes '\')
       
         ABSOLUTE PATH:
           $_DOCUMENT_ROOT = 'C:/www/html';
           
         RELATIVE PATH (if you don't know the absolute path):
           $_DOCUMENT_ROOT = '../html';
           
     - if necessary, also change the first line of the PPA (ptm.cgi) file
       (#!c:/perl/bin/perl) to match your server's installed Perl path.

     Once modifications are complete, close the PPA (ptm.cgi) file.

  4) Copy the ".htaccess" file from the "htaccess" directory to your web
     accessible DocumentRoot directory (the base directory of your web
     accessible file tree)

     - If you are virtually hosted, or are installing PTM to only run
       within a certain directory (and its children) after placing the
       .htaccess file, open it and adjust the RewriteBase to match this
       subdirectory. For example, if you are planning on hosting PTM scripts
       only within the /scripts/ directory (http://www.site.com/scripts/)
       then your RewriteBase should be changed from "/" to "/scripts/".

  5) Use your web browser to navigate to the newly installed test directory
  
     - if on local machine: "http://127.0.0.1/ptm_test/"

     - may need to adjust for port if you're running Apache on a non-standard
       port -- e.g. "http://127.0.0.1:8080/ptm_test/"

  6) If all was successful you should now be looking at the PTM test page

  7) Write as many PTM scripts as you like and use them everywhere ;)

  8) Thats all for now!

  ----------------------------------------------------------------------------
  APACHE'S httpd.conf FILE - Full Integration - You are a System Administrator
  ----------------------------------------------------------------------------

  ASSUMPTIONS
    - You have reasonable knowledge of the Apache httpd.conf file and know
      approximately where specific lines belong
  
  1) Copy the source file directory (ptm) to "C:\perl\bin\" (C:\perl\bin\ptm\)

     - or applicable perl installation directory

     - if necessary, open the PPA script file (ptm.cgi) and change the first
       line of the file (#!c:/perl/bin/perl) to match your installed Perl
       path.

  2) Copy the test directory (ptm_test) to your httpd DocumentRoot directory

     - e.g. "C:\www\html\ptm_test\"

  3) Open the httpd.conf file
     - default path for Apache 2.0.x is usually
       C:\Program Files\Apache Group\Apache2\conf\httpd.conf

  4) Add the following 3 lines in their appropriate positions: (make
     any necessary path adjustments)
     (REMEMBER -- Apache uses forward slashes '/' instead of backslashes '\')

       ScriptAlias /ptm/ "C:/perl/bin/ptm/"
       AddType application/x-httpd-ptm .ptm
       Action application/x-httpd-ptm "/ptm/ptm.cgi"

  5) Add "index.ptm" (no quotes) to the end of your "DirectoryIndex" list

  6) Save and close the httpd.conf file

  7) Restart Apache service

  8) Use your web browser to navigate to the newly installed test directory

     - if on local machine: "http://127.0.0.1/ptm_test/"

     - may need to adjust for port if you're running Apache on a non-standard
       port -- e.g. "http://127.0.0.1:8080/ptm_test/"

  9) If all was successful you should now be looking at the PTM test page

     - if you did not not add "index.ptm" to your DirectoryIndex per
       Instruction #5, append the file name "index.ptm" to the end
       of the URL

 10) Write as many PTM scripts as you like and use them everywhere ;)

 11) Thats all for now!

  --------------------------------------------------------------------
  VIA COMMAND-LINE - No Integration (most commonly used as debug mode)
  --------------------------------------------------------------------

  1) Copy the "ptm_test" directory to your directory of choice

  2) Copy the PPA (ptm.cgi) and any PTM Perl modules (*.pm) from the "ptm"
     directory into your newly installed "ptm_test" directory

     - if necessary, open the PPA script file (ptm.cgi) and change the first
       line of the file (#!c:/perl/bin/perl) to match your installed Perl
       path.

  3) Via command line, navigate to your newly installed "ptm_test" directory

  4) Run the PPA script file (ptm.cgi)

     - PTM script file name should be added as follows:
       c:\ptm_test\> perl ptm.cgi index.ptm

  5) If all was successful you should now be looking at the PTM test page
     output code

  6) Write as many PTM scripts as you like and use them everywhere ;)

  7) Thats all for now!
Home    SVN    Downloads    Documentation    Forum    Contact