You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs-cvs@perl.apache.org by ra...@apache.org on 2002/05/30 21:37:51 UTC
cvs commit: modperl-docs/src/docs/1.0/os/win32 config.pod install.pod Changes.pod config.cfg multithread.pod binaries.pod compile.pod
randyk 02/05/30 12:37:50
Modified: src/docs/1.0/os/win32 Changes.pod config.cfg multithread.pod
Added: src/docs/1.0/os/win32 config.pod install.pod
Removed: src/docs/1.0/os/win32 binaries.pod compile.pod
Log:
renamed binaries and compile to install and config, and
shuffle contents
Revision Changes Path
1.2 +5 -0 modperl-docs/src/docs/1.0/os/win32/Changes.pod
Index: Changes.pod
===================================================================
RCS file: /home/cvs/modperl-docs/src/docs/1.0/os/win32/Changes.pod,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Changes.pod 30 May 2002 05:51:43 -0000 1.1
+++ Changes.pod 30 May 2002 19:37:50 -0000 1.2
@@ -9,6 +9,11 @@
The most recent changes are listed first.
+=head1 Thu May 30 13:47:02 SGT 2002
+
+* split content into install and config
+ [Randy Kobes E<lt>randy@theoryx5.uwinnipeg.caE<gt>]
+
=head1 Wed Apr 3 16:08:49 SGT 2002
* normalize the case, change the titles slightly (we won't need underscored
1.2 +2 -2 modperl-docs/src/docs/1.0/os/win32/config.cfg
Index: config.cfg
===================================================================
RCS file: /home/cvs/modperl-docs/src/docs/1.0/os/win32/config.cfg,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- config.cfg 30 May 2002 05:51:43 -0000 1.1
+++ config.cfg 30 May 2002 19:37:50 -0000 1.2
@@ -9,8 +9,8 @@
EOB
chapters => [qw(
- binaries.pod
- compile.pod
+ install.pod
+ config.pod
multithread.pod
Changes.pod
)],
1.2 +1 -1 modperl-docs/src/docs/1.0/os/win32/multithread.pod
Index: multithread.pod
===================================================================
RCS file: /home/cvs/modperl-docs/src/docs/1.0/os/win32/multithread.pod,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- multithread.pod 30 May 2002 05:51:43 -0000 1.1
+++ multithread.pod 30 May 2002 19:37:50 -0000 1.2
@@ -22,7 +22,7 @@
multi-process/multi-thread approach using a native Win32 threads
implementation See the L<mod_perl 2
overview|docs::2.0::user::overview::overview> for more details,
-and the discussion of L<modperl-2 in Win32|docs::2.0::os::win32::modperl2>
+and the discussion of L<modperl-2 in Win32|docs::2.0::os::win32::install>
on getting modperl-2 for Win32 in particular.
=head1 Does it really matter?
1.1 modperl-docs/src/docs/1.0/os/win32/config.pod
Index: config.pod
===================================================================
=head1 NAME
Apache mod_perl-1.xx configuration instructions for Win32
=head1 Description
This document discusses how to configure mod_perl under Win32.
=head1 Configuration
Add this line to F<C:\Apache\conf\httpd.conf>:
LoadModule perl_module modules/mod_perl.so
Be sure that the path to your Perl binary (eg, F<C:\Perl\bin>)
is in your C<PATH> environment variable. If you have a C<ClearModuleList>
directive enabled in F<httpd.conf>, you may also need to add
AddModule mod_perl.c
See the descriptions of the C<ClearModuleList> and C<AddModule>
directives in the Apache documents for more details, especially
concerning the relative order of these and the C<LoadModule> directive.
=head1 Registry scripts
Using C<Apache::Registry> to speed up cgi scripts may be done as
follows. Create a directory, for example, F<C:\Apache\mod_perl>, which
will hold your scripts, such as
## printenv -- demo CGI program which just prints its environment
##
use strict;
print "Content-type: text/html\n\n";
print "<HTML><BODY><H3>Environment variables</H3><UL>";
foreach (sort keys %ENV) {
my $val = $ENV{$_};
$val =~ s|\n|\\n|g;
$val =~ s|"|\\"|g;
print "<LI>$_ = \"${val}\"</LI>\n";
}
#sleep(10);
print "</UL></BODY></HTML>";
Note that Apache takes care of using the proper line endings
when sending the I<Content-type> header. Next, insert in
F<C:\Apache\conf\httpd.conf> the following directives:
Alias /mod_perl/ "/Apache/mod_perl/"
<Location /mod_perl>
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
PerlSendHeader On
</Location>
whereby the script would be called as
http://localhost/mod_perl/name_of_script
=head1 Hello World
As you will discover, there is much to mod_perl beyond simple speed-up
of cgi scripts. Here is a simple I<Hello, World> example that
illustrates the use of mod_perl as a content handler. Create a file
F<Hello.pm> as follows:
package Apache::Hello;
use strict;
use Apache::Constants qw(OK);
sub handler {
my $r = shift;
$r->send_http_header;
$r->print("<html><body>Hello World!</body></html>\n");
return OK;
}
1;
and save it in, for example, the F<C:\Perl\site\lib\Apache\>
directory. Next put the following directives in
F<C:\Apache\conf\httpd.conf>:
PerlModule Apache::Hello
<Location /hello>
SetHandler perl-script
PerlHandler Apache::Hello
</Location>
With this, calls to
http://localhost/hello
will use C<Apache::Hello> to deliver the content.
=head1 Apache modules
The C<theorxy5> repository containing the mod_perl ppm package also
contains a number of other Apache modules, such as C<Apache::ASP>,
C<HTML::Embperl>, and C<HTML::Mason>. However, there may be ones you
find that are not available through a repository; in such cases, you
might try sending a message to the maintainer of the repository asking
if a particular package could be included.
Alternatively, you can use the C<CPAN.pm> module to fetch, build, and
install the module - see C<perldoc CPAN> for details. You will need
the B<nmake> utility for this, download it from
http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe
(it's a self extracting archive, so run it and then copy the files
into your F<Windows> directory).
=head1 See Also
The directions for
<installing mod_perl-1 on Win32|docs::1.0::os::win32::install>,
the L<mod_perl documentation|docs::index>, and http://take23.org/.
=head1 Maintainers
Maintainer is the person(s) you should contact with updates,
corrections and patches.
=over
=item *
Randy Kobes E<lt>randy@theoryx5.uwinnipeg.caE<gt>
=back
=head1 Authors
=over
=item *
Randy Kobes E<lt>randy@theoryx5.uwinnipeg.caE<gt>
=back
Only the major authors are listed above. For contributors see the
Changes file.
=cut
1.1 modperl-docs/src/docs/1.0/os/win32/install.pod
Index: install.pod
===================================================================
=head1 NAME
Apache mod_perl-1.xx installation instructions for Win32
=head1 Description
This document discusses how to install mod_perl under Win32,
both in building from sources and in installing
pre-compiled binary packages.
=head1 Building from sources
You will need
=over
=item *
patience - mod_perl is considered alpha under Win32.
=item *
MSVC++ 5.0+, Apache version 1.3-dev or higher and Perl 5.004_02 or higher.
=item *
As of version 1.24_01, mod_perl will build on Win32 ActivePerls
based on Perl-5.6.x (builds 6xx). For binary compatibility you
should use the same compiler in building mod_perl that was used
to compile your Perl binary; for ActivePerl, this means using VC++ 6.
=back
Obtain the mod_perl sources from CPAN:
http://www.cpan.org/authors/id/D/DO/DOUGM/mod_perl-1.xx.tar.gz
When unpacked, using Winzip or similar tools, a subdirectory
F<mod_perl-1.xx> will be created.
There are two ways to build mod_perl - with MS Developer Studio,
and through command-line arguments to 'perl Makefile.PL'. In both
cases Apache should previously have been built and installed - if
you are using a binary build of Apache, make sure that you obtain
a binary build that includes the Apache libraries and header files.
=head2 Building with MS Developer Studio
=over 3
=item Setup the Perl side
Run, from a DOS window in the top-level directory of the
mod_perl sources,
perl Makefile.PL
nmake
This will set up the Perl side of mod_perl for the library build.
=item Build mod_perl.so
Using MS developer studio,
select "File -> Open Workspace ...",
select "Files of type [Projects (*.dsp)]"
open mod_perl-x.xx/src/modules/win32/mod_perl.dsp
=item Settings
select "Tools -> Options -> [Directories]"
select "Show directories for: [Include files]", and add
C:\Apache\include
. (should expand to C:\...\mod_perl-x.xx\src\modules\perl)
C:\Perl\lib\Core
select "Project -> Add to Project -> Files", adding:
perl.lib (or perl56.lib) (e.g. C:\perl\lib\Core\perl.lib)
ApacheCore.lib (e.g. C:\Apache\ApacheCore.lib)
select "Build -> Set Active Configuration -> [mod_perl - Win32 Release]"
select "Build -> Build mod_perl.so"
You may see some harmless warnings, which can be reduced (along with
the size of the DLL), by setting:
"Project -> Settings -> [C/C++] -> Category: [Code Generation] ->
Use runtime library: [Multithreaded DLL]
=item Testing
Once mod_perl.so is built you may test mod_perl with:
nmake test
after which, assuming the tests are OK,
nmake install
will install the Perl side of mod_perl. The mod_perl.so file
built under F<mod_perl-1.xx/src/modules/win32/Release> should
be copied to your Apache modules directory (eg, F<C:\Apache\modules>).
=back
=head2 Building with Makefile.PL arguments
Generating the Makefile as, for example,
perl Makefile.PL APACHE_SRC=\Apache INSTALL_DLL=\Apache\modules
will build mod_perl (including mod_perl.so) entirely from
the command line. The arguments accepted include
=over 3
=item APACHE_SRC
This can be one of two values: either the path to the Apache build
directory (eg, F<..\apache_1.3.xx>), or to the installed Apache location
(eg, F<\Apache>). This is used to set the locations of ApacheCore.lib
and the Apache header files.
=item INSTALL_DLL
This gives the location of where to install mod_perl.so
(eg, F<\Apache\modules>). No default is assumed - if this argument
is not given, mod_perl.so must be copied manually.
=item DEBUG
If true (DEBUG=1), a Debug version will be built (this assumes
that a Debug Apache has been built). If false, or not given,
a Release version will be built.
=item EAPI
If true (EAPI=1), EAPI (Extended API) will be defined when
compiling. This is useful when building mod_perl against mod_ssl
patched Apache sources. If false, or not given, EAPI will
not be defined.
=back
After this, running
nmake
nmake test
nmake install
will complete the installation.
This latter method of building mod_perl will also install the
Apache and mod_perl header files, which can then be accessed
through the Apache::src module.
=head1 Binaries
There are two major types of binary packages
available for Win32 mod_perl - all-in-one Perl/Apache/mod_perl
binaries, and mod_perl ppm (Perl Package Manager) packages.
=head2 All-in-one packages
There are at least two binary packages for Win32 that contain the
necessary Perl and Apache binaries:
http://www.indigostar.com/
ftp://theoryx5.uwinnipeg.ca/pub/other/perl-win32-bin.exe
As well as including a number of non-core modules, both of these
packages contain mod_perl. See the documentation on the web sites and
that included with the packages for installation instructions. Both of
these also include an ActiveState-compatible C<ppm> (Perl Package
Manager) utility for adding and upgrading modules.
For the adventuresome who want a taste of things to come, a
mod_perl-2.0/Apache-2.0 binary distribution based on cvs
sources is available - see the discussion of
L<modperl-2 on Win32|docs::2.0::os::win32::install>
for details. Be aware though that, being a pre-release version,
bugs are most likely present.
=head2 PPM Packages
For users of ActivePerl, available from
http://www.activestate.com/
there are also C<PPM> mod_perl packages available. For this, if you
don't already have it, get and install the latest Win32 Apache binary
from
http://httpd.apache.org/
Both ActivePerl and Apache binaries are available as C<MSI> files for
use by the Microsoft Installer - as discussed on the ActiveState site,
users of Windows 95 and 98 may need to obtain this. In installing
these packages, you may find it convenient when transcribing any
Unix-oriented documentation to choose installation directories that do
not have spaces in their names (eg, F<C:\Perl> and F<C:\Apache>).
After installing Perl and Apache, you can then install mod_perl via
the PPM utility. ActiveState does not maintain mod_perl in the ppm
repository, so you must get it from a different location other than
ActiveState's site. One way is simply as (broken over two lines for
readability)
C:\> ppm install
http://theoryx5.uwinnipeg.ca/ppmpackages/mod_perl.ppd
Another way, which will be useful if you plan on installing additional
Apache modules, is to set the repository within the C<ppm> shell
utility as (the C<set repository ...> command has been broken over two
lines for readability):
C:\> ppm
PPM> set repository theoryx5
http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer
PPM> install mod_perl
PPM> set save
PPM> quit
C:\>
The C<set save> command saves the C<theoryx5> repository to your PPM
configuration file, so that future PPM sessions will search this
repository, as well as ActiveState's, for requested packages.
The mod_perl PPM package also includes the necessary Apache DLL
C<mod_perl.so>; a post-installation script should be run which will
offer to copy this file to your Apache modules directory (eg,
I<C:\Apache\modules>).
Note that the mod_perl package available from this site will always
use the latest mod_perl sources compiled against the latest official
Apache release; depending on changes made in Apache, you may or may
not be able to use an earlier Apache binary. However, in the Apache
Win32 world it is particularly a good idea to use the latest version,
for bug and security fixes.
=head1 See Also
The directions for
<configuring mod_perl-1 on Win32|docs::1.0::os::win32::config>,
the L<mod_perl documentation|docs::index>, and http://take23.org/.
=head1 Maintainers
Maintainer is the person(s) you should contact with updates,
corrections and patches.
=over
=item *
Randy Kobes E<lt>randy@theoryx5.uwinnipeg.caE<gt>
=back
=head1 Authors
=over
=item *
Randy Kobes E<lt>randy@theoryx5.uwinnipeg.caE<gt>
=back
Only the major authors are listed above. For contributors see the
Changes file.
=cut
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-cvs-help@perl.apache.org