Apache::Hook

2002-12-05 Thread Yuriy Syrota
Hello, folks.

Could anybody explain me how can I specify apache hooks in the module?
In the other words, I want to do exactly what described here:
http://perl.apache.org/~dougm/modperl_2.0.html#new%20hook%20scheme

Although it's unclear for me what I should use() to use Apache::Hook.

-- yuriy syrota




RE: [mp2] LogHandler configuration problems

2002-12-05 Thread Beau E. Cox
Hi Stas -

...look at the error log...

For the first test, which my logger reported:

::1 [Wed Dec  4 19:58:13 2002] "/" 404 266
::1 [Wed Dec  4 19:58:24 2002] "/index.html" 403 280
::1 [Wed Dec  4 19:58:45 2002] "/perl/rocks.html" 200 29

The error log reported:

[Wed Dec 04 19:58:13 2002] [error] [client ::1]
  Attempt to serve directory: /srv/www/htdocs/
[Wed Dec 04 19:58:24 2002] [error]
  file permissions deny server execution/srv/www/htdocs/index.html

I don't see that these error_log entries "...revealed the
problem right away, from the first test..." To me, newbie that
I am, they give abount the same information that my logger gave...

OK, I'll relax. The secret is to read and test more before crying
wolf,

Aloha => Beau.

-Original Message-
From: Stas Bekman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 04, 2002 9:23 PM
To: Beau E. Cox
Cc: Modperl
Subject: Re: [mp2] LogHandler configuration problems


Beau E. Cox wrote:
> Well Stas, you asked for it... :)
[...]
> #---mod_perl 2.0 rocks
> test-
> Alias /perl/ /srv/www/conf/perl/
> 
>   SetHandler perl-script
>   PerlResponseHandler ModPerl::Registry
> PerlOptions +ParseHeaders
> Options +ExecCGI
> 
>
>
>
#---MyApache-FileLogger-
> 
>   SetHandler perl-script
>   PerlResponseHandler ModPerl::Registry
>   PerlLogHandler MyApache::FileLogger
>   Options +ExecCGI
> 

As you have figured out by trial and error, if you wanted the logger to
work for everything you just needed to add:

 > 
 >  PerlLogHandler MyApache::FileLogger
 > 

what you originally did, is assigned ModPerl::Registry to serve
everything on the server, but fed it with html and images, forgetting
that it requires a Perl diet. Since you've repeated many times that you
are a newbie, I'll forgive you ;) But if you weren't a newbie and you
didn't remember to check the error_log file, I'd say: "shame on you" :)
As the latter would have revealed the problem right away, from the first
test.

Notice that my example configuration is correct since it demonstrates
the use of a logger for a particular sub-section of the site that
*happens* to be served by the ModPerl::Registry handler. Perhaps that
example needs some extra notes to avoid this kind of confusion in the
future. I'll add a note.

__
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: ANNOUNCE: Apache::AuthenNTLM 0.23

2002-12-05 Thread Frank . Zimper
I am already using two BDCs and no PDC. The first BDC in the list is said 
to be the fastest one we have.

In httpd.conf I configured 9 NT-Domains, most of which are resource 
domains. The account domain most of the users, including me, are in is the 
first domain listed.

Frank

- Weitergeleitet von Frank Zimper/BUH/CH/SB_PLC am 05.12.2002 09:48 
-


"Gerald Richter" <[EMAIL PROTECTED]>
05.12.2002 06:12

 
An: [EMAIL PROTECTED], [EMAIL PROTECTED]
Kopie: 
Thema:  Re: ANNOUNCE: Apache::AuthenNTLM 0.23


> I installed it on 29. Nov. and have to say that it works fine. No more
> problems with POST requests.
> The only issue I still have are the occasional "hangs", when the web
> server doesn't respond for several tens of seconds.
>

Could you try to use a bdc instead of the pdc. Maybe your pdc is to high
loaded

Gerald

-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-







Re: Apache::Hook

2002-12-05 Thread Stas Bekman
Yuriy Syrota wrote:

Hello, folks.

Could anybody explain me how can I specify apache hooks in the module?
In the other words, I want to do exactly what described here:
http://perl.apache.org/~dougm/modperl_2.0.html#new%20hook%20scheme

Although it's unclear for me what I should use() to use Apache::Hook.


It's not (fully) implemented yet. Patches are welcome.

That doc is a bit dated and certaint things have changed. Please refer 
to the mostly up to date docs at perl.apache.org. There are two docs 
that are outdated a bit there and require cleanup:
http://perl.apache.org/docs/2.0/user/overview/overview.html
http://perl.apache.org/docs/2.0/user/design/design.html

so I suggest to not look at them at this time, as the material in them 
is mostly covered in the rest of the 2.0 docs. That reminds me that I 
need to add the 'what's new chapter from my tutorial. will do that shortly.

p.s. Yuriy, I'm working on the custom conf directives doc now and 
hopefully should be done soon, so you can get going with the axkit porting.

__
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: [mp2] LogHandler configuration problems

2002-12-05 Thread Stas Bekman
Beau E. Cox wrote:

Hi Stas -

...look at the error log...

For the first test, which my logger reported:

::1 [Wed Dec  4 19:58:13 2002] "/" 404 266
::1 [Wed Dec  4 19:58:24 2002] "/index.html" 403 280
::1 [Wed Dec  4 19:58:45 2002] "/perl/rocks.html" 200 29

The error log reported:

[Wed Dec 04 19:58:13 2002] [error] [client ::1]
  Attempt to serve directory: /srv/www/htdocs/
[Wed Dec 04 19:58:24 2002] [error]
  file permissions deny server execution/srv/www/htdocs/index.html

I don't see that these error_log entries "...revealed the
problem right away, from the first test..." To me, newbie that
I am, they give abount the same information that my logger gave...


bummer ;) I was sure that registry will complain in the logs, but forgot 
that Apache got on its way. So you were right and I wrong ;) Glad that 
you've figured it out.

OK, I'll relax. The secret is to read and test more before crying
wolf


you'd be surprised how many times i've cried wolf myself... even did 
that, this morning ;)

__
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: Online Tonight

2002-12-05 Thread Stas Bekman
David Wheeler wrote:

All,

I will be the featured guest for an hour on the nationally syndicated 
talk radio show "Online Tonight" this evening at 8 pm PST (11 pm EST). 
Host David Lawrence and I be discussing Bricolage, its history, and 
content management in general. This is my first time on the radio, so it 
should be interesting. The show is a light, humor-oriented tech talk 
show, and is, along with Online Today, "the most listened to 
high-tech-oriented talk show on the air today," according to CNET Radio.

The show's web site:
  http://www.online-tonight.com/

To listen in via streaming media:
  http://www.cnet.com/broadband/0-7227152.html

Hi David,

Care to share with us how was the show? And how much mod_perl talk was 
in it?

Unfortunately I wasn't able to listen to the broadcast due to some sw 
issues, the browser just hanged there... If the show was of interest to 
other mod_perl users, is there an mp3 that we can link to from 
perl.apache.org?


__
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



[mp2] doing PerlSetVar from a startup handler

2002-12-05 Thread Beau E. Cox
Hi -

I'm trying to get mason running under mod_perl 2,
but this is a mod_perl question. I need to have the
following set:

PerlSetVar  MasonArgsMethod  CGI

When I configure mason in httpd.conf w/o a startup handler,
everything is fine.

With a handler, even with the PerlSetVar before the
'require' for the handler in the conf file, CGI is NOT
set.

Question: how can I PerlSetVar from the perl code in the
handler? I see:

push @{ $Location{"/"}->{PerlSetVar} }, [ foo => 'bar' ];

in the mp1 docs - looks good - but where do I get the %Location
hash? Can't seem to find that.

Aloha => Beau.




Re: [mp2] doing PerlSetVar from a startup handler

2002-12-05 Thread Stas Bekman
Beau E. Cox wrote:

Hi -

I'm trying to get mason running under mod_perl 2,
but this is a mod_perl question. I need to have the
following set:

PerlSetVar  MasonArgsMethod  CGI

When I configure mason in httpd.conf w/o a startup handler,
everything is fine.


What do you mean by the "startup handler"? a startup file?


With a handler, even with the PerlSetVar before the
'require' for the handler in the conf file, CGI is NOT
set.


I'm not familiar with mason, so please provide a short example that 
reproduces the problem (w/o mason if possible).

Question: how can I PerlSetVar from the perl code in the
handler? I see:

push @{ $Location{"/"}->{PerlSetVar} }, [ foo => 'bar' ];

in the mp1 docs - looks good - but where do I get the %Location
hash? Can't seem to find that.


In 1.0 outside  you would go as:

  package Apache::ReadConfig;
  push @{ $Location{"/"}->{PerlSetVar} }, [ foo => 'bar' ];

but 2.0's support Perl sections support is incomplete as far as I know. 
Doug implemented the base and Philippe was working on the rest, but he 
is on vacation now, so expect him to complete it once he comes back (in 
January I believe)

__
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: [mp2] doing PerlSetVar from a startup handler

2002-12-05 Thread Beau E. Cox
Stas -

I finally found what was happening; the startup script
(which I miscalled a 'handler') invoked by a 'PerlRequire'
directive in httpd.conf creates, among other things, a 
HTML::Mason::ApacheHandler object. One of the arguments
to it's new constructor is 'args_method', which, when
set to 'CGI' uses CGI instead of Apache::Request. I don't
know how the magic of the PerlSetVar => args_method when
mason is configured w/o a startup script, but the point
is mute, as it is up and running.

I will ponder further after my deadlines are met ;)

Aloha => Beau.

PS: why do I always get two duplicate messages from you?

PPS:

HOURLY WEATHER
100 AM HST THU DEC 5 2002 
OAHU-  
CITY SKY/WX TMP  DP  RH WIND  PRES
HONOLULU  CLEAR  68  63  84  NW3  30.04F 

Chilly tonight!!!

-Original Message-
From: Stas Bekman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 12:48 AM
To: Beau E. Cox
Cc: Modperl
Subject: Re: [mp2] doing PerlSetVar from a startup handler


Beau E. Cox wrote:
> Hi -
> 
> I'm trying to get mason running under mod_perl 2,
> but this is a mod_perl question. I need to have the
> following set:
> 
> PerlSetVar  MasonArgsMethod  CGI
> 
> When I configure mason in httpd.conf w/o a startup handler,
> everything is fine.

What do you mean by the "startup handler"? a startup file?

> With a handler, even with the PerlSetVar before the
> 'require' for the handler in the conf file, CGI is NOT
> set.

I'm not familiar with mason, so please provide a short example that 
reproduces the problem (w/o mason if possible).

> Question: how can I PerlSetVar from the perl code in the
> handler? I see:
> 
> push @{ $Location{"/"}->{PerlSetVar} }, [ foo => 'bar' ];
> 
> in the mp1 docs - looks good - but where do I get the %Location
> hash? Can't seem to find that.

In 1.0 outside  you would go as:

   package Apache::ReadConfig;
   push @{ $Location{"/"}->{PerlSetVar} }, [ foo => 'bar' ];

but 2.0's support Perl sections support is incomplete as far as I know. 
Doug implemented the base and Philippe was working on the rest, but he 
is on vacation now, so expect him to complete it once he comes back (in 
January I believe)

__
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: Different handlers in different NameVirtualHosts?

2002-12-05 Thread Damyan Ivanov
On Wed, Dec 04, 2002 at 11:37:20AM +0200 /me wrote:
> I am having trouble setting different Perl*Handler's for two different
> VirtualHosts. The virtual hosts use one IP and are name-based.
[... details skipped ...]

It works. It was me that's wrong. PerlFixupHandlers work just as
expected with named virtual hosts.

For the record - here's the source of my troubles.

I have two classes that need to be single-instance within the
application. the "signle"-ness is implementent in a parent class which
creates new instance only if there is no previous one.

Trouble begins when asking the second application derived class to
create an instance and its parent returns the instance of the first
class.

Fixing the parent to cache one instance _per class_ solves the problem.

I knew it's me who is wrong, not mod_perl...

Funny thing is that the silence on the list made me think :-)))


dam

-- 
Damyan Ivanov Creditreform Bulgaria
[EMAIL PROTECTED] http://www.creditreform.bg/
phone: +359 2 928 2611, 929 3993   fax: +359 2 920 0994
mobile: +359 88 566067 ICQ: 3028500



msg31627/pgp0.pgp
Description: PGP signature


apache2 + mod_perl2 + dbd::oracle

2002-12-05 Thread Fabian Kreitner

Hello all,

I have problems connecting to an oracle db using mod_perl but cant figure 
out where the problem is. The script works fine from the bash but not 
through perl::registry. The script only sets the environment variables and 
then tries a connect.

Any suggestions please? If you need further information please tell.

Thank you for your time.

Trace with mod_perl:


DBI 1.30-nothread dispatch trace level set to 2
-> DBI->connect(DBI:Oracle:PERG, pid_10023, )
-> DBI->install_driver(Oracle) for linux perl=5.008 pid=87 ruid=40019 
euid=40019
   install_driver: DBD::Oracle version 1.12 loaded from 
/opt/ainea/perl/lib/site_perl/5.8.0/i686-linux/DBD/Oracle.p
<- install_driver= DBI::dr=HASH(0x82f1c6c)
-> connect for DBD::Oracle::dr (DBI::dr=HASH(0x82f1c6c)~0x834e818 
'PERG' 'pid_10023'  HASH(0x82cef60))
-> DESTROY for DBD::Oracle::db (DBI::db=HASH(0x82c70d4)~INNER)
 DESTROY for DBI::db=HASH(0x82c70d4) ignored - handle not initialised
<- DESTROY= undef at DBI.pm line 503
!! ERROR: 12154 'Error while trying to retrieve text for error 
ORA-12154 (DBD ERROR: OCIServerAttach)'
<- connect= undef at DBI.pm line 503
-> errstr in DBD::_::common for DBD::Oracle::dr 
(DBI::dr=HASH(0x82f1c6c)~0x834e818)
<- errstr= 'Error while trying to retrieve text for error ORA-12154 
(DBD ERROR: OCIServerAttach)' at DBI.pm line 50
   DBI->connect(PERG) failed: Error while trying to retrieve text for 
error ORA-12154 (DBD ERROR: OCIServerAttach)

Trace from bash:


DBI 1.30-nothread dispatch trace level set to 2
Note: perl is running without the recommended perl -w option
-> DBI->connect(DBI:Oracle:PERG, pid_10023, )
-> DBI->install_driver(Oracle) for linux perl=5.008 pid=388 ruid=40019 
euid=40019
   install_driver: DBD::Oracle version 1.12 loaded from 
/opt/ainea/perl/lib/site_perl/5.8.0/i686-linux/DBD/Oracle.p
<- install_driver= DBI::dr=HASH(0x81e9e14)
-> connect for DBD::Oracle::dr (DBI::dr=HASH(0x81e9e14)~0x824afc4 
'PERG' 'pid_10023'  HASH(0x81c56c4))
<- connect= DBI::db=HASH(0x8246cf0) at DBI.pm line 503
-> STORE for DBD::Oracle::db (DBI::db=HASH(0x812b604)~INNER 
'PrintError' 1)
<- STORE= 1 at DBI.pm line 545
-> STORE for DBD::Oracle::db (DBI::db=HASH(0x812b604)~INNER 
'AutoCommit' 1)
<- STORE= 1 at DBI.pm line 545
<- connect= DBI::db=HASH(0x8246cf0)
-> DESTROY for DBD::Oracle::db (DBI::db=HASH(0x812b604)~INNER)
<- DESTROY= undef
-- DBI::END
-> disconnect_all for DBD::Oracle::dr (DBI::dr=HASH(0x81e9e14)~0x824afc4)
<- disconnect_all= '' at DBI.pm line 565
-> DESTROY in DBD::_::common for DBD::Oracle::dr 
(DBI::dr=HASH(0x824afc4)~INNER)
<- DESTROY= undef during global destruction


Versions:
-

mod_perl-1.99_07
apache-2.0.43
perl 5.8.0 



Re: [mp2] Documentation/LogHandler question

2002-12-05 Thread Geoffrey Young


Hsiao, Chang-Ping wrote:

p.s. Geoff, we need a short acronym for your book so it's 
easy to refer 
to it, (a new eagle), I've called it R&W (Red&White), if you have a 
better idea, please suggest.


	Right, an animal is much easier to remember.  Wish it had one on its
cover like books from O'reilly.


well, not everyone can write for O'Reilly :)

the cookbook is probably as good a nickname as any.  other 
possibilities that have been floated around have been "the brick book" 
(in reference to the cover color) as well as "the cool book" (if you 
look at the back cover closely, it says "cool" on it - the end of the 
"k" is cut off by the binding :)

anyway, I usually just say the cookbook.  thanks for the reference in 
any case :)

--Geoff





win32 testing only?

2002-12-05 Thread Jon Reinsch
At 
http://perl.apache.org/docs/1.0/guide/getwet.html#Installing_mod_perl_for_Window
it says:
"we recommend that mod_perl on Windows be used only for testing 
purposes, not in production"

Does this apply to mod_perl 1.0 only, or to 2.0 as well? If both, is it 
likely to change anytime soon?

(I reached the page above by going to 
http://perl.apache.org/start/index.html, clicking on "Get Your Feet 
Wet", and then on "Installing mod_perl for Windows".)



mod_perl + mod_rewrite

2002-12-05 Thread P. Zadikian
Hello,
Is there some way to set mod_rewrite rules in a  section in the 
apache configuration?

Thanks, 
Z.




Re: Online Tonight

2002-12-05 Thread David Wheeler
On Thursday, December 5, 2002, at 12:46  AM, Stas Bekman wrote:


Care to share with us how was the show? And how much mod_perl talk was 
in it?

I certainly mentioned how important Perl, mod_perl, Apache, Mason, and 
PostgreSQL are to the success of the project. The show went pretty well 
(and a few people who listened agree), but I think I got only around 
10-12 minutes time talking in the whole hour! Such is the nature of 
commercial radio, I guess. They plan to have me on again, though -- 
perhaps live from the floor of Macworld Expo; we'll see. I'll certainly 
keep pumping the above-mentioned software, though -- it's all crucial!

Unfortunately I wasn't able to listen to the broadcast due to some sw 
issues, the browser just hanged there... If the show was of interest 
to other mod_perl users, is there an mp3 that we can link to from 
perl.apache.org?

The show is online here:

  http://www.onlinetonight.net/archives/001100.html

I was on in the second hour (photo to appear later today), and you can 
listen to it via a WMA file. They were kind enough to give me MP3s of 
the hour, and once I get them edited, I'll post them somewhere. 
Probably on bricolage.cc. I think it might be of interest to others, 
although I suspect that the edited version might be of most interest, 
once I can provide it.

Best,

David

--
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
http://david.wheeler.net/  Yahoo!: dew7e
   Jabber: [EMAIL PROTECTED]



Re: win32 testing only?

2002-12-05 Thread Kyle Oppenheim
The warning applies to mod_perl 1.x.  The reason is that mod_perl 1.0 is
single-threaded.  In a UNIX environment, Apache (1.x) forks many child
processes to handle requests which each have their own embedded Perl
interpreter.  In Win32, Apache has many threads to handle requests which all
share a single Perl interpreter with a global lock around it -- effectively
serializing all requests that depend on mod_perl.

Mod_perl 2.0 can run multiple Perl interpreters in a single process (using
new thread features introduced in Perl 5.6.0-5.8.0) so the need for the
global lock on Win32 systems is not necessary.  Also, Apache Portable
Runtime -- new in in Apache 2.0 -- has explicit Win32 support unlike Apache
1.x which had it grafted on.

There are no plans to update mod_perl 1.x to support threading.  Note that
mod_perl 2.0 is still beta, so it might not be ready for your production
environment yet either.

I don't have any experience running mod_perl on Win32, but I think the
mod_perl 2.0 code is starting to stabalize enough that you could probably
work-around its problems easier than working-around the performance
bottleneck of 1.0.  ymmv.

- Kyle

- Original Message -
From: "Jon Reinsch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 05, 2002 9:18 AM
Subject: win32 testing only?


> At
>
http://perl.apache.org/docs/1.0/guide/getwet.html#Installing_mod_perl_for_Wi
ndow
> it says:
> "we recommend that mod_perl on Windows be used only for testing
> purposes, not in production"
>
> Does this apply to mod_perl 1.0 only, or to 2.0 as well? If both, is it
> likely to change anytime soon?
>
> (I reached the page above by going to
> http://perl.apache.org/start/index.html, clicking on "Get Your Feet
> Wet", and then on "Installing mod_perl for Windows".)
>
>




Re: [mp2] Documentation/LogHandler question

2002-12-05 Thread David Wheeler
On Wednesday, December 4, 2002, at 06:14  PM, Stas Bekman wrote:


Think of 2.0 as 1.0 on mushrooms.


I need to give some thought as to how I can include quote gems like 
this in my sig. For now, though, I'll leave it to Schwern.

David

--
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
http://david.wheeler.net/  Yahoo!: dew7e
   Jabber: [EMAIL PROTECTED]



RE: win32 testing only?

2002-12-05 Thread Goehring, Chuck Mr., RCI - San Diego
Jon,

A similar attitude is expressed in the Apache Server documentation for the past 4+ 
years. 



Chuck


-Original Message-
From: Jon Reinsch [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 9:19 AM
To: [EMAIL PROTECTED]
Subject: win32 testing only?


At 
http://perl.apache.org/docs/1.0/guide/getwet.html#Installing_mod_perl_for_Window
it says:
"we recommend that mod_perl on Windows be used only for testing 
purposes, not in production"

Does this apply to mod_perl 1.0 only, or to 2.0 as well? If both, is it 
likely to change anytime soon?

(I reached the page above by going to 
http://perl.apache.org/start/index.html, clicking on "Get Your Feet 
Wet", and then on "Installing mod_perl for Windows".)




[mp2] Warnings not showing in Apache log?

2002-12-05 Thread Andrzej Jan Taramina
When running under mp2, I don't seem to get any warnings to the Apache log 
regardless of what I do.  

I haveread that mod_perl 1.0 ate these warnings, and that you could use the 
Apache::LogSTDERR module to work around this.  However, I haven't had 
any success trying to build Apache::LogSTDERR on my system (the C code 
seems to be Linux specific).

PerlWarn On directive is set in my http.conf file, and all scripts have the -w in 
the shebang line.

I'm running Apache 2.0.43 with mod_perl 1.99_08 (the latest 2.0 version I 
believe) with ActivePerl 5.6.1 on a Win2K SP2 server installation.

Any way to get warnings into the log...or route them elsewhere with this setup?

Thanks!

Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com




[mp2] Stability under Windows?

2002-12-05 Thread Andrzej Jan Taramina
I'm getting a lot of strange errors when trying to run my scripts under mp2.

Things like:

   [Thu Dec 05 15:10:33 2002] [error] 1188: ModPerl::Registry: Goto undefined 
   subroutine &Carp::longmess_heavy at D:/Program Files/Perl/lib/Carp.pm line 
   98.   

and this is common:

   [Thu Dec 05 15:36:41 2002] [notice] Parent: child process exited with status 
   3221225477 -- Restarting.

and occasionally, it even dies on startup, before I even hit any of my scripts:

   [Thu Dec 05 15:14:31 2002] [error] Can't load Perl file: D:/Program 
   Files/Apache/conf/startup.pl for server 192.168.0.1:8080, exiting...

Part of the problem is that these are not consistent at all.  The errors vary in type 
and how long it takes to 
produce them.  I've gone over my code with a fine tooth combusing strict, and 
watching for the infamous 
subroutine closure problemsand can't find any issues in the scripts themselves. 
They run fine, without 
any warnings under normal CGI (non mp) mode.  A test case is attached belowall it 
does is read a jpg 
image and return it.

It almost seems like something is walking over memoryand it's timing based.

Are there any known problems with mp2 that might cause this kind of behaviour?

I'm running Apache 2.0.43 with mod_perl 1.99_08 (the latest 2.0 version I 
believe) with ActivePerl 5.6.1 on a Win2K SP2 server installation.

Thanks!


.Andrzej

-test script --


use strict;
use CGI;
use CGI::Carp qw( fatalsToBrowser );
use FileHandle;

use constant BUFFER_SIZE => 16384;

my $query = new CGI;

#
#   Process the request
#

outputImageFile( $query->param( 'rownum' ), $query->param( 'size' ), $query->param( 
'extra' ) );

sub outputImageFile {
my ( $itemNum, $size, $extra ) = @_;
my $buffer;
my $imageFile   = new FileHandle;

my $path = "<" . "d:/program files/apache/cgi-bin/lifeitself/database/p" . 
$itemNum . "_" . $size;

if( $extra ) {
if( $extra =~ /^([\d]+)$/ ) {
$path .= $extra;
}
}

$path.= ".jpg";

if( $itemNum =~ /^([\d]+)$/ ) { 
if( open( $imageFile, $path  ) ) {
print $query->header( -type => "image/jpeg" );

binmode STDOUT;
binmode $imageFile;

while( read( $imageFile, $buffer, BUFFER_SIZE ) ) {
print $buffer;
}

close $imageFile;
}
}
}
Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com




segfault after HTTP_MOVED_* and set_handlers()

2002-12-05 Thread Stefano
Hello,

This is a  question about the correct use of set_handlers request
method.

I have some handlers stacked by the first one content handler;
one of them processing the request needs to redirect and then close
the HTTP response with a HTTP_MOVED_PERMANENTLY;

so I thought that the following stacked handlers have to be removed
from the stack with a $r->set_handlers('PerlHandler' => undef) in a way
such:

$r->content_type('text/html') ;
$r->header_out('Location', '/go/there') ;
$r->set_handlers('PerlHandler' => undef) ;
return HTTP_MOVED_PERMANENTLY ;

What I see is a couple of side effects:

 - Apache exit correctly, but the following request it serves arises a
   segfault at an unpredictable execution point
 - Apache faults immediately, child dies
 
I've traced childs with strace and Apache::DB and using the latter one
childs segfault also trying to print a value from the debugging shell:
  
   p $var


So I removed all the undefining calls and everithing returns to work.

Does that mess up the apache child pool used by mod_perl ?

What I'm asking is 
 a) when is a good idea use set_handlers(PerlHandler => undef)
 b) is the segfault I've obtained a bug in mod_perl ?


Thanks,
Stefano di Sandro



segfault after HTTP_MOVED_* and set_handlers()

2002-12-05 Thread Stefano
Hello,

This is a  question about the correct use of set_handlers request
method.

I have some handlers stacked by the first one content handler;
one of them processing the request needs to redirect and then close
the HTTP response with a HTTP_MOVED_PERMANENTLY;

so I thought that the following stacked handlers have to be removed
from the stack with a $r->set_handlers('PerlHandler' => undef) in a way
such:

$r->content_type('text/html') ;
$r->header_out('Location', '/go/there') ;
$r->set_handlers('PerlHandler' => undef) ;
return HTTP_MOVED_PERMANENTLY ;

What I see is a couple of side effects:

 - Apache exit correctly, but the following request it serves arises a
   segfault at an unpredictable execution point
 - Apache faults immediately, child dies
 
I've traced childs with strace and Apache::DB and using the latter one
childs segfault also trying to print a value from the debugging shell:
  
   p $var


So I removed all the undefining calls and everithing returns to work.

Does that mess up the apache child pool used by mod_perl ?

What I'm asking is 
 a) when is a good idea use set_handlers(PerlHandler => undef)
 b) is the segfault I've obtained a bug in mod_perl ?


Thanks,
Stefano di Sandro



All tests fail with Apache/2.0.43 (Unix) mod_perl/1.99_07-dev

2002-12-05 Thread Richard Curtis
Hi.
   I have just installed and compiled perl 5.6.1, compiled Apache 
2.0.43 (with ssl support), and tried to get mod_perl 1.99_07-dev to 
work.

mod_perl compiles, but when I run "make test" all tests fail.

Below is the first bit of output from the t/logs/error_log

I have looked on the newsgroups and google for answers but I am now lost.

Can anybody help to shed some more light on this ?
More info can be made available if people need it.

Thanks
Richard

[Thu Dec 05 21:18:22 2002] [info] Init: Initializing OpenSSL library
[Thu Dec 05 21:18:22 2002] [info] Init: Seeding PRNG with 0 bytes of entropy
[Thu Dec 05 21:18:22 2002] [info] Init: Generating temporary RSA private 
keys (512/1024 bi
ts)
[Thu Dec 05 21:18:22 2002] [info] Init: Generating temporary DH 
parameters (512/1024 bits)
[Thu Dec 05 21:18:22 2002] [warn] Init: Session Cache is not configured 
[hint: SSLSessionC
ache]
[Thu Dec 05 21:18:22 2002] [info] Init: Initializing (virtual) servers 
for SSL
[Thu Dec 05 21:18:22 2002] [info] Server: Apache/2.0.43, Interface: 
mod_ssl/2.0.43, Librar
y: OpenSSL/0.9.6g
END in modperl_extra.pl, pid=6928
[Thu Dec 05 21:18:22 2002] [info] Init: Initializing OpenSSL library
[Thu Dec 05 21:18:22 2002] [info] Init: Seeding PRNG with 0 bytes of entropy
[Thu Dec 05 21:18:22 2002] [info] Init: Generating temporary RSA private 
keys (512/1024 bi
ts)
[Thu Dec 05 21:18:23 2002] [info] Init: Generating temporary DH 
parameters (512/1024 bits)
[Thu Dec 05 21:18:23 2002] [info] Init: Initializing (virtual) servers 
for SSL
[Thu Dec 05 21:18:23 2002] [info] Server: Apache/2.0.43, Interface: 
mod_ssl/2.0.43, Librar
y: OpenSSL/0.9.6g
[Thu Dec 05 21:18:23 2002] [notice] Apache/2.0.43 (Unix) 
mod_perl/1.99_07-dev Perl/v5.6.1
mod_ssl/2.0.43 OpenSSL/0.9.6g configured -- resuming normal operations
[Thu Dec 05 21:18:23 2002] [info] Server built: Dec  5 2002 20:29:02
[Thu Dec 05 21:18:23 2002] [debug] prefork.c(1039): AcceptMutex: sysvsem 
(default: sysvsem
)
[Thu Dec 05 21:18:23 2002] [error] Can't locate TestHooks/trans.pm in 
@INC (@INC contains:
 /home/richard/mod_perl-1.99_07/t 
/home/richard/mod_perl-1.99_07/blib/lib/Apache2 /home/ri
chard/mod_perl-1.99_07/blib/arch/Apache2 
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/A
pache2 /home/richard/mod_perl-1.99_07/Apache-Test/lib 
/home/richard/mod_perl-1.99_07/lib /
home/richard/mod_perl-1.99_07/blib/lib 
/home/richard/mod_perl-1.99_07/blib/arch /home/rich
ard/mod_perl-1.99_07/t/response 
/home/richard/mod_perl-1.99_07/t/protocol /home/richard/mo
d_perl-1.99_07/t/hooks /home/richard/mod_perl-1.99_07/t/filter 
/home/richard/mod_perl-1.99
_07/t/htdocs/testdirective/perlmodule-vh 
/home/richard/mod_perl-1.99_07/t/htdocs/testdirec
tive/main /usr/local/lib/perl5/5.6.1/i686-linux 
/usr/local/lib/perl5/5.6.1 /usr/local/lib/
perl5/site_perl/5.6.1/i686-linux /usr/local/lib/perl5/site_perl/5.6.1 
/usr/local/lib/perl5
/site_perl) at (eval 18) line 3.



Re: [mp1] Still can not get working DSO configuration on Tru64

2002-12-05 Thread Marcin Kasperski
Stas Bekman <[EMAIL PROTECTED]> writes:

> >>Marcin Kasperski wrote:
> [...]
> > It seems to me, they had problem with the '-Wl,-rpath' issue which I
> > found to be minor and easily patched (by the way: maybe someone would
> > want to correct it in distribution?).
> 
> I wasn't following that thread, but if you send a patch that solves
> that problem, I'd be more than happy to commit it to the main distro.

Hmm, so far I can only offer 'half-patch' and the problem explanation
(I do not understand configure scripts well enough to guess how to
correct them).

The problem is that the 
-Wl,-rpath,/tools/perl/lib/5.6.1/alpha-dec_osf/CORE
option (which, by the way, is returned by
perl -V:ccdlflags
when perl is compiled with -Duseshrplib) is not an option for 'ld' but
for 'cc'. In fact it means 'dear cc, be so kind and pass to ld 
the option -rpath /tools/perl/lib/5.6.1/alpha-dec_osf/CORE). ld does
not know '-Wl' and complains. As 
perl -V:ld
returns 'ld', maybe this is the problem in perl, not in modperl, but I
am not sure.

I patched it just by replacing 'ld' with 'cc' in the Makefile
generated by configure script - such correction caused link step to
succeed (and 'unresolved PL_perl_destruct_level to be reported while
apache startup' :-( )

Currently I plan to check the opposite correction (using -rpath
... and ld as link command), maybe this will change something.

-- 
( Marcin Kasperski   | Working overtime sucks the spirit and motivation  )
( http://www.mk.w.pl |   out of a team. (Wells)  )
()
( Porady dla twórców serwisów WWW: http://www.mk.w.pl/porady/porady_www  )



Re: apache2 + mod_perl2 + dbd::oracle

2002-12-05 Thread Marcin Kasperski
Fabian Kreitner <[EMAIL PROTECTED]> writes:

> Hello all,
> 
> I have problems connecting to an oracle db using mod_perl but cant
> figure out where the problem is. The script works fine from the bash
> but not through perl::registry. The script only sets the environment
> variables and then tries a connect.
> 
> (...)
>  !! ERROR: 12154 'Error while trying to retrieve text for error
>  ORA-12154 (DBD ERROR: OCIServerAttach)'

Either you removed message files from your Oracle installation (not
very likely) or you failed to set ORACLE_HOME so that OCI libraries
below DBD::Oracle notice this variable.

Double check the way you set your environment.



Re: [mp1] Still can not get working DSO configuration on Tru64

2002-12-05 Thread Marcin Kasperski
> The problem is that the 
> -Wl,-rpath,/tools/perl/lib/5.6.1/alpha-dec_osf/CORE
> option (which, by the way, is returned by
> perl -V:ccdlflags
> when perl is compiled with -Duseshrplib) is not an option for 'ld' but
> for 'cc'. In fact it means 'dear cc, be so kind and pass to ld 
> the option -rpath /tools/perl/lib/5.6.1/alpha-dec_osf/CORE). ld does
> not know '-Wl' and complains. As 
> perl -V:ld
> returns 'ld', maybe this is the problem in perl, not in modperl, but I
> am not sure.
> 
> I patched it just by replacing 'ld' with 'cc' in the Makefile
> generated by configure script - such correction caused link step to
> succeed (and 'unresolved PL_perl_destruct_level to be reported while
> apache startup' :-( )
> 
> Currently I plan to check the opposite correction (using -rpath
> .. and ld as link command), maybe this will change something.

I tried it - I left ld as link command but replaced in Makefile
   -Wl,-rpath,/tools/...  
with 
   -rpath /tools/...
The results are exactly the same: link succeeded,
PL_perl_destruct_level is unresolved while running apache.

-- 
( Marcin Kasperski   | Communication takes place between people, documents   )
( http://www.mk.w.pl |are secondary. (Booch) )
()
( Sztuczki i kruczki w C++: http://www.mk.w.pl/porady/porady_cplusplus   )



Re: [mp1] Still can not get working DSO configuration on Tru64

2002-12-05 Thread Marcin Kasperski
> The results are exactly the same: link succeeded,
> PL_perl_destruct_level is unresolved while running apache.

I found the workaround to avoid this effect: slightly patching apache
build procedure so that the httpd binary is linked with perl
libperl.so helped. The error disappears... now I get the coredump
during the application startup. In case I manage to diagnose this core
somehow, I will mention it here.


-- 
( Marcin Kasperski   | A complex system designed from scratch never works)
( http://www.mk.w.pl |and cannot be patched to make it work. (Booch) )
()
( Porady dla programisty Oracle: http://www.mk.w.pl/porady/porady_oracle )



Re: All tests fail with Apache/2.0.43 (Unix) mod_perl/1.99_07-dev

2002-12-05 Thread yo _
maybe its failing becuase it needs the module TestHooks::Trans. Try 
installing that perl module (you most likely don't have it since you have a 
clean perl 5.6.1 installation) and then run the tests again. I'm only half 
sure about this.
-rian






From: Richard Curtis <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: All tests fail with Apache/2.0.43 (Unix) mod_perl/1.99_07-dev
Date: Thu, 05 Dec 2002 21:47:04 +

Hi.
   I have just installed and compiled perl 5.6.1, compiled Apache 2.0.43   
  (with ssl support), and tried to get mod_perl 1.99_07-dev to work.

mod_perl compiles, but when I run "make test" all tests fail.

Below is the first bit of output from the t/logs/error_log

I have looked on the newsgroups and google for answers but I am now lost.

Can anybody help to shed some more light on this ?
More info can be made available if people need it.

Thanks
Richard

[Thu Dec 05 21:18:22 2002] [info] Init: Initializing OpenSSL library
[Thu Dec 05 21:18:22 2002] [info] Init: Seeding PRNG with 0 bytes of 
entropy
[Thu Dec 05 21:18:22 2002] [info] Init: Generating temporary RSA private 
keys (512/1024 bi
ts)
[Thu Dec 05 21:18:22 2002] [info] Init: Generating temporary DH parameters 
(512/1024 bits)
[Thu Dec 05 21:18:22 2002] [warn] Init: Session Cache is not configured 
[hint: SSLSessionC
ache]
[Thu Dec 05 21:18:22 2002] [info] Init: Initializing (virtual) servers for 
SSL
[Thu Dec 05 21:18:22 2002] [info] Server: Apache/2.0.43, Interface: 
mod_ssl/2.0.43, Librar
y: OpenSSL/0.9.6g
END in modperl_extra.pl, pid=6928
[Thu Dec 05 21:18:22 2002] [info] Init: Initializing OpenSSL library
[Thu Dec 05 21:18:22 2002] [info] Init: Seeding PRNG with 0 bytes of 
entropy
[Thu Dec 05 21:18:22 2002] [info] Init: Generating temporary RSA private 
keys (512/1024 bi
ts)
[Thu Dec 05 21:18:23 2002] [info] Init: Generating temporary DH parameters 
(512/1024 bits)
[Thu Dec 05 21:18:23 2002] [info] Init: Initializing (virtual) servers for 
SSL
[Thu Dec 05 21:18:23 2002] [info] Server: Apache/2.0.43, Interface: 
mod_ssl/2.0.43, Librar
y: OpenSSL/0.9.6g
[Thu Dec 05 21:18:23 2002] [notice] Apache/2.0.43 (Unix) 
mod_perl/1.99_07-dev Perl/v5.6.1
mod_ssl/2.0.43 OpenSSL/0.9.6g configured -- resuming normal operations
[Thu Dec 05 21:18:23 2002] [info] Server built: Dec  5 2002 20:29:02
[Thu Dec 05 21:18:23 2002] [debug] prefork.c(1039): AcceptMutex: sysvsem 
(default: sysvsem
)
[Thu Dec 05 21:18:23 2002] [error] Can't locate TestHooks/trans.pm in @INC 
(@INC contains:
 /home/richard/mod_perl-1.99_07/t 
/home/richard/mod_perl-1.99_07/blib/lib/Apache2 /home/ri
chard/mod_perl-1.99_07/blib/arch/Apache2 
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/A
pache2 /home/richard/mod_perl-1.99_07/Apache-Test/lib 
/home/richard/mod_perl-1.99_07/lib /
home/richard/mod_perl-1.99_07/blib/lib 
/home/richard/mod_perl-1.99_07/blib/arch /home/rich
ard/mod_perl-1.99_07/t/response /home/richard/mod_perl-1.99_07/t/protocol 
/home/richard/mo
d_perl-1.99_07/t/hooks /home/richard/mod_perl-1.99_07/t/filter 
/home/richard/mod_perl-1.99
_07/t/htdocs/testdirective/perlmodule-vh 
/home/richard/mod_perl-1.99_07/t/htdocs/testdirec
tive/main /usr/local/lib/perl5/5.6.1/i686-linux /usr/local/lib/perl5/5.6.1 
/usr/local/lib/
perl5/site_perl/5.6.1/i686-linux /usr/local/lib/perl5/site_perl/5.6.1 
/usr/local/lib/perl5
/site_perl) at (eval 18) line 3.


_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail



[mp2]Cookies?

2002-12-05 Thread Beau E. Cox
Hi -

I can't get cookies to work on AP/MP 2. Even in
compat mode. I'm not sure if this is a mod_perl,
apache, or a my stupidity question, but I'm posting it here
anyway.

I've searched the archives, CPAN, etc. and can't seem
to find the issue addressed. If I'm asking an already
answered question, sorry.

Aloha => Beau.

PS: Is it time for a separate mp2 list? It sure would help
in searching the archives if you are specifically looking
for an mp2 issue.




Re: [mp2]Cookies?

2002-12-05 Thread Randy Kobes
On Thu, 5 Dec 2002, Beau E. Cox wrote:

> Hi -
> 
> I can't get cookies to work on AP/MP 2. Even in
> compat mode. I'm not sure if this is a mod_perl,
> apache, or a my stupidity question, but I'm posting it here
> anyway.

Are you trying a module, or a home-grown solution?

-- 
best regards,
randy kobes




Re: [mp1] Still can not get working DSO configuration on Tru64

2002-12-05 Thread Marcin Kasperski
Marcin Kasperski <[EMAIL PROTECTED]> writes:

> > The results are exactly the same: link succeeded,
> > PL_perl_destruct_level is unresolved while running apache.
> 
> I found the workaround to avoid this effect: slightly patching apache
> build procedure so that the httpd binary is linked with perl
> libperl.so helped. The error disappears... now I get the coredump
> during the application startup. In case I manage to diagnose this core
> somehow, I will mention it here.

After recompiling perl, apache and modperl with debugging enabled I
got the following backtrace. Does it reminds anything to anyone?  I
suspect something wrong in the fact, that perl_startup is called so
late (during processing some PerlModule...)

(Carp module mentioned there just happened to be the first PerlModule
 mentioned in my apache config)

/apache-1.3.27, modperl-1.27/

Core file produced from executable 'httpd'
Thread terminated at PC 0x3ffbff67de8 by signal SEGV
(ladebug) where
>0  0x3ffbff67de8 in S_new_he() "hv.c":26
#1  0x3ffbff6b194 in Perl_share_hek(str=0x3feed70="@", len=1, hash=66) "hv.c":1484
#2  0x3ffbff688c8 in Perl_hv_store(hv=0x140048cb0, key=0x3feed70="@", klen=1, 
val=0x140048d80, hash=66) "hv.c":413
#3  0x3ffbff681f0 in Perl_hv_fetch(hv=0x140048cb0, key=0x3feed70="@", klen=1, 
lval=1) "hv.c":210
#4  0x3ffbff03b7c in Perl_gv_fetchpv(nambeg=0x3feed70="@", add=1, sv_type=4) 
"gv.c":669
#5  0x3ffbfefe56c in S_init_main_stash() "perl.c":2523
#6  0x3ffbfef9c18 in S_parse_body(env=0x0, xsinit=0x3000180ecd8) "perl.c":951
#7  0x3ffbfef9b0c in perl_parse(my_perl=0x140034040, xsinit=0x3000180ecd8, argc=3, 
argv=0x11fff9c48, env=0x0) "perl.c":895
#8  0x3000180f58c in perl_startup(s=0x14001e860, p=0x14001e818) "mod_perl.c":702
#9  0x30001817070 in perl_cmd_module(parms=0x11fffbe10, dummy=0x14001fdd8, 
arg=0x140020260="Carp") "perl_config.c":582
#10 0x12001cee8 in invoke_cmd(cmd=0x30041842828, parms=0x11fffbe10, 
mconfig=0x14001fdd8, args=0x11fff9daf="") "http_config.c":918
#11 0x12001d3ec in ap_handle_command(parms=0x11fffbe10, config=0x14001f250, 
l=0x11fff9da0="PerlModule Carp") "http_config.c":1030
#12 0x12001d4f8 in ap_srm_command_loop(parms=0x11fffbe10, config=0x14001f250) 
"http_config.c":1044
#13 0x12001db48 in ap_process_resource_config(s=0x14001e860, 
fname=0x1400112f0="/home/marcink/GAUSS/igoweb/src/tests/imf_efficiency/apache.conf", 
p=0x14001e818, ptemp=0x140338818) "http_config.c":1332
#14 0x12001ea30 in ap_read_config(p=0x14001e818, ptemp=0x140338818, 
confname=0x1400112f0="/home/marcink/GAUSS/igoweb/src/tests/imf_efficiency/apache.conf")
 "http_config.c":1616
#15 0x120010208 in standalone_main(argc=4, argv=0x11fffc018) "http_main.c":5071
#16 0x120010ce8 in main(argc=4, argv=0x11fffc018) "http_main.c":5456
#17 0x12000aad8 in __start(...) in /home/marcink/tools/apache/bin/httpd

When I removed PerlModule directives and sticked only with
PerlRequire, it occured that I must add 'use Apache;' on the beginning
to use things like Apache->push_handlers (on normal installations it
was not necessary, here I got ). And then I got similar coredump:

Core file produced from executable 'httpd'
Thread terminated at PC 0x3ffbff67de8 by signal SEGV
(ladebug) where
>0  0x3ffbff67de8 in S_new_he() "hv.c":26
#1  0x3ffbff6b194 in Perl_share_hek(str=0x3feed70="@", len=1, hash=66) "hv.c":1484
#2  0x3ffbff688c8 in Perl_hv_store(hv=0x140048cb0, key=0x3feed70="@", klen=1, 
val=0x140048d80, hash=66) "hv.c":413
#3  0x3ffbff681f0 in Perl_hv_fetch(hv=0x140048cb0, key=0x3feed70="@", klen=1, 
lval=1) "hv.c":210
#4  0x3ffbff03b7c in Perl_gv_fetchpv(nambeg=0x3feed70="@", add=1, sv_type=4) 
"gv.c":669
#5  0x3ffbfefe56c in S_init_main_stash() "perl.c":2523
#6  0x3ffbfef9c18 in S_parse_body(env=0x0, xsinit=0x3000180ecd8) "perl.c":951
#7  0x3ffbfef9b0c in perl_parse(my_perl=0x140034040, xsinit=0x3000180ecd8, argc=3, 
argv=0x11fff9c48, env=0x0) "perl.c":895
#8  0x3000180f58c in perl_startup(s=0x14001e860, p=0x14001e818) "mod_perl.c":702
#9  0x30001817274 in perl_cmd_require(parms=0x11fffbe10, dummy=0x14001fdd8, 
arg=0x140020260="/home/marcink/src/tests/startup.pl") "perl_config.c":613
#10 0x12001cee8 in invoke_cmd(cmd=0x30041842800, parms=0x11fffbe10, 
mconfig=0x14001fdd8, args=0x11fff9deb="") "http_config.c":918
#11 0x12001d3ec in ap_handle_command(parms=0x11fffbe10, config=0x14001f250, 
l=0x11fff9da0="PerlRequire /home/marcink/src/tests/startup.pl") "http_config.c":1030
#12 0x12001d4f8 in ap_srm_command_loop(parms=0x11fffbe10, config=0x14001f250) 
"http_config.c":1044
#13 0x12001db48 in ap_process_resource_config(s=0x14001e860, 
fname=0x1400112f0="/home/marcink/src/tests/apache.conf", p=0x14001e818, 
ptemp=0x140235818) "http_config.c":1332
#14 0x12001ea30 in ap_read_config(p=0x14001e818, ptemp=0x140235818, 
confname=0x1400112f0="/home/marcink/src/tests/efficiency/apache.conf") 
"http_config.c":1616
#15 0x120010208 in standalone_main(argc=4, argv=0x11fffc018) "http_main.c":5071
#16 0x120010ce8 in main(argc=4, argv=

RE: [mp2]Cookies?

2002-12-05 Thread Beau E. Cox
Hi Randy -

Sorry, I should have been more explicit. I am
trying to use Apache::Cookie. My Apache2 startup
script looks something like:

...
use Apache2 ();
use lib qw(/srv/www/perl);
use Apache::compat ();
use ModPerl::Util (); #for CORE::GLOBAL::exit
use Apache::RequestRec ();
use Apache::RequestIO ();
use Apache::RequestUtil ();
use Apache::Server ();
use Apache::ServerUtil ();
use Apache::Connection ();
use Apache::Log ();
use Apache::Session ();
use Apache::Cookie ();
...

Starting Apache2 with this script results in:

[Thu Dec 05 15:01:03 2002] [error] Can't locate object method "boot" via
package "mod_perl" at
/usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/Apache/Cookie.pm line
10.
Compilation failed in require at /srv/www/conf/startup.pl line 27.
BEGIN failed--compilation aborted at /srv/www/conf/startup.pl line 27.
Compilation failed in require at (eval 1) line 1.

Well, I say, what about that libapreq module I've heard about?
OK, so I get libapreq-1.1_rc1 (I figure, why not the latest?) untar
it, and:

perl Makefile.PL -apxs /mypathtoapache2apxs

and got:

Can't locate Apache/test.pm in @INC (@INC contains:
/usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/Apache2
/usr/lib/perl5/5.8.0/i586-linux-thread-multi /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at Makefile.PL
line 6.
BEGIN failed--compilation aborted at Makefile.PL line 6.

What's with the Apache/test.pm (small 't')? I added use Apache2;
(to add apache2 stuff to the @INC) - same results with or
without it. Searched for Apache/_small t _est.pm - not found.

I have the newbie blues

Aloha => Beau.

-Original Message-
From: Randy Kobes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 2:40 PM
To: Beau E. Cox
Cc: Modperl
Subject: Re: [mp2]Cookies?


On Thu, 5 Dec 2002, Beau E. Cox wrote:

> Hi -
>
> I can't get cookies to work on AP/MP 2. Even in
> compat mode. I'm not sure if this is a mod_perl,
> apache, or a my stupidity question, but I'm posting it here
> anyway.

Are you trying a module, or a home-grown solution?

--
best regards,
randy kobes






Re: All tests fail with Apache/2.0.43 (Unix) mod_perl/1.99_07-dev

2002-12-05 Thread Stephen Clouse
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, Dec 05, 2002 at 09:47:04PM +, Richard Curtis wrote:
> Hi.
>I have just installed and compiled perl 5.6.1, compiled Apache 
> 2.0.43 (with ssl support), and tried to get mod_perl 1.99_07-dev to 
> work.
> 
> mod_perl compiles, but when I run "make test" all tests fail.
> 
> Below is the first bit of output from the t/logs/error_log
> 
> I have looked on the newsgroups and google for answers but I am now lost.
> 
> Can anybody help to shed some more light on this ?
> More info can be made available if people need it.
[snip]
> [Thu Dec 05 21:18:23 2002] [error] Can't locate TestHooks/trans.pm in 
> @INC (@INC contains:
>  /home/richard/mod_perl-1.99_07/t 

More than likely permissions problems on your mod_perl directory --
particularly if you're building mod_perl as root (since Apache runs as nobody
in that case).

- -- 
Stephen Clouse <[EMAIL PROTECTED]>
Senior Programmer, IQ Coordinator Project Lead
The IQ Group, Inc. 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE97/5MA4aoazQ9p2cRAr/WAKDPF9s8NT8yMJjQKfk1/wka8xFEogCg8nMA
OrvQKgjpKmW12EEU7O3o6AI=
=fHlk
-END PGP SIGNATURE-



Re: apache2 + mod_perl2 + dbd::oracle

2002-12-05 Thread Stas Bekman
Marcin Kasperski wrote:

Fabian Kreitner <[EMAIL PROTECTED]> writes:



Hello all,

I have problems connecting to an oracle db using mod_perl but cant
figure out where the problem is. The script works fine from the bash
but not through perl::registry. The script only sets the environment
variables and then tries a connect.

(...)
!! ERROR: 12154 'Error while trying to retrieve text for error
ORA-12154 (DBD ERROR: OCIServerAttach)'



Either you removed message files from your Oracle installation (not
very likely) or you failed to set ORACLE_HOME so that OCI libraries
below DBD::Oracle notice this variable.

Double check the way you set your environment.


And if that's the case, watch the new culprit under 2.0:
http://perl.apache.org/docs/2.0/user/troubleshooting/troubleshooting.html#C_Libraries_Don_t_See_C__ENV__Entries_Set_by_Perl_Code



__
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: Online Tonight

2002-12-05 Thread Stas Bekman
David Wheeler wrote:

On Thursday, December 5, 2002, at 12:46  AM, Stas Bekman wrote:


Care to share with us how was the show? And how much mod_perl talk was 
in it?


I certainly mentioned how important Perl, mod_perl, Apache, Mason, and 
PostgreSQL are to the success of the project. The show went pretty well 
(and a few people who listened agree), but I think I got only around 
10-12 minutes time talking in the whole hour! Such is the nature of 
commercial radio, I guess. They plan to have me on again, though -- 
perhaps live from the floor of Macworld Expo; we'll see. I'll certainly 
keep pumping the above-mentioned software, though -- it's all crucial!

Great!


Unfortunately I wasn't able to listen to the broadcast due to some sw 
issues, the browser just hanged there... If the show was of interest 
to other mod_perl users, is there an mp3 that we can link to from 
perl.apache.org?


The show is online here:

  http://www.onlinetonight.net/archives/001100.html

I was on in the second hour (photo to appear later today), and you can 
listen to it via a WMA file. They were kind enough to give me MP3s of 
the hour, and once I get them edited, I'll post them somewhere. Probably 
on bricolage.cc. I think it might be of interest to others, although I 
suspect that the edited version might be of most interest, once I can 
provide it.

When you get the mp3, please send us a link, so we can link to it from 
perl.apache.org! Thanks.

__
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: All tests fail with Apache/2.0.43 (Unix) mod_perl/1.99_07-dev

2002-12-05 Thread Beau E. Cox
Hi -

I went through test failures (but not all) recently.

With Stas's help, here's what I did:

> Downloaded the CVS source - Stas made a chage that
  ficed my problems. See the 2.0 docs for how-to.

> If you did this under root, chown -R user:group mod_perl-2.0
  where user:group is a normal user (does not have to be
  the httpd.conf User/Group) and mod_perl-2.0 is the directory
  in which lies the CVS source.

> login as that user.

> run your perl Makefile.PL ..., make and make test.

> if all is well (I hope), and you are installing a system-wide
  mod_perl, login back in as root _before_ you make install.

Good luck.

Aloha => Beau.

-Original Message-
From: Stephen Clouse [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 3:33 PM
To: Richard Curtis
Cc: [EMAIL PROTECTED]
Subject: Re: All tests fail with Apache/2.0.43 (Unix)
mod_perl/1.99_07-dev


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thu, Dec 05, 2002 at 09:47:04PM +, Richard Curtis wrote:
> Hi.
>I have just installed and compiled perl 5.6.1, compiled Apache
> 2.0.43 (with ssl support), and tried to get mod_perl 1.99_07-dev to
> work.
>
> mod_perl compiles, but when I run "make test" all tests fail.
>
> Below is the first bit of output from the t/logs/error_log
>
> I have looked on the newsgroups and google for answers but I am now lost.
>
> Can anybody help to shed some more light on this ?
> More info can be made available if people need it.
[snip]
> [Thu Dec 05 21:18:23 2002] [error] Can't locate TestHooks/trans.pm in
> @INC (@INC contains:
>  /home/richard/mod_perl-1.99_07/t

More than likely permissions problems on your mod_perl directory --
particularly if you're building mod_perl as root (since Apache runs as
nobody
in that case).

- --
Stephen Clouse <[EMAIL PROTECTED]>
Senior Programmer, IQ Coordinator Project Lead
The IQ Group, Inc. 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE97/5MA4aoazQ9p2cRAr/WAKDPF9s8NT8yMJjQKfk1/wka8xFEogCg8nMA
OrvQKgjpKmW12EEU7O3o6AI=
=fHlk
-END PGP SIGNATURE-





Re: Online Tonight

2002-12-05 Thread David Wheeler
On Thursday, December 5, 2002, at 05:48  PM, Stas Bekman wrote:


When you get the mp3, please send us a link, so we can link to it from 
perl.apache.org! Thanks.

Will do.

David

--
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
http://david.wheeler.net/  Yahoo!: dew7e
   Jabber: [EMAIL PROTECTED]




Re: [mp2]Cookies?

2002-12-05 Thread Stas Bekman
Beau E. Cox wrote:

Hi Randy -

Sorry, I should have been more explicit. I am
trying to use Apache::Cookie.


AFAIK, Apache::Cookie won't work under mp2, because Apache::Request 
wasn't ported yet. Trying using CGI::Cookie for now, as it has the same 
API and implemented in pure perl.

Notice that this is not an issue of Apache::compat, because 
Apache::Cookie is implemented in XS.

What's with the Apache/test.pm (small 't')? I added use Apache2;
(to add apache2 stuff to the @INC) - same results with or
without it. Searched for Apache/_small t _est.pm - not found.


That's an older testing package coming from mp1. It won't work with mp2.


__
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: [mp2]Cookies?

2002-12-05 Thread Beau E. Cox
Hi Stas -

OK! Will do.

Aloha => Beau.

-Original Message-
From: Stas Bekman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 4:07 PM
To: Beau E. Cox
Cc: Randy Kobes; Modperl
Subject: Re: [mp2]Cookies?


Beau E. Cox wrote:
> Hi Randy -
> 
> Sorry, I should have been more explicit. I am
> trying to use Apache::Cookie.

AFAIK, Apache::Cookie won't work under mp2, because Apache::Request 
wasn't ported yet. Trying using CGI::Cookie for now, as it has the same 
API and implemented in pure perl.

Notice that this is not an issue of Apache::compat, because 
Apache::Cookie is implemented in XS.

> What's with the Apache/test.pm (small 't')? I added use Apache2;
> (to add apache2 stuff to the @INC) - same results with or
> without it. Searched for Apache/_small t _est.pm - not found.

That's an older testing package coming from mp1. It won't work with mp2.


__
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






[mp2] Stability under Windows - Resolved!

2002-12-05 Thread Andrzej Jan Taramina
I had bemoaned:

> I'm getting a lot of strange errors when trying to run my scripts under mp2.
> 
> Are there any known problems with mp2 that might cause this kind of behaviour?
> 
> I'm running Apache 2.0.43 with mod_perl 1.99_08 (the latest 2.0 version I 
> believe) with ActivePerl 5.6.1 on a Win2K SP2 server installation.

I downloaded and installed ActivePerl 5.8.0 and then installed the latest 
mod_perl 1.99_08 ppm for perl 5.8.0 and that seems to have eliminated all of 
my instabilities.

I suppose that the problem was related to the bad signal handling in 5.6.1 that 
was fixed in this latest release.

Now all I need to do is rebuild PerlMagick so that I can use ImageMagick 
under this environment (the pre-build ppm is only for ActivePerl 5.6.1)...and I'll 
be all set!

kewl!

Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com




Mod Perl in Linux Mandrake

2002-12-05 Thread Carlos Kassab
Hi:

I installed Apache in Linux Mandrake, Mod perl seems to be installed
according the rpm.


Now i installed the ASP module but i get the message that the Module
Apache:: ASP does not exist.
 
Somebody would knows how to solve this?

Thank you in advance for your help

Carlos Kassab




Re: Mod Perl in Linux Mandrake

2002-12-05 Thread Stas Bekman
Carlos Kassab wrote:

Hi:

I installed Apache in Linux Mandrake, Mod perl seems to be installed
according the rpm.


Now i installed the ASP module but i get the message that the Module
Apache:: ASP does not exist.
 
Somebody would knows how to solve this?

Thank you in advance for your help

Do yourself a favor and build everything by yourself. When you do that, 
you don't need to guess why this or that doesn't seem to be what it's 
likely to be.

...

If you persist and want to use a prepackaged things, that's cool too, 
but... you have to be more helpful if you want help:

What Apache version do you have installed?
What mod_perl version you *seem* to have installed?
Can you use mod_perl as it's installed?
What perl version do you have installed?
When you've installed Apache::ASP (I assume via CPAN.pm) which Perl 
installation did it go to?
Was mod_perl compiled with the same Perl, you've installed Apache::ASP with?

There are so many different versions and flavors of everything. If you 
don't tell us *all* the details, we can't guess what you have.

__
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



[mp2] default values for PerlInterp directives?

2002-12-05 Thread Andrzej Jan Taramina
Does anyone know what the default values are (that is, if you don't specify 
them) for the PerlInterpX directives?  I can't find this info anywhere in the 
docs...

PerlInterpStart 
PerlInterpMax 
PerlInterpMinSpare 
PerlInterpMaxSpare
PerlInterpMaxRequests
PerlInterpScope

Thanks!

Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com




Re: [mp2] default values for PerlInterp directives?

2002-12-05 Thread Stas Bekman
Andrzej Jan Taramina wrote:

Does anyone know what the default values are (that is, if you don't specify 
them) for the PerlInterpX directives?  I can't find this info anywhere in the 
docs...

PerlInterpStart 
PerlInterpMax 
PerlInterpMinSpare 
PerlInterpMaxSpare
PerlInterpMaxRequests
PerlInterpScope

Thanks!

from scr/modules/perl/modperl_config.c:

void *modperl_config_srv_create(apr_pool_t *p, server_rec *s)
{
[...]
scfg->interp_scope = MP_INTERP_SCOPE_REQUEST;

/* XXX: determine reasonable defaults */
scfg->interp_pool_cfg->start = 3;
scfg->interp_pool_cfg->max_spare = 3;
scfg->interp_pool_cfg->min_spare = 3;
scfg->interp_pool_cfg->max = 5;
scfg->interp_pool_cfg->max_requests = 2000;
[...]

they aren't documented because it wasn't decide what the default should 
be. But you are right, I'll document the current defaults and we will 
adjust the documentation if there are any changes.

__
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