Re: mod_perl & mod_php

2002-08-29 Thread Iain Truskett

* Jie Gao ([EMAIL PROTECTED]) [30 Aug 2002 09:49]:
> On Thu, 29 Aug 2002, Jesse Erlbaum wrote:
[...]
> > I notice that you are using mod_perl AND mod_php.
> >
> > I have a general question for the list: Do people often use BOTH of
> > these environments at the same time? It seems to me that there would
> > be little benefit to using both. Am I mistaken?

> It happens when somebody wants to use php and you don't want to use
> it.

We had both for a while --- then I got fed up and rewrote the small
amount of PHP into Mason. I've been happier ever since =)


cheers,
-- 
Iain.



Re: Filehandles

2002-08-29 Thread Stas Bekman

>>I'm using Perl 5.6
> 
>  
> Unless someone with better knowledge pipes up, to the best of my knoweledge 
> there are threading/concurrancy issues with mod_perl 2 and 5.6.1 ... I know 
> that Randy has said in places that eventually the officiall recomdendation 
> for Win32 Apache/mod_perl 2 will be 5.8 because it's theoretically more 
> thread safe.

It's not threoretical, it's practical. There are thread-safety problems 
with perl interpreters in 5.6. It's possible that your code doesn't hit 
them, so 5.6 may work for you, but why taking the risk, use 5.8.0. 
expect mod_perl 2.0 *requiring* 5.8.0 for threaded mpms when it gets 
released.

__
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: Filehandles

2002-08-29 Thread Stas Bekman

> I think he said mod_perl 2 in his inital post. Which I'm not sure really is 
> all that swift with concurrant requests under threaded mpms (Win32 is 
> limited to threaded mpms) ... least nobody seems 100% happy with the 
> threaded mpm performance of mod_perl 2 yet (Stas? Anybody? How's it 
> looking?)

Caution: you are entering unchartered waters.

first of all: you must use 5.8.0 with threaded mpms

perl 5.8.0 internals are thread-safe, so does mod_perl 2.0-dev.

By saying that perl is thread-safe, I mean that operations like push, =, 
/, map, chimp, etc. are thread-safe. Operations that involve system 
calls, may or may not be thread-safe. This varies from OS to OS, and 
even varies for various versions of the same OS.

e.g. localtime() is not thread-safe on platforms where asctime(3) is not 
thread-safe. other problematic ones are readdir(), srand(), ...

there is another important issue. what some people are referring to as: 
thread-locality. Certain functions executed in a single thread affect 
the whole process e.g. if you chdir() in one thread, all other thread 
now see the cwd of that thread that chdir'ed. Other problematic 
functions are umask(), chroot(), %ENV...

Getting back to the Justin's question, it's quite possible that 
thread-safety problems kick in. It could be that flock is not 
thread-safe. But I think the real problem is with chdir(), because 
Apache::Registry chdir()s to the dir of the script. Stop using 
Apache::Registry and start using ModPerl::Registry, which doesn't 
chdir(). Of course you cannot do any operations with relative path 
anymore. Arthur Bergman is working on some solutions for chdir(), but 
nothing was released so far. So you will have to wait or help Arthur to 
finish his work.

So first try using ModPerl:Registry, which I expect will resolve the 
issue. If that doesn't help, please supply a *short* script that 
reproduces the problem. Which of course may not exhibit the same 
behavior on a different platform, but at least we can do some sanity check.

__
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: Redirecting through proxy

2002-08-29 Thread Ask Bjoern Hansen

On Thu, 29 Aug 2002, Abd El-Hamid Mohammed wrote:

> RewriteEngine on
> RewriteRule ^/abc(.*) http://abc.use-trade.com:8080$1 [P]
> ProxyPass /abc/   http://abc.use-trade.com:8080/
> ProxyPassReverse /abc/ http://abc.use-trade.com:8080/
>
> and it works great for redirecting http://www.mydomain.com/abc/
> but it fails with http://www.mydomain.com/abc "without the trailing slash"
> as the first page is the only page that displays correctly,

Because then it proxies http://www.mydomain.com/abc to
http://abc.use-trade.com:8080 - you need to add a rewrite rule in
the proxy for redirecting /abc to /abc/

  RewriteRule ^/abc /abc/ [R,L]


 - ask

-- 
ask bjoern hansen, http://www.askbjoernhansen.com/ !try; do();




Re: Filehandles

2002-08-29 Thread Randy Kobes

On Thu, 29 Aug 2002, Justin Luster wrote:

> The stress tool that I'm using is from Microsoft and is a free download.  It
> is called Web Application Stress.  There is a setting in this tool called
> Concurrent Connections (threads).  As I mentioned before I am able to do
> this no problem under regular CGI with 10 concurrent users but when I run
> mod_perl all heck breaks loose.

I've tried a simple registry script that uses flock() (on WinXP),
as well as one that just prints out the environment variables,
using apache-2.0.40 and a recent cvs mod_perl-2 build. Using
ApacheBench as
   ab -n ddd http://localhost/perl/script_name
(where 'ddd' is the number of requests to do), on my system, when
ddd exceeds about 1500 with perl-5.6.1, the tests hang, but
things are OK in this realm with perl-5.8. So this problem may
not have so much to do with flock(), but perhaps more to do with
threading under perl-5.6.1 on Win32.

If you're interested in comparing for your particular script, 
there's a perl-5.8/Apache/mod_perl binary, perl-5.8-win32-bin.tar.gz,
at ftp://theoryx5.uwinnipeg.ca/pub/other/ - installation
instructions are in the associated .readme file. 

-- 
best regards,
randy kobes




Re: base.pm seems to fail a check

2002-08-29 Thread Stas Bekman

Stefano wrote:
> Hello,
> 
> I was not able to find anything similar in list archives,
> 
> Trying to :
> 
>   use base Ima::DBI
> 
> in mod_perl (also in a  block of config)
> a cought this trace:
> 
>  Uncaught exception from user code:
>   Can't locate DBI/db.pm in @INC (@INC contains: [...]
> 
> 
> This happens because Ima::DBI 'uses' base DBI::db at line 645 of his
> source code and DBI::db is not a package available from @INC but
> directly from the DBI namespace.
> 
> 
> In these cases base.pm (line 42) steps into an unless{} block
> to by-pass 'Can't locate ...' exceptions rised from inside base.pm
> itself:
> 
>   eval "require $base";
> # Only ignore "Can't locate" errors from our eval require.
> # Other fatal errors (syntax etc) must be reported.
> --> die if $@ && $@ !~ /^Can't locate .*? at \(eval /; #'# <--
> 
> 
> Working outside mod_perl (i.e. in a command line perl program) no
> problem jumps out because the above arrowed 'die' correctly matches
> its regexp (the exception message starts at the beginning of the line).
> 
>>From inside mod_perl we have an unmatch so base croaks with the complete
> backtrace and httpd doesn't start (if I pre-use the module) or send
> 500 - Server Error (in a runtime require).
> 
> With the follow substitution it works, but I'm sure there is a better
> and more correct way to behave with.
> 
> In base.pm :
> 
> 42: <<< die if $@ && $@ !~ /^Can't locate .*? at \(eval /; #'#
> 42: >>> die if $@ && $@ !~ /Can't locate .*? at \(eval /; #'#

Obviously, base.pm should flex it's regex, but this is not an option 
with released perls.

I can think of 2 things:

1. override the problematic subroutine in base.pm so it'll do the right 
thing.

2. preload the module that you pass to 'use base' before loading the 
module that includes 'use base ...'

in any case, please check whether the problem persists in the bleed-perl 
(i.e. 5.9.0-dev) and if so, make sure it gets fixed, by sending a 
bugreport to p5p.


__
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: mod_perl & mod_php

2002-08-29 Thread Jesse Erlbaum

Hey Andy --

> I'm using both at work because we're slowly migrating from PHP to Perl.

That reminds me of a project I started last year.  We were charged with
assuming responsibility for a website built on ColdFusion.  We moved the
site from Solaris/Netscape-Commerce to Linux/Apache-mod_perl.  Eventually,
we intend to strip out as much of that ColdFusion nastiness as we can and
replace it with Perl.

It's great to be able to stack environments.  The concurrent environments
(ColdFusion coexisting with mod_perl) is letting us do so over time.

TTYL,

-Jesse-


--

  Jesse Erlbaum
  The Erlbaum Group
  [EMAIL PROTECTED]
  Phone: 212-684-6161
  Fax: 212-684-6226








Re: mod_perl & mod_php

2002-08-29 Thread Iain Truskett

* Andy Lester ([EMAIL PROTECTED]) [30 Aug 2002 10:33]:

[...]
> PHP is better than Perl in some cases, I've found. If you're
> predominantly templating and don't want to futz around with Mason or
> TT or whatever, PHP will do a fine job.

I'm naturally biased toward Perl, and generally the PHP I've seen sucks
(written by a non-programmer futzing around with third-hand code).

Is there good PHP code out there?

(I don't want to get into a war over PHP vs Perl, so please don't start
one.)


cheers,
-- 
Iain.



Re: mod_perl & mod_php

2002-08-29 Thread Andy Lester

> I have a general question for the list:  Do people often use BOTH of these
> environments at the same time?  It seems to me that there would be little
> benefit to using both.  Am I mistaken?

I'm using both at work because we're slowly migrating from PHP to Perl.

PHP is better than Perl in some cases, I've found.  If you're
predominantly templating and don't want to futz around with Mason or TT
or whatever, PHP will do a fine job.

xoxo,
Andy

-- 
'Andy Lester[EMAIL PROTECTED]
 Programmer/author  petdance.com
 Daddy  parsley.org/quinn   Jk'=~/.+/s;print((split//,$&)
[unpack'C*',"n2]3%+>\"34.'%&.'^%4+!o.'"])



Re: mod_perl & mod_php

2002-08-29 Thread Ufuk Yuzereroglu

I just HAVE to use it since I am moving and already working environemtn to a
new platform. I would neither use both if I were given the chance

Ufuk

- Original Message -
From: "Jesse Erlbaum" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 29, 2002 4:47 PM
Subject: mod_perl & mod_php


> Hi Ufuk --
>
> > Well what you said is true. I actuallay had perl 5.6.1 but I
> > tried to use an
> > old httpd executable compiled with 5.6.0. Adding directories to @INC
would
> > help me but each time before I would start httpd, I'd have to do that.
> > Instead I recompiled mod_perl/apache/ssl/php bundle. And that helped
(for
> > sure)
>
>
> I notice that you are using mod_perl AND mod_php.
>
> I have a general question for the list:  Do people often use BOTH of these
> environments at the same time?  It seems to me that there would be little
> benefit to using both.  Am I mistaken?
>
>
> TTYL,
>
> -Jesse-
>
>
> --
>
>   Jesse Erlbaum
>   The Erlbaum Group
>   [EMAIL PROTECTED]
>   Phone: 212-684-6161
>   Fax: 212-684-6226
>
>
>
>
>





Re: mod_perl & mod_php

2002-08-29 Thread Jie Gao

On Thu, 29 Aug 2002, Jesse Erlbaum wrote:

> > Well what you said is true. I actuallay had perl 5.6.1 but I
> > tried to use an
> > old httpd executable compiled with 5.6.0. Adding directories to @INC would
> > help me but each time before I would start httpd, I'd have to do that.
> > Instead I recompiled mod_perl/apache/ssl/php bundle. And that helped (for
> > sure)
>
>
> I notice that you are using mod_perl AND mod_php.
>
> I have a general question for the list:  Do people often use BOTH of these
> environments at the same time?  It seems to me that there would be little
> benefit to using both.  Am I mistaken?

It happens when somebody wants to use php and you don't want to use it.



Jie




mod_perl & mod_php

2002-08-29 Thread Jesse Erlbaum

Hi Ufuk --

> Well what you said is true. I actuallay had perl 5.6.1 but I
> tried to use an
> old httpd executable compiled with 5.6.0. Adding directories to @INC would
> help me but each time before I would start httpd, I'd have to do that.
> Instead I recompiled mod_perl/apache/ssl/php bundle. And that helped (for
> sure)


I notice that you are using mod_perl AND mod_php.

I have a general question for the list:  Do people often use BOTH of these
environments at the same time?  It seems to me that there would be little
benefit to using both.  Am I mistaken?


TTYL,

-Jesse-


--

  Jesse Erlbaum
  The Erlbaum Group
  [EMAIL PROTECTED]
  Phone: 212-684-6161
  Fax: 212-684-6226





Re: ANNOUNCEMENT: HTML::Template 2.6

2002-08-29 Thread simran

Excellent... can't wait to try it out... thanks Sam. 

ps: You did not mention anything about adding filter args support... i
though that you were going to put in some sort of a feature to support
filter arguments (for which Cees sent a patch...) - is this still on the
agenda? 


On Sat, 2002-08-31 at 07:13, Sam Tregar wrote:
> CHANGES
> 
>- New Feature: HTML::Template will combine HTML_TEMPLATE_ROOT
>   environment variable and path option if both are
>   available. (Jesse Erlbaum)
> 
>- New Feature: __counter__ variable now available when
>   loop_context_vars is set (Simran Gambhir)
> 
>- New Feature: The default attribute allows you to specify
>   defaults for  tags.
> 
>- Bug Fix: fixed parser to reject s with no names.
>   (crazyinsomniac)
> 
>- Doc Fix: fixed documentation to correctly describe the
>   interaction of case_sensitive and loop_context_vars.
>   (Peter Claus Lamprecht)
> 
>- Doc Fix: updated mailing-list information to reflect move from
>   vm.com to sourceforge.net
> 
> DESCRIPTION
> 
> This module attempts to make using HTML templates simple and natural. It
> extends standard HTML with a few new HTML-esque tags - ,
> , , ,  and .
> The file written with HTML and these new tags is called a template. It
> is usually saved separate from your script - possibly even created by
> someone else! Using this module you fill in the values for the
> variables, loops and branches declared in the template. This allows you
> to separate design - the HTML - from the data, which you generate in the
> Perl script.
> 
> This module is licensed under the GPL. See the LICENSE section below for
> more details.
> 
> TUTORIAL
> 
> If you're new to HTML::Template, I suggest you start with the
> introductory article available on the HTML::Template website:
> 
>http://html-template.sourceforge.net
> 
> AVAILABILITY
> 
> This module is available on SourceForge.  Download it at:
> 
>http://html-template.sourceforge.net
> 
> The module is also available on CPAN.  You can get it using
> CPAN.pm or go to:
> 
>http://www.cpan.org/authors/id/S/SA/SAMTREGAR/
> 
> CONTACT INFO
> 
> This module was written by Sam Tregar ([EMAIL PROTECTED]). You can
> join the HTML::Template mailing-list by visiting:
> 
>   http://lists.sourceforge.net/lists/listinfo/html-template-users
> 
> 
> 
> 
> 






Re: @INC

2002-08-29 Thread Ufuk Yuzereroglu

Well what you said is true. I actuallay had perl 5.6.1 but I tried to use an
old httpd executable compiled with 5.6.0. Adding directories to @INC would
help me but each time before I would start httpd, I'd have to do that.
Instead I recompiled mod_perl/apache/ssl/php bundle. And that helped (for
sure)

Ufuk

- Original Message -
From: "Jesse Erlbaum" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 29, 2002 4:24 PM
Subject: RE: @INC


> Hi Darren --
>
> > Can't you use the perl startup file to re-write the INC array?
> >
> > I thought I'd seen a post along those lines a while back.
>
>
> Sure you can.  I use PERL5LIB and an "unshift(@INC, ...)" all the time to
> push an extra path at server startup.
>
> However, that's just the tip of Ufuk's problem.  He is reporting that
> mod_perl is compiled with Perl 5.6.0, but he wants to have access to 5.6.1
> libraries.  There are pretty big differences between 5.6.0 and 5.6.1.  If
> all he wanted to do was access modules in another path that would be easy.
> I suspect that even if he got that working he would have a host of
> incompatibilities which would necessitate a recompile, anyway.
>
> TTYL,
>
> -Jesse-
>
>
> --
>
>   Jesse Erlbaum
>   The Erlbaum Group
>   [EMAIL PROTECTED]
>   Phone: 212-684-6161
>   Fax: 212-684-6226
>
>
>
>
>





RE: @INC

2002-08-29 Thread Jesse Erlbaum

Hi Darren --

> Can't you use the perl startup file to re-write the INC array?
>
> I thought I'd seen a post along those lines a while back.


Sure you can.  I use PERL5LIB and an "unshift(@INC, ...)" all the time to
push an extra path at server startup.

However, that's just the tip of Ufuk's problem.  He is reporting that
mod_perl is compiled with Perl 5.6.0, but he wants to have access to 5.6.1
libraries.  There are pretty big differences between 5.6.0 and 5.6.1.  If
all he wanted to do was access modules in another path that would be easy.
I suspect that even if he got that working he would have a host of
incompatibilities which would necessitate a recompile, anyway.

TTYL,

-Jesse-


--

  Jesse Erlbaum
  The Erlbaum Group
  [EMAIL PROTECTED]
  Phone: 212-684-6161
  Fax: 212-684-6226





RE: @INC

2002-08-29 Thread Darren Ward

Can't you use the perl startup file to re-write the INC array?

I thought I'd seen a post along those lines a while back.

Darren

-Original Message-
From: Jesse Erlbaum [mailto:[EMAIL PROTECTED]]
Sent: Friday, 30 August 2002 6:29 AM
To: [EMAIL PROTECTED]
Subject: RE: @INC


Hi Ufuk --

>How can I have @INC array contain the directory names 
> /usr/lib/perl/5.6.1 ... instead of /usr/lib/5.6.0. 
> Apache does not run beacuse of the value of @INC.

You need to recompile Apache/mod_perl.

-Jesse-



modperl 1.27 blues

2002-08-29 Thread Jeff Chen

Hi, I recently ran into a problem which has puzzled me about Perl
compilation and installation.  I would appreciate some help in
understanding this.

I run Redhat 7.2, which comes with perl-5.6.0-17.  I was able to
compile and install 5.6.1 and 5.8.0 all seemingly without problems. 
However, I ran into problems when I tried to get mod_perl 1.27 working
on my machine.  It compiles but does not pass the tainting test when I
use either the 5.6.1 or 5.8.0 that I compiled and installed myself. 
When I revert back to using 5.6.0, I am able to pass the mod_perl self
tests.

I would like to use a more current perl than 5.6.0.  But try as I
might, I keep getting stuck on failing the tainting test.  Can someone
explain to me what is happening and help me get past this?  Is this a
simple as file permission problem?  I compile perl as a regular user
and only run "make install" as root.  This is most confusing.

Thanks,
Jeff



Re: Filehandles

2002-08-29 Thread Perrin Harkins

Chris wrote:
> I think he said mod_perl 2 in his inital post.

Oops, you're right, I totally missed that.  Sorry Justin.

- Perrin




Re: Filehandles

2002-08-29 Thread Chris

> Justin Luster wrote:
>> The stress tool that I'm using is from Microsoft and is a free
>> download.
> 
> That isn't quite what I asked.  Which version of mod_perl are you
> using?
> 
>> There is a setting in this tool called
>> Concurrent Connections (threads).
> 
> Regardless, mod_perl 1.x does not support multiple concurrent users on 
> Windows.  It will serialize those requests.
> 
> - Perrin

I think he said mod_perl 2 in his inital post. Which I'm not sure really is 
all that swift with concurrant requests under threaded mpms (Win32 is 
limited to threaded mpms) ... least nobody seems 100% happy with the 
threaded mpm performance of mod_perl 2 yet (Stas? Anybody? How's it 
looking?)

-Chris





ANNOUNCEMENT: HTML::Template::Expr 0.04

2002-08-29 Thread Sam Tregar

CHANGES

- Fixed parser to recognize negative numbers.  Thanks to Fran
  Fabrizio for the report.

- Fixed parser to allow for HTML-comment style tags.  Thanks to
  Stuhlpfarrer Gerhard for the spot.

- Updated mailing-list information to reflect move from vm.com to
  sourceforge.net

DESCRIPTION

This module provides an extension to HTML::Template which allows
expressions in the template syntax.  This is purely an addition - all
the normal HTML::Template options, syntax and behaviors will still
work.

Expression support includes comparisons, math operations, string
operations and a mechanism to allow you add your own functions at
runtime.


AVAILABILITY

This module is available on SourceForge.  Download it at:

  http://html-template.sourceforge.net

The module is also available on CPAN.  You can get it using CPAN.pm or
go to:

  http://www.cpan.org/authors/id/S/SA/SAMTREGAR/


CONTACT INFO

This module was written by Sam Tregar ([EMAIL PROTECTED]). You can
join the HTML::Template mailing-list by visiting:

  http://lists.sourceforge.net/lists/listinfo/html-template-users





ANNOUNCEMENT: HTML::Template::JIT 0.04

2002-08-29 Thread Sam Tregar

CHANGES

- Added support for HTML::Template 2.6's new DEFAULT attribute.

- Added support for HTML::Template 2.6's new __counter__ variable.

- Updated mailing-list information to reflect move from vm.com
  to sourceforge.net

- Fixed bug where tmpl_var's with the escape attribute would
  cause a crash if not set with a value.


DESCRIPTION

This module provides a just-in-time compiler for HTML::Template.
Templates are compiled into native machine code using Inline::C.  The
compiled code is then stored to disk and reused on subsequent calls.

HTML::Template::JIT is up to 8 times as fast as HTML::Template using
caching.


NOTE

This module is not feature-complete.  Be sure to read the CAVEATS
section in the documentation before using!


AVAILABILITY

This module is available on SourceForge.  Download it at:

  http://html-template.sourceforge.net

The module is also available on CPAN.  You can get it using CPAN.pm or
go to:

  http://www.cpan.org/authors/id/S/SA/SAMTREGAR/


CONTACT INFO

This module was written by Sam Tregar ([EMAIL PROTECTED]). You can
join the HTML::Template mailing-list by visiting:

  http://lists.sourceforge.net/lists/listinfo/html-template-users






ANNOUNCEMENT: HTML::Template 2.6

2002-08-29 Thread Sam Tregar

CHANGES

   - New Feature: HTML::Template will combine HTML_TEMPLATE_ROOT
  environment variable and path option if both are
  available. (Jesse Erlbaum)

   - New Feature: __counter__ variable now available when
  loop_context_vars is set (Simran Gambhir)

   - New Feature: The default attribute allows you to specify
  defaults for  tags.

   - Bug Fix: fixed parser to reject s with no names.
  (crazyinsomniac)

   - Doc Fix: fixed documentation to correctly describe the
  interaction of case_sensitive and loop_context_vars.
  (Peter Claus Lamprecht)

   - Doc Fix: updated mailing-list information to reflect move from
  vm.com to sourceforge.net

DESCRIPTION

This module attempts to make using HTML templates simple and natural. It
extends standard HTML with a few new HTML-esque tags - ,
, , ,  and .
The file written with HTML and these new tags is called a template. It
is usually saved separate from your script - possibly even created by
someone else! Using this module you fill in the values for the
variables, loops and branches declared in the template. This allows you
to separate design - the HTML - from the data, which you generate in the
Perl script.

This module is licensed under the GPL. See the LICENSE section below for
more details.

TUTORIAL

If you're new to HTML::Template, I suggest you start with the
introductory article available on the HTML::Template website:

   http://html-template.sourceforge.net

AVAILABILITY

This module is available on SourceForge.  Download it at:

   http://html-template.sourceforge.net

The module is also available on CPAN.  You can get it using
CPAN.pm or go to:

   http://www.cpan.org/authors/id/S/SA/SAMTREGAR/

CONTACT INFO

This module was written by Sam Tregar ([EMAIL PROTECTED]). You can
join the HTML::Template mailing-list by visiting:

  http://lists.sourceforge.net/lists/listinfo/html-template-users






Re: Filehandles

2002-08-29 Thread Perrin Harkins

Justin Luster wrote:
> The stress tool that I'm using is from Microsoft and is a free download.

That isn't quite what I asked.  Which version of mod_perl are you using?

> There is a setting in this tool called
> Concurrent Connections (threads).

Regardless, mod_perl 1.x does not support multiple concurrent users on 
Windows.  It will serialize those requests.

- Perrin




Re: Filehandles

2002-08-29 Thread Chris

Didn't mean to take this off list if I had. Heh.

> I'm using Perl 5.6
 
Unless someone with better knowledge pipes up, to the best of my knoweledge 
there are threading/concurrancy issues with mod_perl 2 and 5.6.1 ... I know 
that Randy has said in places that eventually the officiall recomdendation 
for Win32 Apache/mod_perl 2 will be 5.8 because it's theoretically more 
thread safe.

I've never used either 5.8 (Activestate hasn't moved to it yet) nor 
mod_perl 2 (isn't finished yet, and I have a hard enough time supporting 
mod_perl 1) so all of this is based off hersay and rumor.


-Chris


> - Original Message -
> From: "Chris" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, August 29, 2002 1:21 PM
> Subject: Re: Filehandles
> 
> 
>> > Thanks for responding so quickly.
>> >
>> > flock does work under Windows 2000 and above.
>> >
>> > The load tester that I'm using works fine with my script outside of
>> > mod_perl.  My script works inside of mod_perl with only one
>> > concurrent user. When multiple concurrent users began hitting the
>> > script under mod_perl, using Apache::Registry or Apache::RunPerl all
>> > heck breaks loose.  It seems that the file locking breaks down. 
>> > Another thing that is totally bizarre is that stuff is being written
>> > to all kinds of files that I'm not writing to. Even my scripts
>> > themselves will sometimes have text appended to the end of them. 
>> > Another problem is that Apache will give me an error message saying
>> > that it is trying to write to memory that is locked.
>> >
>>
>> Could this be a threading issue? Are you using 5.6.1 or 5.8 with
>> mod_perl 2? I know that mod_perl 2 is far from ready for primetime
>> especially under the threaded mpm's (which is what Win32 is forced to
>> use). I use XP to develop for a Linux mod_perl 1 architecture so I'm
>> raipdly getting out of my depth, but this sounds like the place to
>> look.
>>
>>
>> I've never heard of a Win32 specific mod_perl list ...  :(
>>
>> -Chris


-Chris





Re: Filehandles

2002-08-29 Thread Justin Luster

The stress tool that I'm using is from Microsoft and is a free download.  It
is called Web Application Stress.  There is a setting in this tool called
Concurrent Connections (threads).  As I mentioned before I am able to do
this no problem under regular CGI with 10 concurrent users but when I run
mod_perl all heck breaks loose.

- Original Message -
From: "Perrin Harkins" <[EMAIL PROTECTED]>
To: "Justin Luster" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, August 29, 2002 1:44 PM
Subject: Re: Filehandles


> Justin Luster wrote:
> > The load tester that I'm using works fine with my script outside of
> > mod_perl.
>
> Does it work when running them concurrently under CGI?
>
> > When multiple concurrent users began hitting the script under mod_perl,
> > using Apache::Registry or Apache::RunPerl all heck breaks loose.
>
> Hmmm, which version of mod_perl are you using?  If you're using 2.x, I
> can't help you there since I've never tried it on Win32.  Maybe Randy
> will have some ideas.  If you have 1.x, there is no concurreny under
> mod_perl -- requests are serialized.
>
> - Perrin
>
>
>




Re: Filehandles

2002-08-29 Thread Perrin Harkins

Justin Luster wrote:
> The load tester that I'm using works fine with my script outside of
> mod_perl.

Does it work when running them concurrently under CGI?

> When multiple concurrent users began hitting the script under mod_perl,
> using Apache::Registry or Apache::RunPerl all heck breaks loose.

Hmmm, which version of mod_perl are you using?  If you're using 2.x, I 
can't help you there since I've never tried it on Win32.  Maybe Randy 
will have some ideas.  If you have 1.x, there is no concurreny under 
mod_perl -- requests are serialized.

- Perrin




Re: Filehandles

2002-08-29 Thread Perrin Harkins

Chris wrote:
> XP is based on the NT Kernel, and should have a working flock. I believe In 
> recent versions of 5.6.1 flock() is emulated on the 9x kernel as well. 
> However this doesn't mean mod_perl supports it

It does actually, since mod_perl is Perl.  Thanks for the flock 
clarification.

- Perrin




Re: Filehandles

2002-08-29 Thread Chris

> Thanks for responding so quickly.
> 
> flock does work under Windows 2000 and above.
> 
> The load tester that I'm using works fine with my script outside of
> mod_perl.  My script works inside of mod_perl with only one concurrent
> user. When multiple concurrent users began hitting the script under
> mod_perl, using Apache::Registry or Apache::RunPerl all heck breaks
> loose.  It seems that the file locking breaks down.  Another thing that
> is totally bizarre is that stuff is being written to all kinds of files
> that I'm not writing to. Even my scripts themselves will sometimes have
> text appended to the end of them.  Another problem is that Apache will
> give me an error message saying that it is trying to write to memory
> that is locked.
> 

Could this be a threading issue? Are you using 5.6.1 or 5.8 with mod_perl 
2? I know that mod_perl 2 is far from ready for primetime especially under 
the threaded mpm's (which is what Win32 is forced to use). I use XP to 
develop for a Linux mod_perl 1 architecture so I'm raipdly getting out of 
my depth, but this sounds like the place to look. 


I've never heard of a Win32 specific mod_perl list ...  :(

-Chris





RE: @INC

2002-08-29 Thread Jesse Erlbaum

Hi Ufuk --

>How can I have @INC array contain the directory names 
> /usr/lib/perl/5.6.1 ... instead of /usr/lib/5.6.0. 
> Apache does not run beacuse of the value of @INC.

You need to recompile Apache/mod_perl.

-Jesse-




Re: Filehandles

2002-08-29 Thread Chris

> Personally I would suspect Windows in this case.  I don't know about
> XP,  but Windows 95/98/ME did not have a working flock.  If XP is based
> on  the NT code, it may not have that problem.  Even so, I would try
> testing  that first, or maybe asking about it on Win32 perl mailing
> list.

XP is based on the NT Kernel, and should have a working flock. I believe In 
recent versions of 5.6.1 flock() is emulated on the 9x kernel as well. 
However this doesn't mean mod_perl supports it, but I'm pretty sure (98%?)
Activestate and Win32 perl does. I've never flock-ed in my life (never had 
a need) but I have been tracking Perl and Apache under Win32 for quite a 
while so take all this with a grain of salt.

-Chris




@INC

2002-08-29 Thread Ufuk Yuzereroglu



How can I have @INC array contain the directory 
names /usr/lib/perl/5.6.1 ... instead of /usr/lib/5.6.0. Apache does not run 
beacuse of the value of @INC.
 
UY


Re: Filehandles

2002-08-29 Thread Justin Luster

Thanks for responding so quickly.

flock does work under Windows 2000 and above.

The load tester that I'm using works fine with my script outside of
mod_perl.  My script works inside of mod_perl with only one concurrent user.
When multiple concurrent users began hitting the script under mod_perl,
using Apache::Registry or Apache::RunPerl all heck breaks loose.  It seems
that the file locking breaks down.  Another thing that is totally bizarre is
that stuff is being written to all kinds of files that I'm not writing to.
Even my scripts themselves will sometimes have text appended to the end of
them.  Another problem is that Apache will give me an error message saying
that it is trying to write to memory that is locked.

Do you have any idea where I can go from here?

What it the address of the Win32 mod_perl mailing list?

Thanks.

- Original Message -
From: "Perrin Harkins" <[EMAIL PROTECTED]>
To: "Justin Luster" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, August 29, 2002 12:11 PM
Subject: Re: Filehandles


> Justin Luster wrote:
> > Does anyone know anything about flock and mod_perl?
>
> Yes.  There is no problem with flock and mod_perl.  However, if you were
> to open a filehandle in startup.pl and then use that same filehandle
> after forking, that could be a problem.
>
> Personally I would suspect Windows in this case.  I don't know about XP,
> but Windows 95/98/ME did not have a working flock.  If XP is based on
> the NT code, it may not have that problem.  Even so, I would try testing
> that first, or maybe asking about it on Win32 perl mailing list.
>
> - Perrin
>
>
>
>




Re: Filehandles

2002-08-29 Thread Perrin Harkins

Justin Luster wrote:
> Does anyone know anything about flock and mod_perl?

Yes.  There is no problem with flock and mod_perl.  However, if you were 
to open a filehandle in startup.pl and then use that same filehandle 
after forking, that could be a problem.

Personally I would suspect Windows in this case.  I don't know about XP, 
but Windows 95/98/ME did not have a working flock.  If XP is based on 
the NT code, it may not have that problem.  Even so, I would try testing 
that first, or maybe asking about it on Win32 perl mailing list.

- Perrin





Re: Redirecting through proxy

2002-08-29 Thread Igor Sysoev

On Thu, 29 Aug 2002, Abd El-Hamid Mohammed wrote:

>Anybody can tell me how to redirect
> http://www.mydomain.com/abc To http://abc.mydomain.com:8080
> 
> I had used the following
> 
> RewriteEngine on
> RewriteRule ^/abc(.*) http://abc.use-trade.com:8080$1 [P]
> ProxyPass /abc/   http://abc.use-trade.com:8080/
> ProxyPassReverse /abc/ http://abc.use-trade.com:8080/
> 
> and it works great for redirecting http://www.mydomain.com/abc/
> but it fails with http://www.mydomain.com/abc "without the trailing slash"
> as the first page is the only page that displays correctly, Any link in it
> is prefixed with http://www.mydomain.com/ which is wrong as it should be
> http://www.mydomain.com/abc/
> 
> Can anyone tells me how to solve it.

You can add
RewriteRule ^/abc$ http://abc.use-trade.com/abc/ [R]
to send redirect to browser from /abc to /abc/
as mod_dir does for any directory without trailing slash.

BTW, mod_accel send such redirection automatically, i.e if you have

AccelPass  /one/http://backend/two/

then if browser ask /one it will get redirect to /one/.

Igor Sysoev
http://sysoev.ru




Re: [mp-1.99_05] segfault modperl_pcw.c:52 ap_pcw_walk_files_config dconf->sec_file is NULL

2002-08-29 Thread Phil Lobbes

Hi Doug,

You asked:

> which one is NULL dconf or dconf->sec_file?  if dconf->sec_file
> should never be NULL.  i'm not sure if it is possible for dconf
> itself to be NULL.  do you have some example configuration that
> causes the problem?

Well, dconf was NOT NULL, but sec_file was NULL:

(gdb) print *dconf
$6 = {d = 0x0, d_components = 0, opts = 31 '\037', opts_add = 0 '\000',
  opts_remove = 0 '\000', override = 63 '?', ap_default_type = 0x0,
  satisfy = 2, ap_auth_type = 0x0, ap_auth_name = 0x0, ap_requires = 0x0,
  response_code_strings = 0x0, hostname_lookups = 0, do_rfc1413 = -2,
  content_md5 = -2, use_canonical_name = 3, d_is_fnmatch = 0,
  add_default_charset = 2, add_default_charset_name = 0x4000c848 "iso-8859-1",
  limit_cpu = 0x0, limit_mem = 0x0, limit_req_body = -4294967296,
  limit_xml_body = 0, server_signature = 1074161768, loglevel = 0,
  sec_file = 0x0, r = 0x0, mime_type = 0x0, handler = 0x0,
  output_filters = 0x3 "", input_filters = 0x0, accept_path_info = 0,
  ct_output_filters = 0x0, etag_bits = 0, etag_add = 2, etag_remove = 0,
  enable_mmap = 1073910448}

How did this happen, you ask?  I was just running 'make test'...

I've got to say that for some reason I've had nothing but trouble with
HP... is the recommended path to use gcc or to use HP's ansic compiler
or ?  I wish I knew...

I've got a custom perl module built on top of a threaded library that
seems to choke under apache 1, mod_perl and it seems to be related to
signals (from my best guesses).  I'm out on a mini vacation right now
but I'll provide details next week.

If you have any recommendations for things to try please let me know
I'm willing to try any combination:

* apache 1 or 2
* perl 5.6.1 or 5.8.0

Phil

Stack trace For your reference...

gdb /opt/apache2/2.0.40_debug/bin/httpd -core  ... (wd: 
~/sw/src/apache/mod_perl-1.99_05)
where
#0  0xda26ffa8 in ap_pcw_walk_files_config (pconf=0x400292b0, s=0x4002c020,
dconf=0x400667f0, modp=0x7f68b7e8,
dir_cb=0x7f685122 , data=0x0)
at modperl_pcw.c:52
#1  0xda2703ec in ap_pcw_walk_config (pconf=0x400292b0, s=0x4002c020,
modp=0x7f68b7e8, data=0x0, dir_cb=0x7f685122 ,
srv_cb=0x7f68512a ) at modperl_pcw.c:106
#2  0xda26f514 in modperl_mgv_hash_handlers (p=0x400292b0, s=0x4002c020)
at modperl_mgv.c:470
#3  0xda259948 in modperl_hook_post_config (pconf=0x400292b0, plog=0x40061470,
ptemp=0x40063480, s=0x4002c020) at mod_perl.c:415
#4  0x60874 in ap_run_post_config (pconf=0x400292b0, plog=0x40061470,
ptemp=0x40063480, s=0x4002c020) at config.c:130
#5  0x67cd0 in main (argc=6, argv=0x7f7f05a4) at main.c:592


> > Hi,
> > 
> > I just recently joined the mail list and did a quick check but didn't
> > seen any report of this problem:
> > 
> > Versions: perl-5.6.1   (non-threaded)
> >   apache-2.0.40(mpm-prefork)
> >   mod_perl-1.99_05
> > OS:   HPUX 11
> > Compiler: gcc version 3.2 20020708 (experimental)
> > 
> > I don't know the code well enough to know what data/values are
> > expected to be found in dconf, but here is a possible work around
> > (most likely less than ideal solution) in the affected portion of C
> > code (src/modules/perl/modperl_pcw.c):
> > 
> > +if( (! dconf) || (! dconf->sec_file) )
> > +return;
> > ap_conf_vector_t **dirs = (ap_conf_vector_t **)dconf->sec_file->elts;
[ ... question/text moved to top ...]



Redirecting through proxy

2002-08-29 Thread Abd El-Hamid Mohammed

Hi,
   Anybody can tell me how to redirect
http://www.mydomain.com/abc To http://abc.mydomain.com:8080

I had used the following

RewriteEngine on
RewriteRule ^/abc(.*) http://abc.use-trade.com:8080$1 [P]
ProxyPass /abc/   http://abc.use-trade.com:8080/
ProxyPassReverse /abc/ http://abc.use-trade.com:8080/

and it works great for redirecting http://www.mydomain.com/abc/
but it fails with http://www.mydomain.com/abc "without the trailing slash"
as the first page is the only page that displays correctly, Any link in it
is prefixed with http://www.mydomain.com/ which is wrong as it should be
http://www.mydomain.com/abc/

Can anyone tells me how to solve it.

Abd El-Hameed




Re: Segmentation Fault with mod_php and mod_perl

2002-08-29 Thread Alex Lee

Doug and Stas,

  I try to compile PHP with largefile support with no luck so I follow 
Doug's advice and rebuild mod_perl with PERL_USELARGEFILES=0. This solves 
the problem. Thanks a lot for helping me out!

  Alex

>From: Doug MacEachern <[EMAIL PROTECTED]>
>To: Alex Lee <[EMAIL PROTECTED]>
>CC: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
>Subject: Re: Segmentation Fault with mod_php and mod_perl
>Date: Wed, 28 Aug 2002 19:09:07 -0700 (PDT)
>
>On Wed, 28 Aug 2002, Alex Lee wrote:
>
> > Stas,
> >
> > I am sorry, I got too excited when I saw the segmentation fault.
> > Here is the output of 'bt':
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x75a10 in php_xbithack_handler (r=0x927840) at mod_php4.c:778
> > 778 if (!(r->finfo.st_mode & S_IXUSR)) {
>
>99.99% sure this is largefiles related, as somebody else mentioned.
>you need to make sure php was compiled with the same flags as httpd.
>that is, if you built php before mod_perl, you need to recompile php so it
>uses the largefile flags.  or.. rebuilt modperl/httpd with Makefile.PL
>PERL_USELARGEFILES=0
>
>




_
Chat with friends online, try MSN Messenger: http://messenger.msn.com




Filehandles

2002-08-29 Thread Justin Luster



I'm using mod_perl 2.0 and Apache::Registry on a 
Windows XP machine.  I'm using a load tester to test my Perl CGI 
program.  I'm reading and writing to files and I'm using flock to control 
collisions.  I keep getting an error when the load tester is going (5 
concurrent users).  It seems that the file handles are getting messed 
up.  The script will write to files that I never write to but only 
read.  
 
Does anyone know anything about flock and 
mod_perl?  Have you ever seen file handles get messed up where things are 
being written to the wrong file?
 
Thanks.


RE: base.pm seems to fail a check

2002-08-29 Thread Jesse Erlbaum

Hi Stefano --

> Working outside mod_perl (i.e. in a command line perl program) no
> problem jumps out because the above arrowed 'die' correctly matches
> its regexp (the exception message starts at the beginning of the line).
>
> From inside mod_perl we have an unmatch so base croaks with the complete
> backtrace and httpd doesn't start (if I pre-use the module) or send
> 500 - Server Error (in a runtime require).


I find that a problem which occurs INSIDE Apache/mod_perl but does not occur
OUTSIDE from the command line is usually attributable to one or both of the
following:

  1. Perl version mis-match between installed Perl and version compiled into
Apache.
  2. Web server permissions issue.

If I were you I would closely compare the different versions and settings of
the installed perl and the compiled apache/perl.


TTYL,

-Jesse-


--

  Jesse Erlbaum
  The Erlbaum Group
  [EMAIL PROTECTED]
  Phone: 212-684-6161
  Fax: 212-684-6226





base.pm seems to fail a check

2002-08-29 Thread Stefano

Hello,

I was not able to find anything similar in list archives,

Trying to :

use base Ima::DBI

in mod_perl (also in a  block of config)
a cought this trace:

 Uncaught exception from user code:
Can't locate DBI/db.pm in @INC (@INC contains: [...]


This happens because Ima::DBI 'uses' base DBI::db at line 645 of his
source code and DBI::db is not a package available from @INC but
directly from the DBI namespace.


In these cases base.pm (line 42) steps into an unless{} block
to by-pass 'Can't locate ...' exceptions rised from inside base.pm
itself:

eval "require $base";
# Only ignore "Can't locate" errors from our eval require.
# Other fatal errors (syntax etc) must be reported.
--> die if $@ && $@ !~ /^Can't locate .*? at \(eval /; #'# <--


Working outside mod_perl (i.e. in a command line perl program) no
problem jumps out because the above arrowed 'die' correctly matches
its regexp (the exception message starts at the beginning of the line).

>From inside mod_perl we have an unmatch so base croaks with the complete
backtrace and httpd doesn't start (if I pre-use the module) or send
500 - Server Error (in a runtime require).

With the follow substitution it works, but I'm sure there is a better
and more correct way to behave with.

In base.pm :

42: <<< die if $@ && $@ !~ /^Can't locate .*? at \(eval /; #'#
42: >>> die if $@ && $@ !~ /Can't locate .*? at \(eval /; #'#


Any suggests?


Thanks a lot,
Stefano di Sandro



Re: bivio and mod_perl

2002-08-29 Thread Rob Nagler

zt.zamosc.tpsa.pl writes:
> Do many mod_perl programmers use bOP by bivio.biz  in their large projects?

At least 3. :-) We have a few downloads, but I doubt anybody is using
it for anything serious besides us.  (Others, please correct me
if I'm wrong.)

> Could you  share with your experience at working with it?

What is unique to bOP, which also is its weakness, is that we exploit
Perl "to the max".  We avoid special syntaxes, such as XML, except for
input and output.  This means we get all the power of Perl in view
languages, acceptance tests, unit tests, etc.  This makes it hard for
anybody who is not a Perl application developer to build applications
in bOP, i.e. we function as designers and programmers--sometimes we
get help from graphic artists or writer.

> The documentation looks very very... promissing.

It works.  There is no "design documentation" for a variety of
reasons, so you have to be prepared to look at code and examples to
figure out how it works and how to use it.

bOP has been commercially deployed for years and evolves on demand,
e.g. the View language itself was only added relatively recently and
we just released our e-commerce component.

What we like is that we don't have to program very much to get a lot
done, but when we need to write ordinary Perl code, bOP helps us
instead of hindering us.

To me, there are two ways to use bOP: as an example or as a platform.
I think many people have looked at it, and rolled their own.
Infrastructure in mod_perl is *easy*.  It's the applications that are
the hard part (in any platform).  Any infrastructure has to match your
style or you have to be willing to adapt.  If you like learning or
already understand declarative programming, you may find bOP suits
your needs out of the box.

Rob






RE: modifying @INC at startup and version of perl used

2002-08-29 Thread Jesse Erlbaum

Hi Jamie --

> So are you forced to use the version of perl that was chosen when
> mod_perl was installed? Guess so, am trying to do a local
> non-root install of apache and mod_perl to see if this is so.


Yes -- you are bound to use the version of Perl which was compiled into
Apache.  If you want to upgrade Perl it is necessary to re-compile
Apache/mod_perl.

On that note, I have created a mostly-automatic build system to compile
Apache with both mod_perl and mod_ssl.  You can download the Makefile (and
source tarballs, if you need) from here:

http://www.erlbaum.net/Apache-Perl-SSL/


It's pretty raw, but it works for me.  I can build a consistent
Apache/mod_perl/mod_ssl from source, usually with one command:

$ make build

This will also allow you to build as a NON-ROOT user.  It was designed to do
so as a primary function.

Let me know if you find this useful!


Warmest regards,

-Jesse-


--

  Jesse Erlbaum
  The Erlbaum Group
  [EMAIL PROTECTED]
  Phone: 212-684-6161
  Fax: 212-684-6226






RE: modifying @INC at startup and version of perl used

2002-08-29 Thread Jamie . Echlin

Actually I was in the process of reading your very useful piece on how to create a 
non-root install. Problem is, there is a hell of a lot of FM to read.
anyway, ta

>-Original Message-
>From: Stas Bekman [mailto:[EMAIL PROTECTED]]
>Sent: 29 August 2002 12:01
>To: Echlin, Jamie
>Cc: [EMAIL PROTECTED]
>Subject: Re: modifying @INC at startup and version of perl used
>
>
>[EMAIL PROTECTED] wrote:
>[...]
>
>
> > So are you forced to use the version of perl that was chosen when
> > mod_perl was installed? Guess so, am trying to do a local non-root
> > install of apache and mod_perl to see if this is so.
>
>It helps to RTFM:
>http://perl.apache.org/docs/1.0/guide/install.html#Should_I_Reb
>uild_mod_perl_if_I_have_Upgraded_Perl_
>http://perl.apache.org/docs/1.0/guide/install.html#Installation
>_Without_Superuser_Privileges
>__
>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
>
>

Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.




Re: modifying @INC at startup and version of perl used

2002-08-29 Thread Stas Bekman

[EMAIL PROTECTED] wrote:
[...]


 > So are you forced to use the version of perl that was chosen when
 > mod_perl was installed? Guess so, am trying to do a local non-root
 > install of apache and mod_perl to see if this is so.

It helps to RTFM:
http://perl.apache.org/docs/1.0/guide/install.html#Should_I_Rebuild_mod_perl_if_I_have_Upgraded_Perl_
http://perl.apache.org/docs/1.0/guide/install.html#Installation_Without_Superuser_Privileges
__
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: modifying @INC at startup and version of perl used

2002-08-29 Thread Jamie . Echlin

Thanks, but, didn't think i was a beginner... this is more of a mod_perl question 
because I'm aware of how to set @INC etc for normal perl scripts. Anyway I tried your 
advice, but, from perldoc perlvar:

$]
The use of this variable is deprecated

and for $^V: 
Use of uninitialized value at blah.pl line 7.

So are you forced to use the version of perl that was chosen when mod_perl was 
installed? Guess so, am trying to do a local non-root install of apache and mod_perl 
to see if this is so.

Thanks for the help,
jamie


>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>Sent: 29 August 2002 11:22
>To: Echlin, Jamie
>Cc: [EMAIL PROTECTED]
>Subject: Re: modifying @INC at startup and version of perl used
>
>
>Jamie,
>
>Use the perl internal variables to figure out what version 
>you're running under: $] and $^V
>Use these whether you're running perl or mod_perl. You might 
>want to direct questions relating to perl in general to the 
>perl beginners list.
>Please see perldoc perlvar for more details.
>
>~mark.
>
>On Thu, Aug 29, 2002 at 10:44:15AM +0100, [EMAIL PROTECTED] wrote:
>> Hi,
>> 
>> This is probably a luser error as I am quite new to this 
>malarkey, however I have been experimenting for a while 
>without progress now. I need to know how to find out exactly 
>which version of perl mod_perl is configured to use, and if 
>this can be changed as a non-root user, and how to set the @INC.
>> 
>> I have a simple startup script that prints @INC, which prints
>> @INC: /sbcimp/run/pd/perl/5.005_03/lib/sun4-solaris
>> /sbcimp/run/pd/perl/5.005_03/lib
>> /sbcimp/run/pd/perl/5.005_03/lib/site_perl/sun4-solaris
>> /sbcimp/run/pd/perl/5.005_03/lib/site_perl
>> 
>> this makes me think I am running 5.005_03? 
>> 
>> In the conf file I have 
>> PerlSetEnv PERL5LIB 
>/sbcimp/run/pd/perl/5.6.1/lib:/sbcimp/run/pd/cpan/5.6.1-2002.06/lib
>> but this does not seem to update the @INC. (I've also tried 
>combinations of PERLLIB and SetEnv etc).
>> 
>> When this is set however I get the following errors
>> Can't locate object method "boot" via package "mod_perl" at 
>/sbcimp/run/pd/perl/5.005_03/lib/site_perl/sun4-solaris/Apache/
>Constants.pm line 8.
>> and
>> [Thu Aug 29 10:41:12 2002] [error] syntax error at 
>/sbcimp/run/pd/perl/5.6.1/lib/warnings.pm line 306, near "{^"
>> syntax error at /sbcimp/run/pd/perl/5.6.1/lib/warnings.pm 
>line 311, near "{^"
>> 
>> etc, which is making me think I am mixing incompatible perl 
>binaries and modules. 
>> 
>> Does that seem reasonable, and if so what can I do to use perl 5.6.1?
>> 
>> Many thanks for your time.
>> jamie
>> 
>> 
>> Visit our website at http://www.ubswarburg.com
>> 
>> This message contains confidential information and is intended only 
>> for the individual named.  If you are not the named addressee you 
>> should not disseminate, distribute or copy this e-mail.  Please 
>> notify the sender immediately by e-mail if you have received this 
>> e-mail by mistake and delete this e-mail from your system.
>> 
>> E-mail transmission cannot be guaranteed to be secure or error-free 
>> as information could be intercepted, corrupted, lost, destroyed, 
>> arrive late or incomplete, or contain viruses.  The sender therefore 
>> does not accept liability for any errors or omissions in the 
>contents 
>> of this message which arise as a result of e-mail transmission.  If 
>> verification is required please request a hard-copy version.  This 
>> message is provided for informational purposes and should not be 
>> construed as a solicitation or offer to buy or sell any 
>securities or 
>> related financial instruments.
>

Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.




Re: modifying @INC at startup and version of perl used

2002-08-29 Thread mmaunder

Jamie,

Use the perl internal variables to figure out what version you're running under: $] 
and $^V
Use these whether you're running perl or mod_perl. You might want to direct questions 
relating to perl in general to the perl beginners list.
Please see perldoc perlvar for more details.

~mark.

On Thu, Aug 29, 2002 at 10:44:15AM +0100, [EMAIL PROTECTED] wrote:
> Hi,
> 
> This is probably a luser error as I am quite new to this malarkey, however I have 
>been experimenting for a while without progress now. I need to know how to find out 
>exactly which version of perl mod_perl is configured to use, and if this can be 
>changed as a non-root user, and how to set the @INC.
> 
> I have a simple startup script that prints @INC, which prints
> @INC: /sbcimp/run/pd/perl/5.005_03/lib/sun4-solaris
> /sbcimp/run/pd/perl/5.005_03/lib
> /sbcimp/run/pd/perl/5.005_03/lib/site_perl/sun4-solaris
> /sbcimp/run/pd/perl/5.005_03/lib/site_perl
> 
> this makes me think I am running 5.005_03? 
> 
> In the conf file I have 
> PerlSetEnv PERL5LIB 
>/sbcimp/run/pd/perl/5.6.1/lib:/sbcimp/run/pd/cpan/5.6.1-2002.06/lib
> but this does not seem to update the @INC. (I've also tried combinations of PERLLIB 
>and SetEnv etc).
> 
> When this is set however I get the following errors
> Can't locate object method "boot" via package "mod_perl" at 
>/sbcimp/run/pd/perl/5.005_03/lib/site_perl/sun4-solaris/Apache/Constants.pm line 8.
> and
> [Thu Aug 29 10:41:12 2002] [error] syntax error at 
>/sbcimp/run/pd/perl/5.6.1/lib/warnings.pm line 306, near "{^"
> syntax error at /sbcimp/run/pd/perl/5.6.1/lib/warnings.pm line 311, near "{^"
> 
> etc, which is making me think I am mixing incompatible perl binaries and modules. 
> 
> Does that seem reasonable, and if so what can I do to use perl 5.6.1?
> 
> Many thanks for your time.
> jamie
> 
> 
> Visit our website at http://www.ubswarburg.com
> 
> This message contains confidential information and is intended only 
> for the individual named.  If you are not the named addressee you 
> should not disseminate, distribute or copy this e-mail.  Please 
> notify the sender immediately by e-mail if you have received this 
> e-mail by mistake and delete this e-mail from your system.
> 
> E-mail transmission cannot be guaranteed to be secure or error-free 
> as information could be intercepted, corrupted, lost, destroyed, 
> arrive late or incomplete, or contain viruses.  The sender therefore 
> does not accept liability for any errors or omissions in the contents 
> of this message which arise as a result of e-mail transmission.  If 
> verification is required please request a hard-copy version.  This 
> message is provided for informational purposes and should not be 
> construed as a solicitation or offer to buy or sell any securities or 
> related financial instruments.



modifying @INC at startup and version of perl used

2002-08-29 Thread Jamie . Echlin

Hi,

This is probably a luser error as I am quite new to this malarkey, however I have been 
experimenting for a while without progress now. I need to know how to find out exactly 
which version of perl mod_perl is configured to use, and if this can be changed as a 
non-root user, and how to set the @INC.

I have a simple startup script that prints @INC, which prints
@INC: /sbcimp/run/pd/perl/5.005_03/lib/sun4-solaris
/sbcimp/run/pd/perl/5.005_03/lib
/sbcimp/run/pd/perl/5.005_03/lib/site_perl/sun4-solaris
/sbcimp/run/pd/perl/5.005_03/lib/site_perl

this makes me think I am running 5.005_03? 

In the conf file I have 
PerlSetEnv PERL5LIB /sbcimp/run/pd/perl/5.6.1/lib:/sbcimp/run/pd/cpan/5.6.1-2002.06/lib
but this does not seem to update the @INC. (I've also tried combinations of PERLLIB 
and SetEnv etc).

When this is set however I get the following errors
Can't locate object method "boot" via package "mod_perl" at 
/sbcimp/run/pd/perl/5.005_03/lib/site_perl/sun4-solaris/Apache/Constants.pm line 8.
and
[Thu Aug 29 10:41:12 2002] [error] syntax error at 
/sbcimp/run/pd/perl/5.6.1/lib/warnings.pm line 306, near "{^"
syntax error at /sbcimp/run/pd/perl/5.6.1/lib/warnings.pm line 311, near "{^"

etc, which is making me think I am mixing incompatible perl binaries and modules. 

Does that seem reasonable, and if so what can I do to use perl 5.6.1?

Many thanks for your time.
jamie


Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.