variable sharing

2003-05-31 Thread Arshavir Grigorian
Hello,

The answer to the question that I am about to ask is no (I think) but 
I would just like to make sure.

Is it possible that calling undef on a global hash in one Apache process 
not reset the value/contents of the same hash
in other Apache processes?

I am using Apache::Status to examine the content of a specific hash and 
depending on which Apache process handles my
request, I get a different value for a specific key in the hash.

On a related note, does running several virtual hosts of off the same 
source tree mean that all global variables are shared
among all the vhosts?

Thanks in advance.

Arsh



Help with Apache 1.3.27 + mod_perl 1.27 installation

2003-02-20 Thread Arshavir Grigorian
Hi,

I was trying to build Apache 1.3.27 + mod_perl 1.27 from
the mod_perl tree. Dir structure as follows:

/usr/local/apache2-19
/use/local/apache2-19/build
/use/local/apache2-19/build/apache_1.3.27
/use/local/apache2-19/build/mod_perl-1.27

So, following the suggestion from

http://perl.apache.org/docs/1.0/guide/install.html#APACI_ARGS

that one can pass *any* arguments to the Apache ./configure through the
APACI_ARGS directive, I placed the following lines into

/use/local/apache2-19/build/makepl_args.mod_perl

APACHE_SRC=../apache_1.3.27/src DO_HTTPD=1 USE_APACI=1 EVERYTHING=1 \
APACI_ARGS='--prefix=/usr/local/apache2-19, --enable-module=dir'

This generated some errors during the configure process

cd /use/local/apache2-19/build/mod_perl-1.27/
make clean
perl Makefile.pl

...
'--ENABLE-MODULE' is not a known MakeMaker parameter name.
...

I then discovered ADD_MODULE parameter and used that instead of using 
the Apache's --enable-module parameter.

Correct me I am wrong, but I think the guide's section on using the
APACI_ARGS parameter should say something about not being able to
use '--enable-module' there, and have a pointer to the ADD_MODULE parameter.

I have attached the output of perl -V, though I don't think it makes a
difference in this case.

Thanks,
Arsh

P.S. I apologize if my post is too long, I don't post very often ...
 so I guess I don't have a good feel for what can be left out.


$ perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
osname=linux, osvers=2.4.7-10, archname=i686-linux
uname='linux ejp_linux1 2.4.7-10 #1 thu sep 6 17:27:27 edt 2001 
i686 unknown
 '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef 
usemultiplicity=unde
f
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include 
-D_LARGEFILE_SO
URCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='2.96 2731 (Red Hat Linux 7.1 
2.96-98)', gccosa
ndvers=''
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='off_t', 
lseeksize
=8
alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil
libc=/lib/libc-2.2.4.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Compile-time options: USE_LARGE_FILES
  Built under linux
  Compiled at May 30 2002 16:48:17
  @INC:
/usr/lib/perl5/5.6.1/i686-linux
/usr/lib/perl5/5.6.1
/usr/lib/perl5/site_perl/5.6.1/i686-linux
/usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl
/usr/lib/perl5/site_perl/5.6.0/i686-linux
usr/lib/perl5/site_perl/5.6.0/
.
$



Re: Help with Apache 1.3.27 + mod_perl 1.27 installation

2003-02-20 Thread Arshavir Grigorian
Much cleaner. Thanks!
I don't even get those nasty warning about barewords, etc.

I still think the example in the guide should be updated.

Arsh

Ged Haywood wrote:


Hi there,

On Thu, 20 Feb 2003, Arshavir Grigorian wrote:

 

I was trying to build Apache 1.3.27 + mod_perl 1.27
   

[snip]
 

So, following the suggestion from

http://perl.apache.org/docs/1.0/guide/install.html#APACI_ARGS

that one can pass *any* arguments to the Apache ./configure through the
APACI_ARGS directive, I placed the following lines into

/use/local/apache2-19/build/makepl_args.mod_perl

APACHE_SRC=../apache_1.3.27/src DO_HTTPD=1 USE_APACI=1 EVERYTHING=1 \
APACI_ARGS='--prefix=/usr/local/apache2-19, --enable-module=dir'

This generated some errors during the configure process
   


See a sample makepl_args.mod_perl (very old one:) below for the way
to use this directive.

73,
Ged.

--
makepl_args.mod_perl.1.3.22
--
USE_APACI=1
APACHE_PREFIX=/usr/local
APACHE_SRC=../apache_1.3.22/src
DO_HTTPD=1
EVERYTHING=1
ALL_HOOKS=1
PERL_SSI=1
PERL_SECTIONS=1
APACI_ARGS=--sbindir=/usr/local/sbin/httpd_perl
APACI_ARGS=--sysconfdir=/usr/local/apache/httpd_perl/conf
APACI_ARGS=--runtimedir=/usr/local/apache/httpd_perl/run
APACI_ARGS=--logfiledir=/usr/local/apache/httpd_perl/logs
APACI_ARGS=--localstatedir=/usr/local/apache/httpd_perl/stat
APACI_ARGS=--proxycachedir=/usr/local/apache/httpd_perl/proxy
APACI_ARGS=--enable-module=rewrite
APACI_ARGS=--enable-module=include
APACI_ARGS=--enable-module=info
APACI_ARGS=--enable-module=usertrack
 






Re: special characters - html entities

2002-10-22 Thread Arshavir Grigorian
Have you tried using the HTML::Entities module?

Good luck. 
Arsh 


On Tue, 22 Oct 2002 21:49:00 +0200
allan [EMAIL PROTECTED] wrote:

 hi
 
 i have some troubles with scandinavian characters in form input
 fields. i wish to translate (or subsitute rather) the special ones
 into their html enitity before they are put in a database.
 
 something like:
 ... 
 my %params = $r-method eq 'POST' ? $r-content : $r-args;
 
 my $name = $params{$name};
 $name =~ s/SPEC_CHAR/HTML_ENTITY/g;
 
 ...
 
 
 but that doesn't work (?)
 
 (the above subsitution does work with normal characters)
 
 has this something to do with the particular perl i have build or
 mod_perl or apache ?
 is their an easy fix ?
 
 perl 5.8.0 / os x darwin
 mod_perl 1.27
 apache 1.3.26
 
 
 thanks 
 ./allan



subroutines

2001-10-29 Thread Arshavir Grigorian


Hello All,

This might be a very obvious question to many of you, but for me it's
still somewhat unclear.

I am running Apache 1.3.19 mod_perl/1.24_01 on a RedHat 7.1 box (PC).

I have 2 versions of code running under 2 different virtual hosts. As
you probably guessed, my subroutine definitions are getting overriden,
and subroutines from package on one tree, get called by programs in the
other  tree.
The mod_perl documentation suggests that by using the Apache::PerlVINC
module it is possible to load
the appropriate module based upon the name of the virtual host used.
The 2 questions I have are:

1)  as my modules are not used as PerlHandler (as is the case with the
example in the online documentation 'PerlHandler Apache::Status'), I am
not quite sure how to configure Apache to simply
reload a simple module when a request is made against a specific
virtual host.

Previously, I used the PerlScript directive to load the modules:

httpd.conf
-
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI -Indexes

PerlScript/path_to_cgi/main.pl
--

main.pl
-
use lib (/path_to_cgi/main.pl)
use Module1;
use Module2;
...
sub subroutine1 {}
sub subroutine2 {}
-

How can I configure it so that when a request is made against

- http://qa/cgi-bin/main.plex = /path_to_qa/main.plex is loaded (with
all underlying modules)
- http://devel/cgi-bin/main.plex = /path_to_devel/main.plex is loaded
(with all underlying modules)

2) and if it is possible to do this, are the modules cached via mod_perl
(Apache::Registry) when several consequtive requests are made against
the same vhost (say http://qa/)

Thanks in advance!

Arshavir