Re: Perl Run and Load Average

2003-06-05 Thread Batara Kesuma
Hi Dale,

> Assuming your CGI scripts aren't doing strange things, liking hanging
> around after the session has closed and doing clean-up work, you might
> check your httpd.conf settings on the number of threads and requests per
> threads.  Its possible that your httpd threads are short-lived and
> restarting more often which now requires a lot more work to start since
> Perl is being loaded each time - just an idea.
> 
> MaxRequestsPerChild 1000# if this were too low, say 10 or 50,
> you would probably create more load
> 
> # If these were out of wack somehow, it could possibly create some
> # unusual
> load conditions
> MaxSpareServers 20
> MinSpareServers 5

I have this setting on my httpd.conf:

StartServers   8 
MinSpareServers5
MaxSpareServers   20
ServerLimit  300 
MaxClients   300
MaxRequestsPerChild  1000


Any idea on how can I tweak this setting? 


> I would also run "top -d 1" while your webserver is running without
> mod_perl to see what scripts are causing the load.  Do you have a
> database running on the same system?  Do you know if it might be doing
> more work?

The database server is on another machine, but I think I should try to
preload DBI module, and see the result.

I just noticed that the load was going down after I restarted httpd. Is
this because of my scripts have bugs? I think I have some DBI connect
without disconnect in my scripts. I will try to fix this and see how is
the result.






Re: [mp2] How do I find Documentation on . . .

2003-06-05 Thread Jack Nerad
Thanks for your reply.  I really appreciate your time, so I'll keep it 
brief.

Stas Bekman wrote:

Jack Nerad wrote:

 From December 2002. I saw no response to this message. Have things 
stabilized enough yet that there is documentation for these things?


There is a dynamic tool helping to figure out what's available:
http://perl.apache.org/docs/2.0/api/ModPerl/MethodLookup.html
Thanks.  That is better than nothing.  :)  Does the interface change 
much for Apache::RequestRec?

The real documentation is slowly being added. Someone has to do that 
and with no volunteers to help it'll take a long time to have it 
completed.
Do you mean to say that nobody is paying a technical writer for this 
project? ;)

Okay... I'll put my money where my mouth is.  If there's somebody I can 
pester for information, I'll put together some documentation.  I'm 
familiar with LaTeX, TeXInfo, perldoc, and I think I can figure out how 
to use DocBook, if you'd rather use that.  I'm also a sold Perl 
programmer (though not of the same caliber as the m_pH's) so if there's 
any source in Perl, I could probably figure things out, given a hint or 
two.  Let me know.

--
Jack Nerad
__
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: Perl Run and Load Average

2003-06-05 Thread Dale Lancaster
Assuming your CGI scripts aren't doing strange things, liking hanging around
after the session has closed and doing clean-up work, you might check your
httpd.conf settings on the number of threads and requests per threads.  Its
possible that your httpd threads are short-lived and restarting more often
which now requires a lot more work to start since Perl is being loaded each
time - just an idea.

MaxRequestsPerChild 1000# if this were too low, say 10 or 50, you
would probably create more load

# If these were out of wack somehow, it could possibly create some unusual
load conditions
MaxSpareServers 20
MinSpareServers 5

I would also run "top -d 1" while your webserver is running without mod_perl
to see what scripts are causing the load.  Do you have a database running on
the same system?  Do you know if it might be doing more work?

Stas already mentioned the pre-loading of modules which will help, but not
much if you have a misconfigured httpd.conf as mentioned above.

dale

- Original Message - 
From: "Batara Kesuma" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 05, 2003 5:23 AM
Subject: Perl Run and Load Average


> Hi,
>
> I have changed all my CGI scripts to run under Perl Run, and now I notice
> that the load average of my server (it is a dual CPUs) is very high. It
> stays around 2.5 all the time. Before, when I was running plain CGI, it
> was around 0.6 - 1.2. I checked the log file and I found that I only have
> around 10% more pageviews this week, so the load average shouldn't be that
> high. Is this normal? Any advice or comment? Thank you.
>
> --bk



Re: DirectoryIndex doesn't see SetHandler path

2003-06-05 Thread Stas Bekman
Michael Kropinack wrote:
Mark,

I think that I may be able to clarify this.  I ran into the same type of 
problem a few weeks ago.  I had always defined my handlers inside a "Location" 
block and couldn't get the DirectoryIndex to work properly.  I solved my 
problem by calling my handler from within a "Directory" block instead.

You should be able to find the answer you're looking for on the following page.  

http://httpd.apache.org/docs/sections.html
I hope that this is the issue. Marc has failed to say that he is using 
mp2/apache2, so I won't be surprised if this is yet another problem introduced 
by apache-2.0 (incompatible mod_dir behavior wrt apache-1.3). see my recent 
bug reports to the httpd-dev list.

-Original Message-
From: Marc M. Adkins [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 05, 2003 11:36 PM
To: [EMAIL PROTECTED]
Subject: DirectoryIndex doesn't see SetHandler path
This is going to seem odd...obscure...dumb...

I've been using code like this to set up handlers:

 
   SetHandler  perl-script
   PerlResponseHandler Some::Handler
 
Now I'm using this code to set up handlers for individual pages.  The
directive above is in a sense telling Apache "there is a directory
/some/path/index which contains files which should be processed via
Some::Handler" but in fact there is no such directory.  There is just a
handler.  So in my mind I'm defining a single page with a handler.
All this works OK, weird though it may be, until I want a directory index.
Say I want to go to url:
 /some/path

The DirectoryIndex directive doesn't allow me to say that 'index' is a
directory, only 'index.html'.  That is to say, the following:
 DirectoryIndex  index index.html

doesn't cause Apache to automatically find /some/path/index, even 
if I have
defined one using AddHandler.  I'm assuming this is because there 
is no such
file, the handler is attached to the /some/path/index directory, 
there isn't
anything for Apache to find.

For the moment I'm faking things out using the miracle of mod_rewrite:

 RedirectMatch ^/some/path/index\.html	/some/path/index

which makes it all work like I want.  NOW Apache finds the 
handler for some
reason.  So I'm not complaining, and I don't need a fix, but I 
wonder if I'm
missing something.

* AddHandler attaches a handler to a set of files with a given suffix.
* SetHandler attaches a handler to a location (a directory, right?)
 and all of the files therein.
* There isn't (?) a directive that attaches a handler to a single leaf
 in the directory tree which may in fact be non-existent in such a
 manner that the DirectoryIndex directive will find the leaf.
Have I missed something?  Am I abusing the tool?

mma





--

__
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: DirectoryIndex doesn't see SetHandler path

2003-06-05 Thread Michael Kropinack
Mark,

I think that I may be able to clarify this.  I ran into the same type of 
problem a few weeks ago.  I had always defined my handlers inside a "Location" 
block and couldn't get the DirectoryIndex to work properly.  I solved my 
problem by calling my handler from within a "Directory" block instead.

You should be able to find the answer you're looking for on the following page.  

http://httpd.apache.org/docs/sections.html

-Mike




> -Original Message-
> From: Marc M. Adkins [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 05, 2003 11:36 PM
> To: [EMAIL PROTECTED]
> Subject: DirectoryIndex doesn't see SetHandler path
> 
> 
> This is going to seem odd...obscure...dumb...
> 
> I've been using code like this to set up handlers:
> 
>   
> SetHandler  perl-script
> PerlResponseHandler Some::Handler
>   
> 
> Now I'm using this code to set up handlers for individual pages.  The
> directive above is in a sense telling Apache "there is a directory
> /some/path/index which contains files which should be processed via
> Some::Handler" but in fact there is no such directory.  There is just a
> handler.  So in my mind I'm defining a single page with a handler.
> 
> All this works OK, weird though it may be, until I want a directory index.
> Say I want to go to url:
> 
>   /some/path
> 
> The DirectoryIndex directive doesn't allow me to say that 'index' is a
> directory, only 'index.html'.  That is to say, the following:
> 
>   DirectoryIndex  index index.html
> 
> doesn't cause Apache to automatically find /some/path/index, even 
> if I have
> defined one using AddHandler.  I'm assuming this is because there 
> is no such
> file, the handler is attached to the /some/path/index directory, 
> there isn't
> anything for Apache to find.
> 
> For the moment I'm faking things out using the miracle of mod_rewrite:
> 
>   RedirectMatch ^/some/path/index\.html   /some/path/index
> 
> which makes it all work like I want.  NOW Apache finds the 
> handler for some
> reason.  So I'm not complaining, and I don't need a fix, but I 
> wonder if I'm
> missing something.
> 
> * AddHandler attaches a handler to a set of files with a given suffix.
> * SetHandler attaches a handler to a location (a directory, right?)
>   and all of the files therein.
> * There isn't (?) a directive that attaches a handler to a single leaf
>   in the directory tree which may in fact be non-existent in such a
>   manner that the DirectoryIndex directive will find the leaf.
> 
> Have I missed something?  Am I abusing the tool?
> 
> mma
> 
> 



Re: [mp2] How do I find Documentation on . . .

2003-06-05 Thread Stas Bekman
Jack Nerad wrote:
Thanks for your reply.  I really appreciate your time, so I'll keep it 
brief.

Stas Bekman wrote:

Jack Nerad wrote:

 From December 2002. I saw no response to this message. Have things 
stabilized enough yet that there is documentation for these things?


There is a dynamic tool helping to figure out what's available:
http://perl.apache.org/docs/2.0/api/ModPerl/MethodLookup.html


Thanks.  That is better than nothing.  :)  Does the interface change 
much for Apache::RequestRec?
I think this one is pretty stable, but others may still change.

The real documentation is slowly being added. Someone has to do that 
and with no volunteers to help it'll take a long time to have it 
completed.


Do you mean to say that nobody is paying a technical writer for this 
project? ;)
Technical writer? You must be kidding ;)

Okay... I'll put my money where my mouth is.  If there's somebody I can 
pester for information, I'll put together some documentation.  I'm 
familiar with LaTeX, TeXInfo, perldoc, and I think I can figure out how 
to use DocBook, if you'd rather use that.  I'm also a sold Perl 
programmer (though not of the same caliber as the m_pH's) so if there's 
any source in Perl, I could probably figure things out, given a hint or 
two.  Let me know.
Fantastic. We really need volunteers to help with the docs (at least manpages).

The infrastructure is all there. We use pod and everything gets glued together 
by DocSet. You can find more info here:
http://perl.apache.org/download/docs.html

there are a few bits of the Apache::RequestRec manpage
http://perl.apache.org/docs/2.0/api/Apache/RequestRec.html
This doc is converted from pod.
So get yourself familiar with the infrastructure, but don't do anything just 
yet. We have planned a bulked import of documentation bits from the Apache C 
header files, but it's incomplete. Seeing that it's not getting anywhere and 
hearing no news from Gerald Richter, I think I'll just go ahead and import 
whatever we have. And then everybody can chime in and help polish the docs.

Sounds like a plan?

__
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: Perl Run and Load Average

2003-06-05 Thread Batara Kesuma
Hi Stas,

> Based on your previous questions, my guess is that you are using
> mod_perl 1.99_09. Please be more verbose about your setup when asking
> questions.

Sorry, here is my setup.
mod_perl-1.99_09
httpd-2.0.40

> Do you preload the modules that you use at the server startup? Your
> PerlRun scripts should be the only ones that get recompiled. Try moving
> all the standard modules to startup.pl and see if it gets any better.

My startup.pl looks like:
#!/usr/bin/perl
use Apache2;
use Apache::compat ();
1;

I will try to move all standard modules to startup.pl. Do I need to delete
the standard modules from the scripts after I moved them to startup.pl? I
mean, after I moved:
use MyModule;

to startup.pl, do I need to delete it from the scripts? Or Perl Run will
automatically figure out that it has already been loaded and simply ignore
the one in the scripts? 


> Any reason why you don't use ModPerl::Registry?

Yes, since the scripts were running under plain CGI, they produce too many
errors if run under ModPerl::Registry. I am working on them, and use
PerlRun for the moment.

PS. Congratulations on the publication of your new book :)




DirectoryIndex doesn't see SetHandler path

2003-06-05 Thread Marc M. Adkins
This is going to seem odd...obscure...dumb...

I've been using code like this to set up handlers:

  
SetHandler  perl-script
PerlResponseHandler Some::Handler
  

Now I'm using this code to set up handlers for individual pages.  The
directive above is in a sense telling Apache "there is a directory
/some/path/index which contains files which should be processed via
Some::Handler" but in fact there is no such directory.  There is just a
handler.  So in my mind I'm defining a single page with a handler.

All this works OK, weird though it may be, until I want a directory index.
Say I want to go to url:

  /some/path

The DirectoryIndex directive doesn't allow me to say that 'index' is a
directory, only 'index.html'.  That is to say, the following:

  DirectoryIndex  index index.html

doesn't cause Apache to automatically find /some/path/index, even if I have
defined one using AddHandler.  I'm assuming this is because there is no such
file, the handler is attached to the /some/path/index directory, there isn't
anything for Apache to find.

For the moment I'm faking things out using the miracle of mod_rewrite:

  RedirectMatch ^/some/path/index\.html /some/path/index

which makes it all work like I want.  NOW Apache finds the handler for some
reason.  So I'm not complaining, and I don't need a fix, but I wonder if I'm
missing something.

* AddHandler attaches a handler to a set of files with a given suffix.
* SetHandler attaches a handler to a location (a directory, right?)
  and all of the files therein.
* There isn't (?) a directive that attaches a handler to a single leaf
  in the directory tree which may in fact be non-existent in such a
  manner that the DirectoryIndex directive will find the leaf.

Have I missed something?  Am I abusing the tool?

mma



Re: Perl Run and Load Average

2003-06-05 Thread Stas Bekman
Batara Kesuma wrote:
Hi,

I have changed all my CGI scripts to run under Perl Run, and now I notice
that the load average of my server (it is a dual CPUs) is very high. It
stays around 2.5 all the time. Before, when I was running plain CGI, it
was around 0.6 - 1.2. I checked the log file and I found that I only have
around 10% more pageviews this week, so the load average shouldn't be that
high. Is this normal? Any advice or comment? Thank you.
Based on your previous questions, my guess is that you are using mod_perl 
1.99_09. Please be more verbose about your setup when asking questions.

Do you preload the modules that you use at the server startup? Your PerlRun 
scripts should be the only ones that get recompiled. Try moving all the 
standard modules to startup.pl and see if it gets any better.

Any reason why you don't use ModPerl::Registry?

__
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


Perl Run and Load Average

2003-06-05 Thread Batara Kesuma
Hi,

I have changed all my CGI scripts to run under Perl Run, and now I notice
that the load average of my server (it is a dual CPUs) is very high. It
stays around 2.5 all the time. Before, when I was running plain CGI, it
was around 0.6 - 1.2. I checked the log file and I found that I only have
around 10% more pageviews this week, so the load average shouldn't be that
high. Is this normal? Any advice or comment? Thank you.

--bk


Re: How tell what version of mod_perl is installed?

2003-06-05 Thread Stas Bekman
Thomas Klausner wrote:
Hi!

On Don, Jun 05, 2003 at 12:35:37 -0700, Dennis G. Allard wrote:


I am running Red Hat 8.0, Apache/2.0.40.


AFAIK, mod_perl 1.x won't run with Apache 2.0, so I'm quite sure you're
running mod_perl 2 (which comes shipped with Red Hat 8)
But Dennis, you don't want the version that comes with RH8, it's 1 year old! 
get 1.99_09 from here:
http://perl.apache.org/download/index.html

to check the version you can do:

/home/stas> perl-blead   -Mmod_perl -le 'print mod_perl->VERSION'
1.2701
/home/stas> perl-blead -MApache2 -Mmod_perl -le 'print mod_perl->VERSION'
1.9910
As you can see, I have both. 1.9910 is mod_perl-2.0-tobe (but currently only 
1.9909 is available, 1.9910 is a cvs version).

__
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: How tell what version of mod_perl is installed?

2003-06-05 Thread Thomas Klausner
Hi!

On Don, Jun 05, 2003 at 12:35:37 -0700, Dennis G. Allard wrote:

> I am running Red Hat 8.0, Apache/2.0.40.

AFAIK, mod_perl 1.x won't run with Apache 2.0, so I'm quite sure you're
running mod_perl 2 (which comes shipped with Red Hat 8)

-- 
#!/usr/bin/perl   http://domm.zsi.at
for(ref bless{},just'another'perl'hacker){s-:+-$"-g&&print$_.$/}


How tell what version of mod_perl is installed?

2003-06-05 Thread Dennis G. Allard
I ran into some problems trying to get a Perl CGI script to make use of
IPC::Sharelite, so I want to understand the Apache and mod_perl
threading model in order to be able to use shared memory across multiple
Apache threads.

For starters, I better make sure I learn more about mod_perl 2.0, as in,
do I even have it on my system yet!

I am running Red Hat 8.0, Apache/2.0.40.

How do I tell if mod_perl 1.0 or mod_perl 2.0 is installed (or, at
least, that the .so is the .so for mod_perl 2.0)?

Some facts about my system that may help answer this question are
provided below...


[EMAIL PROTECTED] root]# httpd -V
Server version: Apache/2.0.40
Server built:   May 22 2003 05:19:58
Server's Module Magic Number: 20020628:0
Architecture:   32-bit
Server compiled with
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"



[EMAIL PROTECTED] root]# strings /usr/lib/httpd/modules/mod_perl.so
...
mod_perl/1.99_05-dev
...


[EMAIL PROTECTED] root]# cat /etc/httpd/conf.d/perl.conf
LoadModule perl_module modules/mod_perl.so

# This will allow execution of mod_perl to compile your scripts to
# subroutines which it will execute directly, avoiding the costly
# compile process for most requests.
#
#Alias /perl /var/www/perl
#
#
#dga- Here's my best guess at config so far:
#
Alias /perl /home/httpd/perl

  SetHandler perl-script
  PerlHandler ModPerl::Registry::handler
  PerlOptions +ParseHeaders
  Options +ExecCGI

[EMAIL PROTECTED] root]# 



[EMAIL PROTECTED] root]# cat /home/httpd/perl/startup.pl
#!/usr/bin/perl

use Apache::compat ();
1;



Thanks for any tips and help anyone might provide.

(BTW, my more general goal is to have shared memory across multiple
Apache threads as part of implementing sessions so that I can avoid
doing a database write at every HTTP request just to save session IDs.)

Cheers,
Dennis


-- 
Dennis G. Allard   telephone: 1.310.399.4740
Ocean Park Software http://oceanpark.com





Re: [mp2] make test fails to start httpd

2003-06-05 Thread Stas Bekman
Dave wrote:
Stas Bekman wrote:

You don't tell which version of OpenBSD you are on.


sorry, openbsd 3.3 with perl 5.8.0


FWIW, Philippe reported having no problems running mod_perl 2.0 on OpenBSD 3.3
(though I think you need to use current cvs for that).


thats good, I guess I'll try the code from cvs.
Actually I can't see it in the Changes, perhaps it wasn't committed. Philippe? 
Remember that patch you sent me to do IPV6 in Apache::Test on OpenBSD?

__
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] make test fails to start httpd

2003-06-05 Thread Dave

Stas Bekman wrote:
> You don't tell which version of OpenBSD you are on.

sorry, openbsd 3.3 with perl 5.8.0

> FWIW, Philippe reported having no problems running mod_perl 2.0 on OpenBSD 3.3
> (though I think you need to use current cvs for that).

thats good, I guess I'll try the code from cvs.
Dave


Re: [mp2] make test fails to start httpd

2003-06-05 Thread Stas Bekman
Eric Schwartz wrote:
On Wednesday, Jun 4, 2003, at 11:52 America/Denver, Dave wrote:

I am having the exact same test failure results on openbsd, and the
archives show that some people have had similar problems, with no
resolution that I have seen.
what happens if you manually run

/usr/local/apache2/bin/httpd -X -d ./t -f cont/httpd.conf

from within the toplevel mod_perl-1.99_09 directory?


It segfaults, just as you suspected.  The trace appears to be in 
libperl.so as well:

(gdb) bt
#0  0x005de974 in Perl_hv_store_flags ()
#1  0x005e1274 in Perl_hv_fetch ()
#2  0x0058e300 in Perl_gv_fetchpv ()
#3  0x005a1d24 in S_pending_ident ()
#4  0x00592418 in Perl_yylex ()
#5  0x005ad3d4 in Perl_yyparse ()
I remember seeing the same trace on OpenBSD 2.9. BTW, Eric have you tried 
building mod_perl 1.0 as DSO on that setup? I had exactly the same problems 
with it as with mod_perl 2.0.



__
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] make test fails to start httpd

2003-06-05 Thread Eric Schwartz
On Wednesday, Jun 4, 2003, at 11:52 America/Denver, Dave wrote:
I am having the exact same test failure results on openbsd, and the
archives show that some people have had similar problems, with no
resolution that I have seen.
what happens if you manually run

/usr/local/apache2/bin/httpd -X -d ./t -f cont/httpd.conf

from within the toplevel mod_perl-1.99_09 directory?
It segfaults, just as you suspected.  The trace appears to be in 
libperl.so as well:

(gdb) bt
#0  0x005de974 in Perl_hv_store_flags ()
#1  0x005e1274 in Perl_hv_fetch ()
#2  0x0058e300 in Perl_gv_fetchpv ()
#3  0x005a1d24 in S_pending_ident ()
#4  0x00592418 in Perl_yylex ()
#5  0x005ad3d4 in Perl_yyparse ()
#6  0x00614f4c in S_doeval ()
#7  0x00616550 in Perl_pp_require ()
#8  0x005e49a8 in Perl_runops_standard ()
#9  0x00588910 in Perl_call_sv ()
#10 0x0058c448 in S_call_list_body ()
#11 0x0058bfcc in Perl_call_list ()
#12 0x005b9fb8 in Perl_newATTRSUB ()
#13 0x005b4e5c in Perl_utilize ()
#14 0x005ae000 in Perl_yyparse ()
#15 0x00614f4c in S_doeval ()
#16 0x00616550 in Perl_pp_require ()
#17 0x005e49a8 in Perl_runops_standard ()
#18 0x00588910 in Perl_call_sv ()
#19 0x0058c448 in S_call_list_body ()
#20 0x0058bfcc in Perl_call_list ()
#21 0x005b9fb8 in Perl_newATTRSUB ()
#22 0x005b4e5c in Perl_utilize ()
#23 0x005ae000 in Perl_yyparse ()
#24 0x00614f4c in S_doeval ()
#25 0x00616550 in Perl_pp_require ()
#26 0x005e49a8 in Perl_runops_standard ()
#27 0x00588910 in Perl_call_sv ()
#28 0x0058c448 in S_call_list_body ()
#29 0x0058bfcc in Perl_call_list ()
#30 0x005b9fb8 in Perl_newATTRSUB ()
#31 0x005b4e5c in Perl_utilize ()
#32 0x005ae000 in Perl_yyparse ()
#33 0x00614f4c in S_doeval ()
#34 0x00616550 in Perl_pp_require ()
#35 0x005e49a8 in Perl_runops_standard ()
#36 0x00588e2c in Perl_eval_sv ()
#37 0x0058916c in Perl_require_pv ()
#38 0x00458a1c in modperl_require_file ()
#39 0x004549fc in modperl_config_apply_PerlRequire ()
#40 0x00452864 in modperl_startup ()
#41 0x00452eb8 in modperl_hook_init ()
#42 0x00455bbc in modperl_cmd_load_module ()
#43 0x000363a4 in invoke_cmd (cmd=0x46a9dc, parms=0xbb30, 
mconfig=0x343708, args=0x34e220 "TestDirective::perlloadmodule") at 
config.c:828
#44 0x00036a64 in ap_walk_config_sub (current=0x34e200, 
parms=0xbb30, section_vector=0x3020a8) at config.c:1082
#45 0x00036b04 in ap_walk_config (current=0x34e200, parms=0xbb30, 
section_vector=0x3020a8) at config.c:1121
#46 0x00037678 in ap_process_config_tree (s=0x300c58, 
conftree=0x3439c8, p=0x2fe548, ptemp=0x33e058) at config.c:1594
#47 0x00023f98 in main (argc=6, argv=0xbccc) at main.c:638
#48 0x28bc in _start (argc=6, argv=0xbccc, envp=0xbce8) at 
/SourceCache/Csu/Csu-45/crt.c:267
#49 0x273c in start ()

-=Eric



Re: [mp2] make test fails to start httpd

2003-06-05 Thread Stas Bekman
Dave wrote:
I am having the exact same test failure results on openbsd, and the
archives show that some people have had similar problems, with no
resolution that I have seen.
sure, and it was the same problem with aix earlier. The problem is with DSO 
loading and it's a different problem on each platform, though it inhibits 
itself in the same way to user's eye ;)

what happens if you manually run

/usr/local/apache2/bin/httpd -X -d ./t -f cont/httpd.conf

from within the toplevel mod_perl-1.99_09 directory?  the -X tells apache
to run as a single process, no forking.  the problem on openbsd is that
the fork'd child processes are getting segfaults somewhere in libperl.so,
but the parent process is doing its thing (fork'ing children) and
returning successfully.  I didn't post a bug report here because I think
its a problem with perl on openbsd.  Could this be a mod_perl problem?
the segfaults are due to attempts to access mem 0xabababab which is a
special value that perl uses (with the Poison macro) to try to make
catching segfaults easier.  I'm kinda stuck.
You don't tell which version of OpenBSD you are on. Philippe and I have spent 
a lot of time trying to make it working on OpenBSD 2.9, but weren't 
successful. I couldn't even run mod_perl 1, DSO with customly built perl. 
Using the system 5.6.0 perl was good for making mod_perl 1 DSO working, but 
it's of no use to mod_perl 2.0. The problem is that system 5.6.0 perl was 
customly build and I wasn't able to produce a similar version for 5.6.1 or 
higher and OpenBSD 2.9 is no longer supported, so 5.6.0 is the best you can get.

FWIW, Philippe reported having no problems running mod_perl 2.0 on OpenBSD 3.3 
(though I think you need to use current cvs for that).

__
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] How do I find Documentation on . . .

2003-06-05 Thread Stas Bekman
Jack Nerad wrote:
 From December 2002. I saw no response to this message. Have things 
stabilized enough yet that there is documentation for these things?
There is a dynamic tool helping to figure out what's available:
http://perl.apache.org/docs/2.0/api/ModPerl/MethodLookup.html
The real documentation is slowly being added. Someone has to do that and with 
no volunteers to help it'll take a long time to have it completed.

__
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: font width to pixel width in perl - but also offtopic in javascript

2003-06-05 Thread Davis, Benjamin
Image::Magick with a call to QueryFontMetrics should do the job.

Ben Davis


-Original Message-
From: Martin Moss [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 04, 2003 7:03 AM
To: Ken Y. Clark
Cc: [EMAIL PROTECTED]
Subject: Re: font width to pixel width in perl - but also offtopic in
javascript

Thanks,

I may well have found a solution within javascript, which is then user end
calculated, so more efficient and reliable,

But thanks I'll remember GD for later use:-)

Marty
- Original Message - 
From: "Ken Y. Clark" <[EMAIL PROTECTED]>
To: "Martin Moss" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, June 04, 2003 2:55 PM
Subject: Re: font width to pixel width in perl - but also offtopic in
javascript


| On Wed, 4 Jun 2003, Martin Moss wrote:
|
| > Date: Wed, 4 Jun 2003 14:46:52 +0100
| > From: Martin Moss <[EMAIL PROTECTED]>
| > To: [EMAIL PROTECTED]
| > Subject: font width to pixel width in perl - but also offtopic in
| > javascript
| >
| > Hi All,
| >
| > I'm sure this can't be an issue that hasn't been tackled, but I couldn't
| > find anything in the archives so:-
| >
| > I'm trying to find a way in which I can calculate the pixel width of a
| > string in a given font.
| > I'm doing this to feed a javascript file, so I am also looking at doing
this
| > in javascript also.
| >
| > currently all I can find is the php 'imagefontwidth' function. Does
anybody
| > know of an equivalent in perl?
| > I remember having issues like this in TK, but not sure the solution
there
| > would be appropriate.
| >
| > I guess this is fuzzily on topic, but if anybody has any off topic
| > experience I'd be greatful. any approx solutions which can 'guarentee' a
| > 'larger than the minimum space required' would also suffice, e.g. is
there
| > an approximation which I can use based upon the maximum character width
| > possible for a font etc...
| >
| > Regards
| >
| > Marty
|
| Just a wild guess, but perhaps you could load GD.pm and get various
| font widths from there?
|
| ky
|


Re: modperl 2.0: apache crashes when running modperl script

2003-06-05 Thread arunappa
Stas Bekman <[EMAIL PROTECTED]> wrote:


>'make install' after you have rebuilt mod_perl with MP_DEBUG=1? try to nuke
>/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/Apache
>and 'make install' again.
>
>Actually I know why this happens and why you have the segfault
>
>since you have had:
>
>MP_INST_APACHE2 => 1
>
>it must be installed into 
>i686-linux-thread-multi/Apache2/auto/Apache/RequestIO/RequestIO.so
>
>You probably had an older mod_perl install, and now it loads the wrong 
>library. I see that you didn't load Apache2 and that explains the problem.
>
>Add to your startup 'use Apache2' as explained here:
>http://perl.apache.org/docs/2.0/user/intro/start_fast.html#Configuration
>

I removed RequestIO.so inside 
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi/auto/Apache
and did 'make install'. Then added 'use Apache2' in the startup file
and there are no segfaults anymore.

Thanks,

Natarajan Murugaiyan(Ravi)

__
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455


RE: [OT] CGI::Push

2003-06-05 Thread McLean, Grant
Issac Goldstand wrote:
> Does anyone have success/failure stories using Push responses?
> 
> Please share.  Thanks.

I have successfully developed a couple of interesting 
push-based solutions, but the fact that IE didn't (doesn't?) 
support push meant that they weren't useful to my user base.

Grant


Re: [mp2] make test fails to start httpd

2003-06-05 Thread Dave


Ged Haywood wrote:
> On Wed, 4 Jun 2003, Dave wrote:
>
> > I am having the exact same test failure results on openbsd
>
> Did you build the Perl on that machine?
>
> If not, it might be worth a shot.

yes I did, I recompiled with debugging, and which causes the segfault to
occur in different function from the non-debugging build.

Dave


Re: [mp2] make test fails to start httpd

2003-06-05 Thread Ged Haywood
Hi there,

On Wed, 4 Jun 2003, Dave wrote:

> I am having the exact same test failure results on openbsd

Did you build the Perl on that machine?

If not, it might be worth a shot.

73,
Ged.



Re: [mp2] make test fails to start httpd

2003-06-05 Thread Dave

I am having the exact same test failure results on openbsd, and the
archives show that some people have had similar problems, with no
resolution that I have seen.

what happens if you manually run

/usr/local/apache2/bin/httpd -X -d ./t -f cont/httpd.conf

from within the toplevel mod_perl-1.99_09 directory?  the -X tells apache
to run as a single process, no forking.  the problem on openbsd is that
the fork'd child processes are getting segfaults somewhere in libperl.so,
but the parent process is doing its thing (fork'ing children) and
returning successfully.  I didn't post a bug report here because I think
its a problem with perl on openbsd.  Could this be a mod_perl problem?
the segfaults are due to attempts to access mem 0xabababab which is a
special value that perl uses (with the Poison macro) to try to make
catching segfaults easier.  I'm kinda stuck.

Dave

Eric Schwartz wrote:
> *** setting ulimit to allow core files
> ulimit -c unlimited; t/TEST -verbose=0
> /usr/local/apache2/bin/httpd  -d /usr/local/src/mod_perl-1.99_09/t -f
> /usr/local/src/mod_perl-1.99_09/t/conf/httpd.conf -DAPACHE2
> using Apache/2.0.46 (prefork MPM)
>
> waiting for server to start: ..[Wed Jun 04 00:11:21 2003] [info] 19
> Apache:: modules loaded
> [Wed Jun 04 00:11:21 2003] [info] 3 APR:: modules loaded
> [Wed Jun 04 00:11:21 2003] [info] base server + 8 vhosts ready to run
> tests
> 
> waiting for server to start: giving up after 61 secs
> !!! server failed to start! (please examine t/logs/error_log)
> make: *** [run_tests] Error 1


Re: mod_perl and CGI.pm and version 1.x and hell

2003-06-05 Thread Henrique Pantarotto
> it helps when problem reports include information that helps to debug the 
> problem. We can't possibly guess what setup you are using. In this case which 
> CGI version are you using? CGI 2.93 works just fine with mp1 and mp2.
> 
> CGI.pm does 'require Apache' only if it detects no mod_perl 2, but mod_perl 1.

Stas,

I thought I had the latest version, but you helped to realize I didn't. 
By mistake I downloaded and used version 2.753, thinking it was the
lastest one available, when actually it's from "March 2001".

The followin URL from CPAN confused me ("CGI.pm-2.753.tar.gz" appears
after "CGI.pm-2.93.tar.gz"):

http://www.cpan.org/modules/by-module/CGI/

Anyway, 2.753 didn't work, but 2.93 seems to work fine.

This is completely my fault, sorry for the trouble.


Regards, Henrique.



The Register Adopts Bricolage

2003-06-05 Thread David Wheeler
Hi All,

In yet another success for mod_perl, _The Register_ is currently 
building a Bricolage-powered content management infrastructure to power 
their site. They announcement is here:

  http://www.theregister.co.uk/content/31/30959.html

Regards,

David

PS: There have been a couple of other articles about Bricolage lately, 
too, both indicating that analyst firms (Bloor, Jupiter) are aware of 
Bricolage and looking at how it fits into the IT landscape.

  http://www.it-director.com/article.php?articleid=10868
  http://www.intranetjournal.com/articles/200305/ij_05_05_03a.html
--
David Wheeler AIM: dwTheory
[EMAIL PROTECTED]  ICQ: 15726394
http://kineticode.com/ Yahoo!: dew7e
   Jabber: [EMAIL PROTECTED]
Kineticode. Setting knowledge in motion.[sm]


Re: font width to pixel width in perl - but also offtopic in javascript

2003-06-05 Thread Martin Moss
Thanks,

I may well have found a solution within javascript, which is then user end
calculated, so more efficient and reliable,

But thanks I'll remember GD for later use:-)

Marty
- Original Message - 
From: "Ken Y. Clark" <[EMAIL PROTECTED]>
To: "Martin Moss" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, June 04, 2003 2:55 PM
Subject: Re: font width to pixel width in perl - but also offtopic in
javascript


| On Wed, 4 Jun 2003, Martin Moss wrote:
|
| > Date: Wed, 4 Jun 2003 14:46:52 +0100
| > From: Martin Moss <[EMAIL PROTECTED]>
| > To: [EMAIL PROTECTED]
| > Subject: font width to pixel width in perl - but also offtopic in
| > javascript
| >
| > Hi All,
| >
| > I'm sure this can't be an issue that hasn't been tackled, but I couldn't
| > find anything in the archives so:-
| >
| > I'm trying to find a way in which I can calculate the pixel width of a
| > string in a given font.
| > I'm doing this to feed a javascript file, so I am also looking at doing
this
| > in javascript also.
| >
| > currently all I can find is the php 'imagefontwidth' function. Does
anybody
| > know of an equivalent in perl?
| > I remember having issues like this in TK, but not sure the solution
there
| > would be appropriate.
| >
| > I guess this is fuzzily on topic, but if anybody has any off topic
| > experience I'd be greatful. any approx solutions which can 'guarentee' a
| > 'larger than the minimum space required' would also suffice, e.g. is
there
| > an approximation which I can use based upon the maximum character width
| > possible for a font etc...
| >
| > Regards
| >
| > Marty
|
| Just a wild guess, but perhaps you could load GD.pm and get various
| font widths from there?
|
| ky
|



Re: font width to pixel width in perl - but also offtopic in javascript

2003-06-05 Thread Ken Y. Clark
On Wed, 4 Jun 2003, Martin Moss wrote:

> Date: Wed, 4 Jun 2003 14:46:52 +0100
> From: Martin Moss <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: font width to pixel width in perl - but also offtopic in
> javascript
>
> Hi All,
>
> I'm sure this can't be an issue that hasn't been tackled, but I couldn't
> find anything in the archives so:-
>
> I'm trying to find a way in which I can calculate the pixel width of a
> string in a given font.
> I'm doing this to feed a javascript file, so I am also looking at doing this
> in javascript also.
>
> currently all I can find is the php 'imagefontwidth' function. Does anybody
> know of an equivalent in perl?
> I remember having issues like this in TK, but not sure the solution there
> would be appropriate.
>
> I guess this is fuzzily on topic, but if anybody has any off topic
> experience I'd be greatful. any approx solutions which can 'guarentee' a
> 'larger than the minimum space required' would also suffice, e.g. is there
> an approximation which I can use based upon the maximum character width
> possible for a font etc...
>
> Regards
>
> Marty

Just a wild guess, but perhaps you could load GD.pm and get various
font widths from there?

ky


font width to pixel width in perl - but also offtopic in javascript

2003-06-05 Thread Martin Moss
Hi All,

I'm sure this can't be an issue that hasn't been tackled, but I couldn't
find anything in the archives so:-

I'm trying to find a way in which I can calculate the pixel width of a
string in a given font.
I'm doing this to feed a javascript file, so I am also looking at doing this
in javascript also.

currently all I can find is the php 'imagefontwidth' function. Does anybody
know of an equivalent in perl?
I remember having issues like this in TK, but not sure the solution there
would be appropriate.

I guess this is fuzzily on topic, but if anybody has any off topic
experience I'd be greatful. any approx solutions which can 'guarentee' a
'larger than the minimum space required' would also suffice, e.g. is there
an approximation which I can use based upon the maximum character width
possible for a font etc...

Regards

Marty