Re: mod_perl on win32

2009-08-25 Thread William A. Rowe, Jr.
Michiel Beijen wrote:
> 
> I'd like to know if it's possible to build mod_perl on Win32; I'd like
> to use mod_perl with StrawberryPerl. It seems to be that the only way
> that could be done is to compile Apache also with MinGW, and that's not
> possible because of limited support for Windows Shared Memory in MinGW.

There are various flaws in the build, report them to d...@httpd or collect
them in bugzilla reports, and mind the existing reports which might already
solve your problem.

Since there is no MinGW port maintainer, this often falls apart, sorry there
is nothing we can do if a platform's community does not participate with or
engage the developers with patches.

> Also if you'd try to compile mod_perl it will try to run "./configure"
> on the Apache sources but that will fail on Win32 because 1. there is no
> Configure in the win32 Apache sources and 2. Windows will try to execute
> "." which is not exactly an executable file...
> 
> Does anyone have pointers or tips?

You don't use the -win32-src package because that package is for building
on the Microsoft Windows platform.  If you want to build for a faux-unix
platform you would obtain the usual tarball.


RE: mod_perl on win32

2009-08-25 Thread Steve Hay
William A. Rowe, Jr. wrote on 2009-08-25:
> Michiel Beijen wrote:
>>  I'd like to know if it's possible to build mod_perl on Win32; I'd like
>> to use mod_perl with StrawberryPerl. It seems to be that the only way
>> that could be done is to compile Apache also with MinGW, and that's not
>> possible because of limited support for Windows Shared Memory in
> MinGW.
> 
> There are various flaws in the build, report them to d...@httpd or
> collect them in bugzilla reports, and mind the existing reports which
> might already solve your problem.

The other option, if you didn't specifically want to use StrawberryPerl, is to 
build perl, apache & mod_perl with VC++ 2008 Express.


Re: mod_perl on win32

2009-08-25 Thread Jean-Damien Durand

Michiel Beijen a écrit :

I'd like to know if it's possible to build mod_perl on Win32; I'd like
to use mod_perl with StrawberryPerl. It seems to be that the only way
that could be done is to compile Apache also with MinGW, and that's not
possible because of limited support for Windows Shared Memory in MinGW
  
Here is how I installed StrawberryPerl + mod_perl + apache2 on Windows 
(tested onVista):


1. Apache
Go to http://httpd.apache.org/download.cgi
Click on "/Win32 Binary including OpenSSL 0.9.8i (MSI Installer) /"
Some recommend to install it in a directory without space, although I 
did not do that and it still work.


2. Perl
Go to http://strawberryperl.com/ and install the latest kit

3.  I then use the script send in attachement to install all modules I 
need, e.g. perl install_modules.pl


At the top of the script you will see how to get mod_perl2 and various 
other stuff I need for my project. Just the lines for the modules you do 
not need.


HTH,

Cheers, JD.

#!/usr/bin/perl

#
## This script, intended to be run by an installer on Windows
## will hopefully verify packages needed by Freecity are
## installed - and will attempt to install them if needed
#
## (c) 2008 by Jean-Damien Durand 
#
use 5.10.0;
use strict;
use diagnostics;
use Config;
use File::Spec;
use CPAN;

my %required_modules = (
'mod_perl2' => 
'http://cpan.uwinnipeg.ca/PPMPackages/10xx/mod_perl.ppd',
'Apache2::Request'  => 
'http://cpan.uwinnipeg.ca/PPMPackages/10xx/libapreq2.ppd',
'GD'=> 'http://www.bribes.org/perl/ppm/GD.ppd',
'GD::Text'  => 'http://www.bribes.org/perl/ppm/GDTextUtil.ppd',
'Template'  => 
'http://cpan.uwinnipeg.ca/PPMPackages/10xx/Template-Toolkit.ppd',
'Config::General'   => 
'http://cpan.uwinnipeg.ca/PPMPackages/10xx/Config-General.ppd',
'Apache::DBI'   => 'http://trouchelle.com/ppm10/Apache-DBI.ppd',
'CGI::Simple'   => 'http://trouchelle.com/ppm10/CGI-Simple.ppd',
'HTML::Tree'=> 'http://trouchelle.com/ppm10/HTML-Tree.ppd',
'File::Type'=> 'http://trouchelle.com/ppm10/File-Type.ppd',
'Image::Size'   => 'http://trouchelle.com/ppm10/Image-Size.ppd',
'Net::Telnet'   => 'http://trouchelle.com/ppm10/Net-Telnet.ppd',
'I18N::Charset' => 'http://trouchelle.com/ppm10/I18N-Charset.ppd',
'XML::RSS'  => 'http://trouchelle.com/ppm10/XML-RSS.ppd',
'Win32::Process'=> 'http://trouchelle.com/ppm10/Win32-Process.ppd',
'Win32::DriveInfo'  => 'http://trouchelle.com/ppm10/Win32-DriveInfo.ppd',
'List::MoreUtils'   => 
'http://cpan.uwinnipeg.ca/PPMPackages/10xx/List-MoreUtils.ppd',
'Win32::FileOp' => 'http://trouchelle.com/ppm10/Win32-FileOp.ppd',
'Win32::Service'=> 'http://trouchelle.com/ppm10/Win32-Service.ppd',
'Win32::OLE'=> 'http://www.bribes.org/perl/ppm/Win32-OLE.ppd',
'Text::Chomp'   => 'http://trouchelle.com/ppm10/Text-Chomp.ppd',
'Number::Format'=> 'http://trouchelle.com/ppm10/Number-Format.ppd',
'Object::Multitype' => 'http://trouchelle.com/ppm10/Object-MultiType.ppd',
'Win32::IPHelper'   => 'http://trouchelle.com/ppm10/Win32-IPHelper.ppd',
'NetAddr::IP'   => 'http://trouchelle.com/ppm10/NetAddr-IP.ppd'
);
   
print "\n";
print "\n";
print "Freecity va verifier et installer si necessaire des \n";
print "modules perl necessaires a son fonctionnement.  \n";
print "\n";
print "\n";
print "   \n";
print "\n";

my $dummy;
read(STDIN, $dummy, 1);

#  -
## Get install directory of perl
#  -
my $installbin = $Config{installbin} || die "No installbin in perl config !?\n";
my $installsitelib = $Config{installsitelib} || die "No installsitelib in perl 
config !?\n";

#  ---
## This is for Time::ParseDate
#  ---
$ENV{TZ}='PST8PDT';

#  --
## Check required modules
#  --
my $module;
my $cpanmod;
my $ppm = File::Spec->catfile($installbin, 'ppm.bat');
foreach $module (sort keys %required_modules) {
my $found = 0;
#
## For GD we force the installation
#
if ($module ne 'GD') {
foreach $cpanmod (CPAN::Shell->expand("Module", $module)){
++$found;
if ($cpanmod->inst_file) {
print $cpanmod->id, " is already installed\n";
next;
}
install_module($module);
last;
}
} else {
print "Forcing $module installation\n";
}
if ($found == 0) {
install_module($module);
}
}

#
## Special hook for Params::Validate that is since recently... buggy - move to 
a perl only solution
#
my $validatedll = File::Spec->catfi

Re: mod_perl on win32

2009-08-25 Thread Jean-Damien Durand

Jean-Damien Durand a écrit :
Here is how I installed StrawberryPerl + mod_perl + apache2 on Windows 
(tested onVista):


Ah yes of course you will need to add lines like

LoadFile "C:\strawberry\perl\bin\perl510.dll"
LoadModule perl_module modules/mod_perl.so
LoadFile "C:\Program Files\Apache Software 
Foundation\Apache2.2\bin\libapreq2.dll"

LoadModule apreq_module modules/mod_apreq2.so

in your httpd.conf (change paths if needed)

Cheers, JD.




Re: mod_perl on win32

2009-08-26 Thread Foo JH

I'd suggest to get your mp2 up with the following stack:
Apache22 Windows binary
ActivePerl binary
precompiled mod_perl2 + libapreq2 from the repo

Michiel Beijen wrote:

Hi all,

I'd like to know if it's possible to build mod_perl on Win32; I'd like
to use mod_perl with StrawberryPerl. It seems to be that the only way
that could be done is to compile Apache also with MinGW, and that's not
possible because of limited support for Windows Shared Memory in MinGW.

Also if you'd try to compile mod_perl it will try to run "./configure"
on the Apache sources but that will fail on Win32 because 1. there is no
Configure in the win32 Apache sources and 2. Windows will try to execute
"." which is not exactly an executable file...

Does anyone have pointers or tips?

Thanks in advance,
  




Re: mod_perl on win32

2009-08-26 Thread Michiel Beijen

Foo JH wrote:

I'd suggest to get your mp2 up with the following stack:
Apache22 Windows binary
ActivePerl binary
precompiled mod_perl2 + libapreq2 from the repo

That would be the easy way, right ;-)

The thing is, my project uses a software bundle which includes Apache 
and Strawberry for the Windows installer. Due to licensing requirements 
you could not bundle ActiveState in an open source product; therefore 
the Strawberry requirement. It is just too bad that ApachePerl is not 
alive anymore. Any tips for compiling mod_perl with Strawberry are still 
welcome!


Regards,
Michiel


Re: mod_perl on win32

2009-08-26 Thread Randy Kobes
On Wed, Aug 26, 2009 at 12:40 PM, Michiel Beijen wrote:
> Foo JH wrote:
>>
>> I'd suggest to get your mp2 up with the following stack:
>> Apache22 Windows binary
>> ActivePerl binary
>> precompiled mod_perl2 + libapreq2 from the repo
>
> That would be the easy way, right ;-)
>
> The thing is, my project uses a software bundle which includes Apache and
> Strawberry for the Windows installer. Due to licensing requirements you
> could not bundle ActiveState in an open source product; therefore the
> Strawberry requirement. It is just too bad that ApachePerl is not alive
> anymore. Any tips for compiling mod_perl with Strawberry are still welcome!
>
> Regards,
> Michiel

Recent Strawberry distributions contain the ppm utility, which can be
used to install ppm packages. I'm not sure if the relevant ppm
package:
http://perl.apache.org/docs/2.0/os/win32/install.html#PPM_Packages
for mod_perl and libapreq2 would be compatible, but it would probably
be worth trying.

-- 
best regards,
Randy