RE: param trouble

2002-07-11 Thread Wes Cravens

Check the thread on the 05-Jul-2002

 -Original Message-
 From: Tim Sebastian Böckers [mailto:[EMAIL PROTECTED]]
 Sent: 28 June 2002 18:44
 To: [EMAIL PROTECTED]
 Subject: param trouble


 dear list,

 i run into some trouble today for which i couldn't figure ailment
 myself nor
 find it googling.
 i got a cgi-bin dir running cgi/perl scripts under Apache::PerlRun.
 the directory is protected by a function in a .pm
 (Cartas::handler) called as
 a PerlInitHandler which reads some session data passed to it via GET from
 which it builds a cookie.
 when i try to read the data using CGI's param function in my
 Cartas::handler
 routine nothing is read. however, Apache::Request reads the data
 just fine so
 i figured i had everything resolved.
 however, when i try to read the param's in my cgi scripts via CGI's param
 functions nothing is returned. if i avoid reading the params with
 Apache::Request::param CGI::param will return the data correctly
 inside the
 CGI scripts.
 basically the whole thing is starting to bite its own tail and i
 would be very
 happy if anybody could give me any pointers as to why CGI won't
 read my data
 from the PerlInitHandler or after Apache::Request read them.
 and by the way its Apache 1.3.22 with mod_perl 1.26, perl 5.6.1
 and CGI.pm
 version 2.80

 biting his nails,
 tim




Re: [JOB] Perl / mod_perl programmer in Orem, UT

2002-07-11 Thread Jonathan M. Hollin

Cahill, Earl wrote:
 Internet Software Engineer (PERL)
 
 About Web Services is seeking an Internet Software Engineer to maintain and
 develop new applications for it's hosting platform.  About Web Services is a
 division of About.com that provides hosting solutions to more than 4 million
 web sites including freeservers.com and bizhosting.com.  Job includes a
 competitive salary and benefits (Health and Dental Insurance, 401K, ESPP)  
 
 Qualifications:
   -2 years+ Experience developing in PERL / modperl on Unix
   -Solid Understanding of Object Oriented Programming
   -Experience with HTML, JavaScript, and XML
   -Experience with SQL (Oracle and/or MySQL)
   -Experience with writing efficient highly scalable code
   -Experience with Red Hat Linux or equivalent
   -Experience with CVS
   -Experience in working in a team environment


Yet again I ask myself - why don't I emigrate to the US?  :-(


-- 
Jonathan M. Hollin

Technical Director:  Digital-Word Co. (http://digital-word.com/)
Co-ordinator:  WYPUG (http://wypug.pm.org/)




Apache::AuthCookie weirdness

2002-07-11 Thread Ken Miller

I'm experiencing a really strange problem with Apache::AuthCookie and
Internet Explorer.  Every now and then when I try and access a protected
URL, I never see the login page.

If I close the window, and open a new one, it works just fine.  This is the
case even if there are other windows open.  In otherwords, I don't have to
close all the IE windows to get in.

I do not know if this same error occurs with Mozilla.

If I inspect the logs, I see this: (with Apache::AuthCookie debugging turned
on):

(Application Server Error Log)

[Thu Jul 11 09:06:51 2002] [error] auth_type Foo::Apache::AuthCookieHandler
[Thu Jul 11 09:06:51 2002] [error] auth_name Bar
[Thu Jul 11 09:06:51 2002] [error] ses_key_cookie
[Thu Jul 11 09:06:51 2002] [error] uri /rc/
[Thu Jul 11 09:06:51 2002] [error] auth_type Foo::Apache::AuthCookieHandler
[Thu Jul 11 09:06:51 2002] [error] auth_name Bar
[Thu Jul 11 09:06:51 2002] [error] ses_key_cookie
[Thu Jul 11 09:06:51 2002] [error] uri /rc/
[Thu Jul 11 09:06:51 2002] [error] auth_type Foo::Apache::AuthCookieHandler
[Thu Jul 11 09:06:51 2002] [error] auth_name Bar
[Thu Jul 11 09:06:51 2002] [error] ses_key_cookie
[Thu Jul 11 09:06:51 2002] [error] uri /rc/
[Thu Jul 11 09:06:51 2002] [error] auth_type Foo::Apache::AuthCookieHandler
[Thu Jul 11 09:06:51 2002] [error] auth_name Bar
[Thu Jul 11 09:06:51 2002] [error] ses_key_cookie
[Thu Jul 11 09:06:51 2002] [error] uri /rc/

(Application Server Access Log)

127.0.0.1 - - [11/Jul/2002:09:06:51 -0600] GET /rc/ HTTP/1.0 403 1542
127.0.0.1 - - [11/Jul/2002:09:06:51 -0600] GET /rc/ HTTP/1.0 403 1542
127.0.0.1 - - [11/Jul/2002:09:06:51 -0600] GET /rc/ HTTP/1.0 403 1542
127.0.0.1 - - [11/Jul/2002:09:06:51 -0600] GET /rc/ HTTP/1.0 403 1542
127.0.0.1 - - [11/Jul/2002:09:06:51 -0600] GET /rc/ HTTP/1.0 403 1542
127.0.0.1 - - [11/Jul/2002:09:06:51 -0600] GET /rc/ HTTP/1.0 403 1542
127.0.0.1 - - [11/Jul/2002:09:06:51 -0600] GET /rc/ HTTP/1.0 403 1542
127.0.0.1 - - [11/Jul/2002:09:06:51 -0600] GET /rc/ HTTP/1.0 403 1542

The browser and the server are locked in this conversation where the browser
continually requests the protected URI.  If I look in the access logs, I see
this:

(Front-end light Proxy Logs)

xxx.10.67.255 - - [11/Jul/2002:09:06:51 -0600] GET /styles.css HTTP/1.1
200 3495
xxx.10.67.255 - - [11/Jul/2002:09:06:51 -0600] GET /rc/ HTTP/1.1 200 1542
xxx.10.67.255 - - [11/Jul/2002:09:06:51 -0600] GET /styles.css HTTP/1.1
200 3495
xxx.10.67.255 - - [11/Jul/2002:09:06:51 -0600] GET /rc/ HTTP/1.1 200 1542
xxx.10.67.255 - - [11/Jul/2002:09:06:51 -0600] GET /styles.css HTTP/1.1
200 3495
xxx.10.67.255 - - [11/Jul/2002:09:06:51 -0600] GET /rc/ HTTP/1.1 200 1542
xxx.10.67.255 - - [11/Jul/2002:09:06:51 -0600] GET /styles.css HTTP/1.1
200 3495
xxx.10.67.255 - - [11/Jul/2002:09:06:51 -0600] GET /rc/ HTTP/1.1 200 1542
xxx.10.67.255 - - [11/Jul/2002:09:06:51 -0600] GET /styles.css HTTP/1.1
200 3495
xxx.10.67.255 - - [11/Jul/2002:09:06:51 -0600] GET /rc/ HTTP/1.1 200 1542
xxx.10.67.255 - - [11/Jul/2002:09:06:51 -0600] GET /styles.css HTTP/1.1
200 3495
xxx.10.67.255 - - [11/Jul/2002:09:06:51 -0600] GET /rc/ HTTP/1.1 200 1542

Any ideas what's going on?  It almost seems like AuthCookie is getting
confused and not redirecting the user to the correct URL - instead of the
login page, it get's redirected back to the initial url, which is protected,
and thus starts the entire cycle over again.

Proxy: Apache/1.3.23 (Unix) mod_gzip/1.3.19.1a mod_ssl/2.8.7 OpenSSL/0.9.6c
  App: Apache/1.3.23 (Unix) mod_perl/1.26
 Perl: 5.6.1
 Apache::AuthCookie: 3.02

-klm.





mod_perl help

2002-07-11 Thread Ryan Hairyes

Hello all,

I just compiled mod_perl 1.27 with apache 1.3 for Solaris 8.  I used perl
5.6.1 and gcc from www.sunfreeware.com.  After I compiled everything and tried
to load the perl module (with LoadModule) I receive the following error:


Cannot load /usr/local/apache/libexec/libperl.so into server: ld.so.1: 
/usr/local/apache/sbin/httpd: fatal: relocation error: file 
/usr/local/apache/libexec/libperl.so: symbol main: referenced symbol not found


Any idea on what I did wrong?  Thanks.

Ryan



RE: mod_perl help

2002-07-11 Thread Peter Werner

make sure you are not using the sun as and ld etc. you can check by looking
at the output of which as. (should be /usr/local/bin/as not
/usr/ccs/bin/as). i have /usr/local/bin in my PATH before /usr/ccs/bin and
/usr/ucb.

if this doesnt help i would try recompiling perl. 

maybe someone with more knowledge of the subject could explain why mod_perl
needs perl to be compiled with the same compiler (just idle curiosity)

cheers
-pete
-Original Message-
From: Ryan Hairyes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 4:45 PM
To: Peter Werner
Cc: [EMAIL PROTECTED]
Subject: RE: mod_perl help


Thanks for the reply.  Actually ... according to sunfreeware perl5.6.1 was
compiled with gcc.  Anything else you can think of?

Thanks again.


Quoting Peter Werner [EMAIL PROTECTED]:

: you will have to compile perl from scratch as the sunfreeware perl is
: compiled with suns compiler not gcc and this causes problems. poke around
: sunfreeware.com for the instructions he used to build perl, it is quite
: simple.
: 
: -pete
: 
: -Original Message-
: From: Ryan Hairyes [mailto:[EMAIL PROTECTED]]
: Sent: Thursday, July 11, 2002 4:34 PM
: To: [EMAIL PROTECTED]
: Subject: mod_perl help
: 
: 
: Hello all,
: 
: I just compiled mod_perl 1.27 with apache 1.3 for Solaris 8.  I used perl
: 5.6.1 and gcc from www.sunfreeware.com.  After I compiled everything and
: tried
: to load the perl module (with LoadModule) I receive the following error:
: 
: 
: Cannot load /usr/local/apache/libexec/libperl.so into server: ld.so.1:
: /usr/local/apache/sbin/httpd: fatal: relocation error: file
: /usr/local/apache/libexec/libperl.so: symbol main: referenced symbol not
: found
: 
: 
: Any idea on what I did wrong?  Thanks.
: 
: Ryan
: 


-- 
Ryan Hairyes
Network/System Administration
Lee County School System
Phone:919.774.6226 x 1252
Voicemail:x 2361



Re: mod_perl help

2002-07-11 Thread Ken Miller

I had this same problem with installing some precompiled packages from
sunfreeware, such as libdb.  My only recommendation is to scrap the
installed packages for anything related to perl, including perl itself.
And note that even though it says that Perl was compiled with GCC, the
options selected may be generally incompatibile with how perl works with
dynamically loaded modules.  This was the conclusion that I same to,
anyways...

Build the stuff yourself.  You'll save yourself a lot of headaches.

BTW, when compiling perl for Solaris 8, you'll need to do this:

/Configure -Dcc='gcc -B/usr/ccs/bin/'

If you don't have the GNU linker/assember installed, then you can skip
the -Dcc option.

Once I built everything myself, I had NO problems.

-klm.

- Original Message -
From: Ryan Hairyes [EMAIL PROTECTED]
To: Peter Werner [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, July 11, 2002 9:45 AM
Subject: RE: mod_perl help


 Thanks for the reply.  Actually ... according to sunfreeware perl5.6.1 was
 compiled with gcc.  Anything else you can think of?

 Thanks again.


 Quoting Peter Werner [EMAIL PROTECTED]:

 : you will have to compile perl from scratch as the sunfreeware perl is
 : compiled with suns compiler not gcc and this causes problems. poke
around
 : sunfreeware.com for the instructions he used to build perl, it is quite
 : simple.
 :
 : -pete
 :
 : -Original Message-
 : From: Ryan Hairyes [mailto:[EMAIL PROTECTED]]
 : Sent: Thursday, July 11, 2002 4:34 PM
 : To: [EMAIL PROTECTED]
 : Subject: mod_perl help
 :
 :
 : Hello all,
 :
 : I just compiled mod_perl 1.27 with apache 1.3 for Solaris 8.  I used
perl
 : 5.6.1 and gcc from www.sunfreeware.com.  After I compiled everything and
 : tried
 : to load the perl module (with LoadModule) I receive the following error:
 :
 :
 : Cannot load /usr/local/apache/libexec/libperl.so into server: ld.so.1:
 : /usr/local/apache/sbin/httpd: fatal: relocation error: file
 : /usr/local/apache/libexec/libperl.so: symbol main: referenced symbol not
 : found
 :
 :
 : Any idea on what I did wrong?  Thanks.
 :
 : Ryan
 :


 --
 Ryan Hairyes
 Network/System Administration
 Lee County School System
 Phone:919.774.6226 x 1252
 Voicemail:x 2361







Re: Any way to list what compile options were used?

2002-07-11 Thread Randy Kobes

On Tue, 9 Jul 2002, Eric L. Brine wrote:

 Is there any easy way to check which options were used to
 compile mod_perl. Or more specifically, is there an easy way
 to check which type handlers a mod_perl build allows, if it
 allows stacked handlers, if it allows method handlers and if
 it allows perl sections? Thanks.

Assuming mod_perl-1, you can use Apache::MyConfig:

use Apache::MyConfig;
print $_ = $Apache::MyConfig::Setup{$_}\n
   for (keys %Apache::MyConfig::Setup);

best regards,
randy kobes





Trouble Making modperl-1.27 on Irix

2002-07-11 Thread Kent, Mr. John

Greetings

Trying to make modperl-1.27 on Irix 6.2

Get:
 Error Output for sanity check 
cd ..; cc -n32  -DIRIX -DMOD_PERL -DUSE_PERL_SSI -D_BSD_TYPES
-D_BSD_TIME -woff 1009,1110,1174,1184,1552 -OPT:Olimit=0
-I/usr/local/include -DLANGUAGE_C -DUSE_HSREGEX -DNO_DL_NEEDED -D_BSD_TYPES
-D_BSD_TIME -woff 1009 1110 1174 1184 1552 -OPT:Olimit=0
-I/usr/local/include -DLANGUAGE_C `./apaci` -I.
-I/users/webuser/perl/lib/5.6.1/IP25-irix/CORE-o helpers/dummy
helpers/dummy.c   -L/usr/local/lib32 -L/usr/local/lib -Wl,-woff,84
/users/webuser/perl/lib/5.6.1/IP25-irix/auto/DynaLoader/DynaLoader.a
-L/users/webuser/perl/lib/5.6.1/IP25-irix/CORE -lperl -lm -lc 
ld32: FATAL 9: I/O error (1110): No such file or directory
cc INTERNAL ERROR:  /usr/lib32/cmplrs/ld32 returned non-zero status 32
*** Error code 1 (bu21)
= End of Error Report =

perl -V gives:
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
osname=irix, osvers=6.2, archname=IP25-irix
uname='irix64 hadley 6.2 03131016 ip25 '
config_args='-Dprefix=/users/webuser/perl'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='cc -n32', ccflags ='-D_BSD_TYPES -D_BSD_TIME -woff
1009,1110,1174,1184,1552 -OPT:Olimit=0 -I/usr/local/include -DLANGUAGE_C',
optimize='-O3',
cppflags='-D_BSD_TYPES -D_BSD_TIME -OPT:Olimit=0 -I/usr/local/include
-DLANGUAGE_C'
ccversion='', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='cc -n32', ldflags =' -L/usr/local/lib32 -L/usr/local/lib
-Wl,-woff,84'
libpth=/usr/local/lib /usr/lib32 /lib32 /lib /usr/lib
libs=-lm -lc
perllibs=-lm -lc
libc=/usr/lib32/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-n32 -shared -L/usr/local/lib32
-L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_LARGE_FILES
  Built under irix
  Compiled at Jul 11 2002 10:41:59
  INC:
/users/webuser/perl/lib/5.6.1/IP25-irix
/users/webuser/perl/lib/5.6.1
/users/webuser/perl/lib/site_perl/5.6.1/IP25-irix
/users/webuser/perl/lib/site_perl/5.6.1
/users/webuser/perl/lib/site_perl

Any suggestions?

Thank you,
John Kent





Re: solaris9+apache2+mod_perl2

2002-07-11 Thread Josh Bernstein

Well I commented the little switch statement what was giving me the 
problems and all seems to be resolved.

In src/modules/mod_perl.c I've commend the following out:

/*switch (rcfg-status) {
  case HTTP_MOVED_TEMPORARILY:
retval = HTTP_MOVED_TEMPORARILY;
break;
}
*/

To my count thats lines 712-717... Just FYI

The only other thing that I've noticed while compiling is that I get 
warings about duplicate definitions... Here is a sample of the Warning

In file included from modperl_perl_includes.h:42,
 from mod_perl.h:5,
 from modperl_interp.c:1:
/usr/local/lib/perl5/5.6.1/sun4-solaris/CORE/perl.h:23:1: warning: 
VOIDUSED redefined
In file included from modperl_perl_includes.h:12,
 from mod_perl.h:5,
 from modperl_interp.c:1:
/usr/local/lib/perl5/5.6.1/sun4-solaris/CORE/config.h:3118:1: warning: 
this is the location of the previous definition




Stas Bekman wrote:

 Josh Bernstein wrote:

 Hey All,

I'm getting this error when I try to make mod_perl2, under solaris 9

 ...

 Any one have any ideas? Oh and I'm running Solaris 9, with Apache 
 2.0.40cvs, it should also be noted that the mod_perl was pulled from 
 CVS on July 8th. Is this just a broken build?


 Try again with the current cvs.



 __
 Stas BekmanJAm_pH -- Just Another mod_perl Hacker
 http://stason.org/ mod_perl Guide --- http://perl.apache.org
 mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
 http://modperlbook.org http://apache.org   http://ticketmaster.com








Working Directory

2002-07-11 Thread Josh Bernstein

After just upgrading to mod_perl2 with Apache2. My current INC path 
includes a . on the end, which should  reference the current working 
directory, and therefore correctly locate include locate in the script's 
working directory. The problem is that the Working Directory is set to 
/. My question is how can I set the working directory to be the 
location of where the script is running. (This would make mod_perl 
correctly locate file that I have included in the running script ie: 
require ./file.pl)  Can this be done from within Apache?

I've tried variations of PerlSetEnv but I can't seem to get it to 
work. I've even read the mod_perl2 user's guide. Thanks for your help..

-Joshua Bernstein
Systems Administrator
College of Engineering
University of Arizona
Tucson, Arizona, USA




POST_MAX and mod_perl ~2.0

2002-07-11 Thread Charles


To alter the allowable size of posted material under mod_perl 1.3x you would
use this:

use Apache::compat;
use Apache::Request;

handler
{
   my $r = shift;
   my $apr = Apache::Request-new($r, POST_MAX=(10*1024));
$apr-args; #get your params here...
}

What is the suggested technique for mod_perl 2.0?

I understand that Apache::Request is replaced with Apache::RequestRec and
Apache::RequestIO and Apache::Request does not compile with a complaint of
Can't locate object method boot via package mod_perl::boot at
C:/Perl/site/lib/Apache/Table.pm line 6.  I seem to be running into a 1024
limit on urlencoded POSTs with my current configuration.


Charles

Apache/2.0.37-dev (Win32) mod_perl/1.99_02-dev Perl/v5.6.1





END subroutine in Apache::Registry

2002-07-11 Thread Jim Schueler

I just read the fine print: Apache::Registry runs BEGIN subroutines just 
once per child process, but END routines run every time a script is run.  
The implication is that an otherwise robust module may behave unexpectedly 
when it's imported by an Apache::Registry script.  Doesn't this cause 
problems for mod_perl users?  There is no mention of this issue in either 
mod_perl_to_cgi or mod_perl_traps.

Admittedly, most of the code in my END subroutines should probably be 
refactored into OO DESTROY subroutines anyways.  But if not burned, I've
been significantly scalded by this belated realization.

I don't see anything on CPAN that can be easily applied to all of the
modules that written.  I'll happily fill that void, but I must be
overlooking the obvious solution.  Can anyone provide any insights?

Jim Schueler
Motor City Interactive



Re: Working Directory

2002-07-11 Thread Stas Bekman

Josh Bernstein wrote:
After just upgrading to mod_perl2 with Apache2. My current @INC path 
 includes a . on the end, which should  reference the current working 
 directory, and therefore correctly locate include locate in the script's 
 working directory. The problem is that the Working Directory is set to 
 /. My question is how can I set the working directory to be the 
 location of where the script is running. (This would make mod_perl 
 correctly locate file that I have included in the running script ie: 
 require ./file.pl)  Can this be done from within Apache?
 
I've tried variations of PerlSetEnv but I can't seem to get it to 
 work. I've even read the mod_perl2 user's guide. Thanks for your help..

chdir is not a thread-safe function, (there is only one CWD per 
application) therefore the new ModPerl::Registry doesn't chdir to the 
dir of the script. We have discussed various workarounds on the dev 
list, but none of them has been applied yet.
http://mathforum.org/discussions/epi-search/modperl-dev.html
(search for 'chdir thread')

If you want to extend @INC to include some extra paths change it during 
the startup.

It's possible that we will have a special version of registry 
(ModPerl::RegistrySafeChdir) which does the right thing but you pay the 
price of a worse performance, read more about it here:
http://www.perl.com/lpt/a/2002/06/11/threads.html

It's also possible that there will be ModPerl::RegistryNonThreaded or 
something like that, which will chdir just like the registry in mod_perl 
1.0 did, which will restrict your code to run only on the prefork mpm. 
The idea that the main ModPerl::Registry should work identically across 
different mpms.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: Working Directory

2002-07-11 Thread Francesc X . Noria

On Thu, 11 Jul 2002 16:56:38 -0700
Josh Bernstein [EMAIL PROTECTED] wrote:

: /. My question is how can I set the working directory to be the 
: location of where the script is running. (This would make mod_perl 
: correctly locate file that I have included in the running script ie: 
: require ./file.pl)  Can this be done from within Apache?

Maybe you could use this trick:

use FindBin qw($Bin);
use lib $Bin;

Take a look at the standard idioms to modify @INC under mod_perl as
well, they are explained here:

http://perl.apache.org/guide/porting.html#_INC_and_mod_perl

-- fxn