Apache doesn't execute perl scripts

2008-11-12 Thread Mustafa Aldemir

Hello,

I am running Apache 2 under a Debian server. I installed Awstats and 
configured it as stated in its documentation. Perl is running, I could 
update Awstats database from the console. I updated added the following 
lines to my Apache configuration, and restarted it.


When I want to enter the www.domain.com/awstats/awstats.pl the browser 
asks to download the file or open it in text editor.


Can you please help me point the problem out?

thanks,
Mustafa


AddType application/x-perl-httpd .pl
AddHandler perl-script .pl

LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so


 AllowOverride None
 Options FollowSymLinks +ExecCGI -MultiViews +SymLinksIfOwnerMatch
 Order allow,deny
 Allow from all
 SetHandler perl-script


Alias /awstatsclasses "/usr/share/awstats/lib/"
Alias /awstats-icon/ "/usr/share/awstats/icon/"
Alias /awstatscss "/usr/share/doc/awstats/examples/css"
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
ScriptAlias /awstats/ /usr/lib/cgi-bin/


Re: Apache doesn't execute perl scripts

2008-11-12 Thread Mustafa Aldemir

Adam Prime wrote:

Mustafa Aldemir wrote:



AddType application/x-perl-httpd .pl
AddHandler perl-script .pl

LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so


 AllowOverride None
 Options FollowSymLinks +ExecCGI -MultiViews +SymLinksIfOwnerMatch
 Order allow,deny
 Allow from all
 SetHandler perl-script


Alias /awstatsclasses "/usr/share/awstats/lib/"
Alias /awstats-icon/ "/usr/share/awstats/icon/"
Alias /awstatscss "/usr/share/doc/awstats/examples/css"
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
ScriptAlias /awstats/ /usr/lib/cgi-bin/



You need:

PerlHandler Apache::Registry

(or one of the other CGI emulators) in your directory section.  take a 
look at:


http://perl.apache.org/docs/1.0/guide/intro.html#toc_Apache__Registry

It looks like you're running mp1, so this response assumes that.

Adam


thanks it worked after pasting these lines in the virtualhost configuration


Re: mod_perl survey results

2008-11-12 Thread Foo JH
William A. Rowe, Jr. wrote:
> Foo JH wrote:
>> Adam Prime wrote:
>>> The results of the mod_perl survey that Fred Moyer and I conducted can
>>> be found at the following link:
>> Interesting list. Any chance the workshop will come to Singapore? :)
> 
> Not quite, but close...
> 
> http://us.apachecon.com/c/accn2008/
Thanks. Only 1 small comment: Singapore is not exactly next door to
China. In fact we're closer to Indonesia than the former!




Re: mod_perl survey results

2008-11-12 Thread Perrin Harkins
On Tue, Nov 11, 2008 at 7:33 PM, Joel Bernstein <[EMAIL PROTECTED]> wrote:
> 2008/11/11 Perrin Harkins <[EMAIL PROTECTED]>:
>> On Tue, Nov 11, 2008 at 2:09 PM, Octavian Rasnita <[EMAIL PROTECTED]> wrote:
>>> However, I've seen that many Catalyst developers prefer to use fastcgi and
>>> not mod_perl, because when using fastcgi, the applications can be restarted
>>> without restarting the whole web server.
>>
>> It's the same with mod_perl: you can restart your backend server
>> without touching the frontend proxy server.  It's possible that some
>> FastCGI implementations have a truly seamless way to do this though,
>> holding requests while the backend restarts.  I haven't played with it
>> enough to know.
>
> It's actually better than that. Typically in such a deployment you'd
> be using either a standalone FCGI process manager, or one built into
> the web application or web framework (the Catalyst FastCGI server has
> such a feature) then it's as simple as starting up a new version of
> the app, then shutting down the old one.
>
> All FastCGI child processes share a single unix domain socket on the
> filesystem, which is opened both by the child processes AND the
> webserver without O_EXCL, so the webserver continues to push requests
> down the socket, and whichever FastCGI process's accept() wins (this
> is up to the OS kernel) gets to serve the request.
>
> As long as you shut down the old version of the app after the new
> version is started, there's a completely seamless handover with total
> isolation from the webserver. The scheduling of request handling by a
> pool of backend appservers, again, is handled by the kernel rather
> than the webserver. This seems to me to be a good example of the Unix
> way of multiple processes handling one thing well.
>
> In the typical mod_perl deployment of a lightweight apache mod_proxy
> delegating requests to a mod_perl backend, I think the same thing
> could be achieved if both can be persuaded open the network socket
> between them without O_EXCL - then you can startup the new mod_perl
> appserver in tandem with the old, seamlessly the proxy will switch
> requests to the new one, and you can shutdown the old appserver. I'm
> not at all familiar with the apache internals though, so somebody
> else's comments on how possible this would be, are definitely
> appreciated.

Now _that's_ a great feature.  There are proxy servers that will do
this for mod_perl, but I'm not aware of a way to do it while using
apache as your frontend proxy.  Maybe mod_proxy_balancer could be made
to do it?

- Perrin


Re: Apache doesn't execute perl scripts

2008-11-12 Thread Adam Prime

Mustafa Aldemir wrote:



AddType application/x-perl-httpd .pl
AddHandler perl-script .pl

LoadModule perl_module /usr/lib/apache2/modules/mod_perl.so
LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so


 AllowOverride None
 Options FollowSymLinks +ExecCGI -MultiViews +SymLinksIfOwnerMatch
 Order allow,deny
 Allow from all
 SetHandler perl-script


Alias /awstatsclasses "/usr/share/awstats/lib/"
Alias /awstats-icon/ "/usr/share/awstats/icon/"
Alias /awstatscss "/usr/share/doc/awstats/examples/css"
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
ScriptAlias /awstats/ /usr/lib/cgi-bin/



You need:

PerlHandler Apache::Registry

(or one of the other CGI emulators) in your directory section.  take a 
look at:


http://perl.apache.org/docs/1.0/guide/intro.html#toc_Apache__Registry

It looks like you're running mp1, so this response assumes that.

Adam


Apache mod_perl Error Received: (OS 3)The system cannot find the path specified

2008-11-12 Thread klaassen

Hello,

I have searched all over the internet for an answer to this problem.  There
are lots of hits, but no good solutions.

You see the technical stack: mod_perl 2.0.3, apache 2.0.63, win32 xp,
activestate perl 5.8.8 build 524 

1) I am able to run perl scripts from anywhere on my computer - this
validates that the environment variables are set properly

2) However, when want to run perl throug apache to my browser, I get these
errors in my error_log: 
Error Received: (OS 3)The system cannot find the path specified.  : couldn't
create child process

3) I have set the CGI configs up per the config guides on apache's web site
to execute perl scripts.  I can upload the entries later when I have access
to the computer.  In summary:  
a) loaded the module
b) set the cgi handler to recognized .pl
c) set the appropriate  options for security to execute
Options +ExecCGI
Order allow,deny
Allow from all

4) Reasonably certain it has nothing at all to do with the shebang in the
files (i've changed them to match my path to perl with no difference in
results)

5) updated my registry for .cgi with the path to perl

There must be some small config I am missing.  Can anyone please help?  It
sounds like I am not along on this issue since there are many recent hits
(but no good answers).

Thank you
-- 
View this message in context: 
http://www.nabble.com/Apache-mod_perl-Error-Received%3A-%28OS-3%29The-system-cannot-find-the-path-specified-tp20465500p20465500.html
Sent from the mod_perl - General mailing list archive at Nabble.com.



mod_perl specialchars form post data trouble

2008-11-12 Thread Axel Huizinga

Hi,
am stuck with a problem on
mod_apreq2-20051231/2.6.0 mod_perl/2.0.3 Perl/v5.8.8
form data string with special chars like

[EMAIL PROTECTED]

POSTed to a handler
is returned as:

[EMAIL PROTECTED]

by Apache2::Request::param

to test if the form works well I tried with CGI.pm - there the data is 
returned like input.

is there any way to get back the original Data with mod_perl?
I tried different charsets and enctype settings in the form document
and decode utf8 and charset(8)  on the mod_perl handler but no success.

Best,
Axel



[mp2] build (make) error and 2 questions

2008-11-12 Thread craig

-8<-- Start Bug Report 8<--
1. Problem Description:

1.1 attempting to static-build mod_perl 2.0.4 and apache 2.2.10, is  
the following

warning right at the end of the Makefile.PL output worrisome?

[warning] mod_perl static library will be built as mod_perl.a

1.2 errors in make, after about 37 cc's have succeeded:
 
---
cc -I/build/mod_perl-2.0.4/src/modules/perl -I/build/mod_perl-2.0.4/ 
xs -I/build/httpd-2.2.10/include -I/build/httpd-2.2.10/srclib/apr/ 
include -I/build/httpd-2.2.10/srclib/apr-util/include -I/build/ 
httpd-2.2.10/os/unix -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H - 
DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement - 
I/usr/local/include -I/usr/local/lib/perl5/5.8.8/i386-freebsd/CORE - 
DMOD_PERL -DMP_COMPAT_1X -DMP_DEBUG -DMP_TRACE -g -c modperl_exports.c
modperl_exports.c:1169: error: `modperl_thx_interp_get' undeclared  
here (not in a function)
modperl_exports.c:1173: error: `modperl_thx_interp_set' undeclared  
here (not in a function)

*** Error code 1

Stop in /build/mod_perl-2.0.4/src/modules/perl.
*** Error code 1

Stop in /build/mod_perl-2.0.4.
 
--


1.3 is --enable-debug still valid as an Apache 2.2.10 configure  
option, or must this
be --enable-maintainer-mode instead?  Compiling some of the ssl  
stuff (last
night before venturing into mod-perl) made warnings about  
prototypes...


NOTE: the contents of the shell script used to initiate Makefile.PL are
attached right before the "end bug report" line the near the end.


2. Used Components and their Configuration:

*** mod_perl version 2.04

*** using /build/mod_perl-2.0.4/lib/Apache2/BuildConfig.pm

*** Makefile.PL options:
  MP_APR_LIB  => aprext
  MP_AP_CONFIGURE => --prefix=/usr/local/apache2.2.10 --with- 
mpm=prefork --with-included-apr --with-ssl=/usr/local/ssl --enable- 
debug --enable-exception-hook --enable-mods-shared='all authn_alias  
cache disk_cache mem_cache charset_lite dav_lock ext_filter logio  
proxy proxy_connect proxy_ftp proxy_http proxy_ajp proxy_balancer' -- 
enable-authn_file=static --enable-authn_default=static --enable- 
authz_host=static --enable-authz_groupfile=static --enable- 
authz_user=static --enable-authz_default=static --enable- 
auth_basic=static --enable-include=static --enable-filter=static -- 
enable-log_config=static --enable-env=static --enable-expires=static  
--enable-setenvif=static --enable-mime=static --enable-status=static  
--enable-autoindex=static --enable-asis=static --enable-cgi=static -- 
enable-negotiation=static --enable-dir=static --enable-alias=static -- 
enable-actions=static --enable-deflate=static --enable-expires=static  
--enable-file_cache=static --enable-ssl=static --enable-suexec=static  
--with-suexec-uidmin=80 --with-suexec-gidmin=80 --with-suexec- 
caller=www --with-suexec-userdir=www/cgi-bin --with-suexec-docroot='/ 
home' --with-pcre=/usr/local/bin/pcre-config CFLAGS='-DVERIO - 
DVERIO_VPS' LDFLAGS='-L/usr/local/lib'

  MP_AP_DESTDIR   => /usr/local/apache2.2.10
  MP_AP_PREFIX=> /build/httpd-2.2.10
  MP_COMPAT_1X=> 1
  MP_DEBUG=> 1
  MP_GENERATE_XS  => 1
  MP_LIBNAME  => mod_perl
  MP_TRACE=> 1
  MP_USE_STATIC   => 1


*** The httpd binary was not found


*** (apr|apu)-config linking info

-L/build/httpd-2.2.10/srclib/apr-util/.libs
 -L/build/httpd-2.2.10/srclib/apr-util -laprutil-1  -lexpat -L/usr/ 
local/lib

-L/build/httpd-2.2.10/srclib/apr/.libs
 -L/build/httpd-2.2.10/srclib/apr -lapr-1 -lcrypt  -lpthread



*** /usr/local/bin/perl5.8.8 -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
  Platform:
osname=freebsd, osvers=6.3-release, archname=i386-freebsd
uname='freebsd sakomina.securesites.net 6.3-release freebsd 6.3- 
release #2: wed jun 25 14:30:46 mdt 2008  
[EMAIL PROTECTED]:usrsrcsysi386compilevkern i386 '

config_args='-Doptimize=-g -Dusedevel'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef  
usemultiplicity=undef

useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H - 
DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement - 
I/usr/local/include',

optimize='-g',
cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno- 
strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/ 
include'
ccversion='', gccversion='3.4.6 [FreeBSD] 20060305',  
gccosandvers=''

intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8,  
Off_t=

Re: [mp2] build (make) error and 2 questions

2008-11-12 Thread Fred Moyer
On Wed, Nov 12, 2008 at 9:30 PM,  <[EMAIL PROTECTED]> wrote:
> -8<-- Start Bug Report 8<--
> 1. Problem Description:
>
> 1.1 attempting to static-build mod_perl 2.0.4 and apache 2.2.10, is the
> following
>warning right at the end of the Makefile.PL output worrisome?

Not worrisome, mod_perl just did not build.  Can you build as a shared
object rather than compiling it into Apache statically?

perl Makefile.PL MP_APXS=/path/to/my/httpd2/bin/apxs





>
>[warning] mod_perl static library will be built as mod_perl.a
>
> 1.2 errors in make, after about 37 cc's have succeeded:
> ---
> cc -I/build/mod_perl-2.0.4/src/modules/perl -I/build/mod_perl-2.0.4/xs
> -I/build/httpd-2.2.10/include -I/build/httpd-2.2.10/srclib/apr/include
> -I/build/httpd-2.2.10/srclib/apr-util/include -I/build/httpd-2.2.10/os/unix
> -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -pipe
> -Wdeclaration-after-statement -I/usr/local/include
> -I/usr/local/lib/perl5/5.8.8/i386-freebsd/CORE -DMOD_PERL -DMP_COMPAT_1X
> -DMP_DEBUG -DMP_TRACE -g -c modperl_exports.c
> modperl_exports.c:1169: error: `modperl_thx_interp_get' undeclared here (not
> in a function)
> modperl_exports.c:1173: error: `modperl_thx_interp_set' undeclared here (not
> in a function)
> *** Error code 1
>
> Stop in /build/mod_perl-2.0.4/src/modules/perl.
> *** Error code 1
>
> Stop in /build/mod_perl-2.0.4.
> --
>
> 1.3 is --enable-debug still valid as an Apache 2.2.10 configure option, or
> must this
>be --enable-maintainer-mode instead?  Compiling some of the ssl stuff
> (last
>night before venturing into mod-perl) made warnings about prototypes...
>
> NOTE: the contents of the shell script used to initiate Makefile.PL are
> attached right before the "end bug report" line the near the end.
>
>
> 2. Used Components and their Configuration:
>
> *** mod_perl version 2.04
>
> *** using /build/mod_perl-2.0.4/lib/Apache2/BuildConfig.pm
>
> *** Makefile.PL options:
>  MP_APR_LIB  => aprext
>  MP_AP_CONFIGURE => --prefix=/usr/local/apache2.2.10 --with-mpm=prefork
> --with-included-apr --with-ssl=/usr/local/ssl --enable-debug
> --enable-exception-hook --enable-mods-shared='all authn_alias cache
> disk_cache mem_cache charset_lite dav_lock ext_filter logio proxy
> proxy_connect proxy_ftp proxy_http proxy_ajp proxy_balancer'
> --enable-authn_file=static --enable-authn_default=static
> --enable-authz_host=static --enable-authz_groupfile=static
> --enable-authz_user=static --enable-authz_default=static
> --enable-auth_basic=static --enable-include=static --enable-filter=static
> --enable-log_config=static --enable-env=static --enable-expires=static
> --enable-setenvif=static --enable-mime=static --enable-status=static
> --enable-autoindex=static --enable-asis=static --enable-cgi=static
> --enable-negotiation=static --enable-dir=static --enable-alias=static
> --enable-actions=static --enable-deflate=static --enable-expires=static
> --enable-file_cache=static --enable-ssl=static --enable-suexec=static
> --with-suexec-uidmin=80 --with-suexec-gidmin=80 --with-suexec-caller=www
> --with-suexec-userdir=www/cgi-bin --with-suexec-docroot='/home'
> --with-pcre=/usr/local/bin/pcre-config CFLAGS='-DVERIO -DVERIO_VPS'
> LDFLAGS='-L/usr/local/lib'
>  MP_AP_DESTDIR   => /usr/local/apache2.2.10
>  MP_AP_PREFIX=> /build/httpd-2.2.10
>  MP_COMPAT_1X=> 1
>  MP_DEBUG=> 1
>  MP_GENERATE_XS  => 1
>  MP_LIBNAME  => mod_perl
>  MP_TRACE=> 1
>  MP_USE_STATIC   => 1
>
>
> *** The httpd binary was not found
>
>
> *** (apr|apu)-config linking info
>
> -L/build/httpd-2.2.10/srclib/apr-util/.libs
>  -L/build/httpd-2.2.10/srclib/apr-util -laprutil-1  -lexpat -L/usr/local/lib
> -L/build/httpd-2.2.10/srclib/apr/.libs
>  -L/build/httpd-2.2.10/srclib/apr -lapr-1 -lcrypt  -lpthread
>
>
>
> *** /usr/local/bin/perl5.8.8 -V
> Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
>  Platform:
>osname=freebsd, osvers=6.3-release, archname=i386-freebsd
>uname='freebsd sakomina.securesites.net 6.3-release freebsd 6.3-release
> #2: wed jun 25 14:30:46 mdt 2008 [EMAIL PROTECTED]:usrsrcsysi386compilevkern 
> i386 '
>config_args='-Doptimize=-g -Dusedevel'
>hint=recommended, useposix=true, d_sigaction=define
>usethreads=undef use5005threads=undef useithreads=undef
> usemultiplicity=undef
>useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
>use64bitint=undef use64bitall=undef uselongdouble=undef
>usemymalloc=n, bincompat5005=undef
>  Compiler:
>cc='cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING
> -fno-strict-aliasing -pipe -Wdeclaration-after-statement
> -I/usr/local/include',
>optimize='-g',
>cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING
> -fno-strict-aliasing -pipe

Re: [mp2] build (make) error and 2 questions

2008-11-12 Thread Philip M. Gollucci

Fred Moyer wrote:

On Wed, Nov 12, 2008 at 9:30 PM,  <[EMAIL PROTECTED]> wrote:

-8<-- Start Bug Report 8<--
1. Problem Description:

1.1 attempting to static-build mod_perl 2.0.4 and apache 2.2.10, is the
following
   warning right at the end of the Makefile.PL output worrisome?


Not worrisome, mod_perl just did not build.  Can you build as a shared
object rather than compiling it into Apache statically?

perl Makefile.PL MP_APXS=/path/to/my/httpd2/bin/apxs


Static hasn't worked for a long time in 2.x though it is on the infinite 
list; however, the performance reasons for doing it statically are not 
really an issue in 2.x

--

Philip M. Gollucci ([EMAIL PROTECTED]) c: 703.336.9354
Consultant - P6M7G8 Inc.  http://p6m7g8.net
Senior System Admin - RideCharge, Inc.  http://ridecharge.com
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70  3F8C 75B8 8FFB DB9B 8C1C

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.


[Fwd: Re: [RELEASE CANDIDATE] libapreq2 2.10 RC1]

2008-11-12 Thread Philip M. Gollucci


--

Philip M. Gollucci ([EMAIL PROTECTED]) c: 703.336.9354
Consultant - P6M7G8 Inc.  http://p6m7g8.net
Senior System Admin - RideCharge, Inc.  http://ridecharge.com
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70  3F8C 75B8 8FFB DB9B 8C1C

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.
--- Begin Message ---
On Thu, 2008-11-13 at 17:29 +1100, Bojan Smojver wrote:
> It has been over two years since the latest apreq2 release, so it is
> time to get some new code out the door. Numerous bugs were fixed (see
> the full list in the CHANGES file) since the last official release
> (2.08), so please give us feedback on this release candidate.
> 
> You can get the tarball, its signature and MD5 checksum from here:
> 
> http://people.apache.org/~bojan/libapreq2-2.10-RC1.tar.gz
> http://people.apache.org/~bojan/libapreq2-2.10-RC1.tar.gz.asc
> http://people.apache.org/~bojan/libapreq2-2.10-RC1.tar.gz.md5
> 
> Please report any problems back to the list:
> 
> [EMAIL PROTECTED]

Could people subscribed to mod_perl and httpd lists please forward this
e-mail there. Thanks!

-- 
Bojan
--- End Message ---