Hinnavaatlus
:: Foorum
:: Uudised
:: Ärifoorumid
:: HV F1 ennustusvõistlus
:: Pangalink
:: Telekavad
:: HV toote otsing
|
|
autor |
|
sakunne
HV veteran

liitunud: 15.12.2004
|
22.01.2013 14:37:19
Strawberry Perl & Apache 2.2 |
|
|
WinXP
Apache 2.2
Strawberry Perl 5.16.2.1
Ei saa mod_perl'i käima kuidagi, proovisin:
http://www.aptest.com/atm2/documentation/latest/readme/apache-windows.html
setup_spmp.pl fail, jooksutamisel kobiseb midagi 67, 70, 71 rea kohta: 'Use of uninitialised value $apache2 in in concatenation <.> ...
Muidu töötab ja väidab, et installib mod_perl.so, mod apreg2.so ja libapreg.dll, tegelt ei installi miskit
Spoiler 
#!c:/strawberry/perl/bin/perl.exe
#
# setup_spmp.pl - setup strawberry perl mod_perl
#
# This script ASSUMES that strawberry perl is installed in c:/strawberry
# (the default). It looks for apache in the usual places, but you can
# override the location interactively
use strict ;
use warnings;
use ExtUtils::MakeMaker;
use Getopt::Std ;
use LWP::Simple;
use File::Copy;
use Config;
require Win32;
require File::Spec;
die "This only works for Win32" unless $^O =~ /Win32/i;
my $mploc = "http://downloads.aptest.com/sperl/mp/5.12_x86" ;
# archives to install using pip
my @pars = qw( libapreq2-2.12-MSWin32-x86-multi-thread-5.12.par
mod_perl-2.0.4-MSWin32-x86-multi-thread-5.12.par );
# pieces to put in the modules directory
my @mods = qw( mod_perl.so mod_apreq2.so );
# dlls to put in the apache bin directory
my @dlls = qw( libapreq2.dll ) ;
use vars qw($opt_n) ;
my $options = "nv" ;
getopts($options) || usage() ;
# where is Apache?
my $modDir = "" ;
my $binDir = "" ;
my ($apache2, $apache, $apache22);
my @drives = drives();
# find a possible Apache2 directory
APACHE2: {
for my $drive (@drives) {
for my $p ('Apache2', 'Apache22', 'Program Files/Apache2',
'Program Files/Apache Group/Apache2',
'Program Files/Apache Group/Apache2.2',
'Program Files/Apache Software Foundation/Apache2.2') {
my $candidate = File::Spec->catpath($drive, $p);
if (-d $candidate) {
$apache2 = $candidate;
last APACHE2;
}
}
}
}
if ($apache2) {
print "Found Apache in $apache2\n";
$apache2 =~ s/\\/\//g;
}
my $ans = prompt(qq{Install mod_perl for "$apache2"?}, 'yes');
exit 0 if ($ans !~ /^y/i) ;
$modDir = $apache2."/modules";
$binDir = $apache2."/bin";
# okay - we know where to put the mod_perl files
foreach (@pars) {
my $cmd = "pip $mploc/$_" ;
print "Installing $_\n";
qx($cmd) unless ($opt_n);
if ($?) {
print "There was an error: $?\n";
exit 1;
}
}
# download the apache modules
foreach (@mods) {
my $cmd = "lwp-download $mploc/$_ $_";
print "$cmd\nInstalling $_ into $modDir\n";
qx($cmd) unless ($opt_n);
if ($?) {
print "There was an error: $?\n";
exit 1;
}
copy "$_", "$modDir";
unlink "$_";
}
# download the DLLs
foreach (@dlls) {
my $cmd = "lwp-download $mploc/$_ $_";
print "Installing $_ into $binDir\n";
qx($cmd) unless ($opt_n);
if ($?) {
print "There was an error: $?\n";
exit 1;
}
copy "$_",$binDir;
unlink "$_";
}
sub usage {
print "usage: setup_spmp.pl [-n -v]\n";
exit 1;
}
sub fix_path {
my $file = shift;
$file = Win32::GetShortPathName($file);
$file =~ s!\\!/!g;
return $file;
}
sub drives {
my @drives = ();
eval{require Win32API::File;};
return map {"$_:\\"} ('C' .. 'Z') if $@;
my @r = Win32API::File::getLogicalDrives();
return unless @r > 0;
for (@r) {
my $t = Win32API::File::GetDriveType($_);
push @drives, $_ if ($t == 3 or $t == 4);
}
return @drives > 0 ? @drives : undef;
} |
Jooksutasin ka:
Spoiler 
pip http://strawberryperl.com/package/kmx/mod_perl/5.10_x86/mod_perl-2.0.4-MSWin32-x86-multi-thread-5.10.par
pip http://strawberryperl.com/package/kmx/mod_perl/5.10_x86/libapreq2-2.12-MSWin32-x86-multi-thread-5.10.par |
Mis edasi
EDIT:
Siukest asja ka pole:
/conf/extra/httpd-perl.conf
Panin käsitsi mod_perl.so, mod apreg2.so ja libapreg.dll,
ei miskit
|
|
Kommentaarid: 77 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
69 |
|
tagasi üles |
|
 |
Fukiku
Kreisi kasutaja

liitunud: 06.11.2003
|
22.01.2013 15:36:24
|
|
|
Tõenäoliselt ei leia skript sul Apache kataloogi üles kõvakettalt. Uuri, kas õnnestub skriptile see käsitsi ette anda.
_________________ Foxic is just a simple fox
Enne kui sa küsid oma küsimuse - küsi seda vannipardilt! Rangelt soovitatav enne programmeerimise alafoorumisse uue teema tegemist. |
|
Kommentaarid: 2 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
2 |
|
tagasi üles |
|
 |
sakunne
HV veteran

liitunud: 15.12.2004
|
23.01.2013 20:16:51
|
|
|
Krt, ei tunne Perl'i, proovisin C:\ ja C:\Apache2.2
Script ise esimeses postis spoileris
Veateade selline:
Spoiler 
|
|
Kommentaarid: 77 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
69 |
|
tagasi üles |
|
 |
infidel
HV kasutaja

liitunud: 31.01.2004
|
23.01.2013 21:09:18
|
|
|
Seal ta näitabki, et $apache2 ei saa väärtust, st ta ei leia seda üles.
perl:
|
# find a possible Apache2 directory APACHE2: { for my $drive (@drives) { for my $p ('Apache2', 'Apache22', 'Program Files/Apache2', 'Program Files/Apache Group/Apache2', 'Program Files/Apache Group/Apache2.2', 'Program Files/Apache Software Foundation/Apache2.2') { my $candidate = File::Spec->catpath($drive, $p); if (-d $candidate) { $apache2 = $candidate; last APACHE2; } } } }
|
Siin on toodud kausta nimed ja asukohad kust skript otsib. \Apache2.2 nende hulka ei kuulu, sellenimeline on Program Files all, aga juurkataloogis mitte. Ehk punkti lisamine (et kood oleks nagu järgnev) aitab.
perl:
|
# find a possible Apache2 directory APACHE2: { for my $drive (@drives) { for my $p ('Apache2', 'Apache2.2', 'Program Files/Apache2', 'Program Files/Apache Group/Apache2', 'Program Files/Apache Group/Apache2.2', 'Program Files/Apache Software Foundation/Apache2.2') { my $candidate = File::Spec->catpath($drive, $p); if (-d $candidate) { $apache2 = $candidate; last APACHE2; } } } }
|
|
|
Kommentaarid: 36 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
35 |
|
tagasi üles |
|
 |
sakunne
HV veteran

liitunud: 15.12.2004
|
24.01.2013 17:22:00
|
|
|
infidel, sellega on siis asi korras, moodulid mod_perl, apreq2 ja dll on paigas,
Test configuration ütleb:
Syntax error: Cannot load mod_perl.so module. The specifiead module could not be found.
Ometi os ta seal olemas.
Direktiiv ise on selline:
LoadModule perl_module modules/mod_perl.so
Mis siin viga on ???
Comm: pole veeel kohanud nii halvasti dokumenteeritud asja - naljavennad: http://win32.perl.org/
|
|
Kommentaarid: 77 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
69 |
|
tagasi üles |
|
 |
infidel
HV kasutaja

liitunud: 31.01.2004
|
24.01.2013 17:28:33
|
|
|
Mis ta selle peale ütleb, kui mooduli asukoht httpd.confis absoluutaadressiga anda?
|
|
Kommentaarid: 36 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
35 |
|
tagasi üles |
|
 |
sakunne
HV veteran

liitunud: 15.12.2004
|
24.01.2013 18:39:27
|
|
|
infidel kirjutas: |
Mis ta selle peale ütleb, kui mooduli asukoht httpd.confis absoluutaadressiga anda? |
Ikka sama
Teised moodulid viga ei anna, kusjuures, kui mod_perl välja kommenteerida:
#LoadModule perl_module modules/mod_perl.so
LoadModule apreq_module modules/mod_apreq2.so
|
siis mod_apreq2 laeb ja Apache käivitub
|
|
Kommentaarid: 77 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
69 |
|
tagasi üles |
|
 |
infidel
HV kasutaja

liitunud: 31.01.2004
|
24.01.2013 20:18:30
|
|
|
Kas mod_perl on ikka õige versiooni oma?
Ühes kohas on versiooninumbriks 5.10, teises 5.12 ja kolmandas 5.16.
|
|
Kommentaarid: 36 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
35 |
|
tagasi üles |
|
 |
sakunne
HV veteran

liitunud: 15.12.2004
|
|
Kommentaarid: 77 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
69 |
|
tagasi üles |
|
 |
infidel
HV kasutaja

liitunud: 31.01.2004
|
|
Kommentaarid: 36 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
35 |
|
tagasi üles |
|
 |
sakunne
HV veteran

liitunud: 15.12.2004
|
24.01.2013 22:04:20
|
|
|
Ära sa märgi, töötabki
Tänud
_________________ Kuna ei pruugi õigel ajal foorumisse sattuda:
SMS: 5051598 [võõraid tel. ei vasta]
Email sakunne@seenior.ee |
|
Kommentaarid: 77 loe/lisa |
Kasutajad arvavad: |
   |
:: |
0 :: |
0 :: |
69 |
|
tagasi üles |
|
 |
|