Translation handler continuous loop problem

2001-02-01 Thread Sinclair, Alan (CORP, GEAccess)

I am hoping someone might have a clue on how to resolve this awkward
problem.

I have just installed a mod_perl URI translation handler to extract a
session id from the URI. In general the translation works correctly by
removing the session id from the URL when detected. However, a Netscape
browser client triggers Apache to enter a continuous loop if I do not
specify the domain name in the hostname component of the URL. The problem
does not occur in Internet Explorer (that surprised me.) 

All these examples are from Nestcape on both NT and Unix.
For example, say I enter http://lions.access.com/sp9/outage.html  The
translation handler works correctly.
If I then enter: http://lions/sp9/outage.html  There is a continuous loop in
Apache and on each iteration, an entry is written to access_log. I have to
stop the request in Netscape.

The bizarre thing is I can enter any other URL such as
http://lions/internal/whatever and there is no problem. The mod_perl
translation header goal is stripping session id info from the URL in the
form http://hostname/SESSION_ID/sp9/whatever It looks for sp9 in the path. I
have attempted to debug by trying to send error messages to the error log
without success. 

Does anyone have any suggestions on how I can determine why the translation
handler is entering into a continuous loop when a request is sent from
Netscape?

I would be appreciative of any help!!

Env is: Solaris 2.6  Apache 1.3.14  mod_perl 1.24_01



Best GCC compiler options for Intel (perl apache)

2001-02-01 Thread Tim Bunce

Can anyone recommend extra gcc options to squeeze the last ounce of
performance out of code (perl and apache in this case) on Intel?

I don't mind tying the code down to one cpu type or loosing the ability
to debug etc. We're already doing -O6 and are looking for more.

I recall Malcom Beattie (CC'd, Hi Malcolm!) experimenting in this area,
something about not wasting a register for the frame pointer.

I'm using gcc 2.95.2, is that the latest/best?
It's on FreeBSD 4.1 and 4.2.

Tim.



RE: Development Environment

2001-02-01 Thread Stathy Touloumis

I actually was nearlly successful in accomplishing some sort of mechanism by
which developer packages can be mapped to a virtual package which the real
package points to (did this make sense?).  Anyway, it needed to tap into the
symbol table way too extensively and ran into several problems.

I also thought about configuring the apache server differently on
development so that child processes get recycled much faster than on
production so as to allow for each request to use it's own memory.  This can
be resource intensive but again it would only be on development.  Also,
packages/modules will need to be called on a per request basis in
development.

I will let you know if it is feasible.

Thanks,

 I agree. I've seen many people try to do shared memory/cached programming
 in one server and it just doesn't work very well in practice. It
 only takes
 one programmer a typo to take everyone else down until the bug is fixed.

  From Jakarta/Tomcat to IIS to Apache/mod_perl. Developers having
 their own
 workstation is the best for testing and active development. Of course, a
 staging server needs to be shared. But it's a lot cleaner once the
 developer has debugged their own code.





Re: How do I debug failed tests? (error_log isn't helping)

2001-02-01 Thread Michael

 make test has various errors (failed 18 total)
 how do i debug these and fix them?

The test routines are just ordinary perl code that exercise various 
portions of the module. It is like debugging any other perl code.
I don't suppose that was the answer you wanted, but that's the way it 
works. You might start by finding the variable VERBOSE in the 
makefile and setting it to '1' 

Michael

 
 modules/cgi.ok 5/5FAILED test 4
 Failed 1/5 tests, 80.00% okay
 modules/perlrun.FAILED before any test output arrived
 modules/status..fetch /perl/perl-status failed!
 modules/status..dubious
 Test returned status 111 (wstat 28416, 0x6f00)
 DIED. FAILED tests 1-7
 Failed 7/7 tests, 0.00% okay
 internal/dirmagic...FAILED before any test output arrived
 internal/http-get...NOK 16FAILED test 16
 Failed 1/16 tests, 93.75% okay
 internal/rwrite.NOK 2FAILED tests 1-2
 Failed 2/2 tests, 0.00% okay
 internal/table..FAILED before any test output arrived
 
 Failed 7/33 test scripts, 78.79% okay. 11/244 subtests failed,
 95.49% okay.
 
 
 sorry if this has already been done over..
 oh, and is there an archive of this mailing list? (since i just
 subscribed, i'd like to look over some of the old stuff so i don't
 duplicate too much)
 
 thanks in advance..
 
 -- 
 jesse|everchanging.org
 



How do I debug failed tests? (error_log isn't helping)

2001-02-01 Thread jesse

here's current setup:
slackware 7.0, with kernel 2.2.16
trying to compile  test mod_perl 1.25 with fresh apache 1.3.17 source
have perl 5.6.0 installed
have libwww installed

make test has various errors (failed 18 total)
how do i debug these and fix them?

modules/cgi.ok 5/5FAILED test 4
Failed 1/5 tests, 80.00% okay
modules/perlrun.FAILED before any test output arrived
modules/status..fetch /perl/perl-status failed!
modules/status..dubious
Test returned status 111 (wstat 28416, 0x6f00)
DIED. FAILED tests 1-7
Failed 7/7 tests, 0.00% okay
internal/dirmagic...FAILED before any test output arrived
internal/http-get...NOK 16FAILED test 16
Failed 1/16 tests, 93.75% okay
internal/rwrite.NOK 2FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
internal/table..FAILED before any test output arrived

Failed 7/33 test scripts, 78.79% okay. 11/244 subtests failed, 95.49% okay.


sorry if this has already been done over..
oh, and is there an archive of this mailing list? (since i just subscribed, i'd like 
to look over some of the old stuff so i don't duplicate
too much)

thanks in advance..

-- 
jesse|everchanging.org



Re: IDE for Perl

2001-02-01 Thread Ken Y. Clark

On Thu, 1 Feb 2001, Jimi Thompson wrote:

 Date: Thu, 01 Feb 2001 11:48:07 -0600
 From: Jimi Thompson [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: IDE for Perl
 
 Can anyone tell me if there's a good IDE for PERL?  I have some big
 projects coming and having the debug/testing etc. would be sooo
 bonus.  I looked at ActivePerl, but was hoping that maybe there was
 something else either better or cheaper.   I wish Adobe and Macromedia
 would make a Linux version of everything.  Then I'd never have to touch
 "the other OS" again.
 
 --
 Jimi Thompson
 Web Master
 Link.com
 
 "It's the same thing we do every night, Pinky."
 
 

I prefer vi.  ;^)

ky




Re: Newbie mysterious 500 error with PerlFixupHandlers

2001-02-01 Thread judy selen


  We are using
  RedHat Linux apache 1.3.14 mod_perl_1.23_01
  
  Our site is set up to generate pages using a templating system to add
  custom headers footers and sidebars. As well we use .htaccess files to 
  further customize the subprocess_env.
 
  We are using custom modules installed as PerlFixupHandlers both for
 template generation and multilingual negotiation 
  
Negotiation.pm  handles lingual content negotiation. It determines
 what version of the page to present based on the users preferred
 variants and the available variants for that page.When the best match
is found, it 
performs an internal redirect to that document.

Template.pm is installed as a fixup handler, and is controlled through
various PerlSetVar directives.
 Basically, it determines what to include at the beginning and end of
the web page. 
fixup sets the content handler for the request.
 Also has two subroutines, handle_rec for static pages ,and handle_cgi
for scripts These allow the auto-inclusion of headers and footers of web
pages. 

 In httpd.conf
--
  DirectoryIndex index.cgi index.html 
 
  PerlRequire /www/perl/libs/WRI/Template.pm
  PerlRequire /www/perl/libs/WRI/Negotiation.pm
  
  PerlFixupHandler  WRI::Negotiation WRI::Template::fixup
---  

   These modules work 90% of the time
  
  The problem occurs when a directory is requested, and served as a
 negotiated document
  and is passed to our content handler. (handle_cgi)
  A save-as window pops up in the browser and Apache logs a 500
  error. (The file it is trying to save is the standard 500 internal
error message.)
  In the Template::fixup handler, the
 document is being detected as a cgi-script, not a server-parsed
 document.  The 500 occurs because we are trying to execute a static 
 document or directory.  
 
 Template.pm
 In run_cgi:
 
  unless (open(CGI,'-|')) {
 #don't need the writing handle to the pipe anymore
 close(WR); 
 
 #make STDIN be the read handle of the pipe (so we can get 
 #POST information from Apache)
 open(STDIN,'RD');
 
 #Run in the directory of the file
 $r-chdir_file($filename); 

### This returns 500 when a directory or static file is negotiated ###

 #Run the file
 exec($filename) || return SERVER_ERROR;
 }
 
  
Error Log:

 [Wed Jan 31 13:04:52 2001] [error] Can't use string ("500") as a symbol
  ref while "strict refs" in use at /www/perl/libs/WRI/Template.pm line
  302.
  
  [Wed Jan 31 13:04:55 2001] [error] Usage: Apache::cgi_header_out(r,
 key,
  ...) at /www/perl/libs/WRI/Template.pm line 433.
  
  These lines numbers may not be accurate since we have added and
deleted
  debugging code..
 
 
  Template.pm - handle_cgi:
  
#FIXME - needs error checking.  If run CGI fails, $cgi will have 
 #the number 500 instead of a file handle, and will fail
 later on
 
  my $cgi = run_cgi($r, $r-filename(), $r-uri());
 
  line 302:
   while ($cgi) {
  
  #remove the trailing body and html tags from the CGI output
  #if we are using includes
  if ($addincs) {
 
  s!/(body|html)[^]*!!gio;
  }
  
  #print out the line that we just read
  $r-print($_);
  }
  
.
.
.

do {
  #Quit if this is the end of the headers
  last if ($_ eq $/);
  
  #remove the LF or CRLF
  chomp;
 
  #Give apache the header line
  unless ($is_sub) {
line 433:  $r-cgi_header_out(split(/:\s*/,$_,2));
  }
  } while (CGI);
 
 
  -
 
  My understanding is that when OK or DECLINED is returned from these
  modules in the list of fixup handlers, control passes to the next,
  and when DONE is returned, the remaining  are
  skipped mod_dir regains control and the next default file is requested
  (index.cgi index.html)
  
  Is this correct or is there something I am misunderstanding.

Request Outline
---
mod_dir sends directory request to Negotiation.pm

/products/student/calcwiz/
returns OK from Nego.pm 
mod_dir then sends index.cgi - index.html
Nego.pm negotiates index.cgi and each of available variations
then index.html ..

when found most appropriate
Negotiating:
/products/student/calcwiz/index.en.html

Template.pm
 handling request..
/products/student/calcwiz/index.en.html



  Another Clue
  This error recurs when the page is reloaded 25 - 30 times
  MaxRequestsPerChild is 30
 Could this be related to our problem.
 
 I appreciate any clues anyone may have to why this problem occurs.
 Thanks in advance,
 Judy



RE: [OT] Dynamically changing current package

2001-02-01 Thread mgraham



 Andrew Ho [EMAIL PROTECTED] wrote:
 I know how to use "package" in the normal case, where it's static.
 However, you can't say "package $foo" or even "eval 'package 
 foo'" or even "BEGIN { eval 'package foo' }." I'm wondering 
 if there's any way short of hacking the Perl source itself 
 to make the compiler dynamically choose a namespace.

The reason your eval examples don't work is because the scope of the package
declaration only extends to the end of the current block, the end of the
current file, or the end of the current 'eval', whichever comes first.

If you want to put code into a particular package at runtime, you have to
recompile that code along with the package declaration:

eval "
package $foo;
$scalar_containing_some_code
";

Or you can pull in the code from an external file:
   
eval "
package $foo;
do '$script';
";

The package declaration is scoped the way it is is because it is a
compile-time directive, not a run-time directive.  Code is placed into a
particular package at compile-time; to change the package of a particular
piece of code at run-time really means to destroy that compiled code and to
recompile it in a new package.  This is essentially what happens when you
use the string form of eval, above.  


Michael




Re: IDE for Perl

2001-02-01 Thread Carlos Ramirez


Perl Builder 2.0 at http://www.solutionsoft.com/perl.htm
is a good tool, but i always end up going back to using vi, since escaping
gets in the way with other editors.
-Carlos

"Ken Y. Clark" wrote:
On Thu, 1 Feb 2001, Jimi Thompson wrote:
> Date: Thu, 01 Feb 2001 11:48:07 -0600
> From: Jimi Thompson [EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: IDE for Perl
>
> Can anyone tell me if there's a good IDE for PERL? I have some
big
> projects coming and having the debug/testing etc. would be sooo
> bonus. I looked at ActivePerl, but was hoping that maybe there
was
> something else either better or cheaper. I wish Adobe
and Macromedia
> would make a Linux version of everything. Then I'd never have
to touch
> "the other OS" again.
>
> --
> Jimi Thompson
> Web Master
> Link.com
>
> "It's the same thing we do every night, Pinky."
>
>
I prefer vi. ;^)
ky

--
---
Carlos Ramirez + Boeing + Reusable Space Systems + 714.372.4181
---
-- Don't make me use uppercase



Re: How do I debug failed tests? (error_log isn't helping)

2001-02-01 Thread Ken Williams

Jesse,

It looks from your output like the server isn't even running for these
tests.  Try to figure out whether that's true, and if so why it stopped
(or never started).

The debugging process here is admittedly a bit difficult.

There's an archive at http://mathforum.com/epigone/modperl/ .

[EMAIL PROTECTED] (jesse) wrote:
here's current setup:
slackware 7.0, with kernel 2.2.16
trying to compile  test mod_perl 1.25 with fresh apache 1.3.17 source
have perl 5.6.0 installed
have libwww installed

make test has various errors (failed 18 total)
how do i debug these and fix them?

modules/cgi.ok 5/5FAILED test 4
Failed 1/5 tests, 80.00% okay
modules/perlrun.FAILED before any test output arrived
modules/status..fetch /perl/perl-status failed!
modules/status..dubious
Test returned status 111 (wstat 28416, 0x6f00)
DIED. FAILED tests 1-7
Failed 7/7 tests, 0.00% okay
internal/dirmagic...FAILED before any test output arrived
internal/http-get...NOK 16FAILED test 16
Failed 1/16 tests, 93.75% okay
internal/rwrite.NOK 2FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
internal/table..FAILED before any test output arrived

Failed 7/33 test scripts, 78.79% okay. 11/244 subtests failed, 95.49% okay.


sorry if this has already been done over..
oh, and is there an archive of this mailing list? (since i just subscribed,
i'd 
like to look over some of the old stuff so i don't duplicate
too much)

thanks in advance..

-- 
jesse|everchanging.org


  ------
  Ken Williams Last Bastion of Euclidity
  [EMAIL PROTECTED]The Math Forum



Apache-ASP, XML::XSLT, XML::DOM

2001-02-01 Thread Christian Heiss



I have to 
install Apache-ASP, and there is a optional modul XSLT.I tried to install 
this module but there is another prerequisite Modul XML::DOM needed. If I 
want install this, the "make test" command failed, with the error message: 
"Can't locate object method 'equals' via package 
'XML::Parser::ContentModel' at CmpDOM.pm line 168"But the 
XML::Parser is already installed without an error message?I'm using SuSE 
Linux 7.0 with Apache 1.3.14 and mod_perl-1.24_01.Other modules like 
Apache-Mason-0.896, XML-XPath-1.03,... installed sucessfully.Anyone can 
help me what i have to to, to fix my problem?ThanksChristian 
Heiss


problems installing mod_perl when apache is already installed...

2001-02-01 Thread Webmaster


I'm looking forward to start using 
Apache and mod_perl together...etc. The common E-commerce scenario. I will also 
be planning to put in Embperl, and use MySQL. I have a RH 7.0 system with Apache 
1.3.12 already installed and previously configured by me. Now I'm trying to 
install mod_perl but I'm having problems cuz it seems like I can't find the 
Apache source anywhere!!! Obviously if it comes pre-installed, then it would be 
a RPM package. I queried...but stillI can't find the source...I'm 
looking at trying this with mod_perl installation: 
# cd /usr/src/mod_perl-1.25# perl Makefile.PL 
APACHE_SRC=../apache_x.x.x/src \DO_HTTPD=1 USE_APACI=1 EVERYTHING=1# 
make  make test  make install 
but these seem to be instructions for installing Apache also...but I don't 
want to uninstall, for fear of dependency conflicts with modules 
Is there a way to solve this problem???

perhaps this problem can be solved if I find a mod_perl rpm packagebut I 
can't find one anywhere on the netcan anyone help with 
this???


RE: Translation handler continuous loop problem

2001-02-01 Thread Sinclair, Alan (CORP, GEAccess)

This is a repost because my earlier message from this morning bounced. Since
then I feel we have located the source of the problem. It looks like there
is a most bizarre interaction between Netscape clients and the proxy server.
Netscape was configured with manual proxy settings identifying the web
server with Apache/mod_perl.  Once this was done, Netscape is able to
successfully connect to Apache/mod_perl with no more continuous loops!!  I
don't know the whys or hows.


The following text is a copy of what I posted this morning.

Thanks for the example. I inserted the statement "return DECLINED unless
$r-is_initial_req;"  but the handler still enters a continuous loop.  I
also stripped out my code and tried the example from Doug's module book with
debug statements but still a continuous loop. The problem is bizarre. It
only enters the loop for a URL like http://lions/sp9/whatever  Any other URL
such as http://lions/here/there works fine. I wrote the original handler to
extract a session id from a URL with sp9 in the path but now there is no
reference. I have checked my httpd.conf for anything out of ordinary as
well. As can be seen, the translation handler below is very very basic but
it still enters a continuous loop for that specific URL. If I place a fully
qualified donamin name like http://lions.access.com/sp9/whatever, there is
no loop!!  

Any ideas?

package Apache::URIsid;
use strict;
use Apache::Constants qw(:common);
use CGI::Carp;

sub handler {
  my $r = shift;

  return DECLINED unless $r-is_initial_req;
  my($junk,$session,@rest) = split '/', $r-uri;
#  warn "junk: $junk";
#  warn "session: $session";
#  foreach (@rest) {
#warn "rest: $_";
#  }

  my $uri = $r-uri;
  warn "URI in: $uri";
  return DECLINED;

#  my $uri_in = $r-uri;
#  warn "sp9 URL detected $uri_in"; 
#  $r-subprocess_env('SESSION_ID' = $session); 
#  my $translated_uri = join "/", "",@rest;
#  $r-uri($translated_uri);
#  return DECLINED;
}
1;
__END__



-Original Message-
From: Greg Cope [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 5:47 PM
To: Sinclair, Alan (CORP, GEAccess)
Cc: '[EMAIL PROTECTED]'
Subject: Re: Translation handler continuous loop problem


"Sinclair, Alan (CORP, GEAccess)" wrote:
 
 I am hoping someone might have a clue on how to resolve this awkward
 problem.
 
 I have just installed a mod_perl URI translation handler to extract a
 session id from the URI. In general the translation works correctly by
 removing the session id from the URL when detected. However, a Netscape
 browser client triggers Apache to enter a continuous loop if I do not
 specify the domain name in the hostname component of the URL. The problem
 does not occur in Internet Explorer (that surprised me.)
 
 All these examples are from Nestcape on both NT and Unix.
 For example, say I enter http://lions.access.com/sp9/outage.html  The
 translation handler works correctly.
 If I then enter: http://lions/sp9/outage.html  There is a continuous loop
in
 Apache and on each iteration, an entry is written to access_log. I have to
 stop the request in Netscape.
 
 The bizarre thing is I can enter any other URL such as
 http://lions/internal/whatever and there is no problem. The mod_perl
 translation header goal is stripping session id info from the URL in the
 form http://hostname/SESSION_ID/sp9/whatever It looks for sp9 in the path.
I
 have attempted to debug by trying to send error messages to the error log
 without success.
 
 Does anyone have any suggestions on how I can determine why the
translation
 handler is entering into a continuous loop when a request is sent from
 Netscape?
 
 I would be appreciative of any help!!

I could be completely wrong but ...

I can't see a problem here - although I would need to see the code.

There could be an issue with how IE and Netscape actually format the
header (i.e you may enter the above, but the header that gets sent may
be different) - but I could be completely wrong on this !

You may wish to look at http://sourceforge.net/projects/sessionmanager/

Which is URI transhandler / session manager that I wrote for a project
that never came about.  I may make another release that uses PerlSetVars
to configure the module if I get a chance to test it.

If this does not help, then post either the code, or a URL to the code
if its long, so that some of us can have a look.

Greg

 
 Env is: Solaris 2.6  Apache 1.3.14  mod_perl 1.24_01



RE: Apache::ASP

2001-02-01 Thread Wang, Pin-Chieh


If Ged did not answer your question well enough, check out
this answered as an FAQ item at:


http://www.apache-asp.org/faq.html#Apache%20errors%20on%20the%20PerlHandler%
20directive%20%3F

--Josh

Hi, Josh,
I now re-installed a fresh copy Apache_1.3.14 with mod_perl-1.24_01 with
USE_DSO=1
  -- now the LoadModule and AddModule directive is automatically added in
httpd.conf 
I then did the following steps
1. Installed Apache-ASP-2.07
2. Copied Apache-ASP-2.07/site/eg directory into /usr/local/apache/htdocs
3. Modified httpd.conf file by adding 
Directory "/usr/local/apache/ htdocs/eg"
Options All
AllowOverride All
Order allow,deny
Allow from all
 /Directory
   AND
 Location /asp/
SetHandler perl-script
PerlHandler Apache:ASP
PerlSetVar Global /tmp
 /Location

When I call http://host/eg/index.html to test asp I got
#!/usr/local/bin/perl5 asp
[0]%([0]%source)

on the browser

there is no error at error_log. and the perl on my machine is at
/usr/local/perl and is 5.6
I tried to modify the #! line to indicate the location of local perl, but
still not work.

any body give me any guidance?

Thanks

PC






Re: problems installing mod_perl when apache is already installed...

2001-02-01 Thread Buddy Lee Haystack

Try installing it DSO. The following link will provide some directions.

http://perl.apache.org/guide/install.html#Installing_separate_Apache_and_m


 Webmaster wrote:
 
 I'm looking forward to start using Apache and mod_perl together...etc. The common 
E-commerce scenario. I will also be planning to put in Embperl, and use MySQL. I have 
a RH 7.0 system with Apache 1.3.12 already installed and previously configured by me. 
Now I'm trying to install mod_perl but I'm having problems cuz it seems like I can't 
find the Apache source anywhere!!! Obviously if it comes pre-installed, then it would 
be a RPM package. I queried...but stillI can't find the source...
 I'm looking at trying this with mod_perl installation:
 
 # cd /usr/src/mod_perl-1.25
 # perl Makefile.PL APACHE_SRC=../apache_x.x.x/src \
 DO_HTTPD=1 USE_APACI=1 EVERYTHING=1
 # make  make test  make install
 
 but these seem to be instructions for installing Apache also...but I don't want to 
uninstall, for fear of dependency conflicts with modules
 
 Is there a way to solve this problem???
 
 
 
 perhaps this problem can be solved if I find a mod_perl rpm packagebut I can't 
find one anywhere on the netcan anyone help with this???



suexec denies execution of scripts

2001-02-01 Thread Gustavo Vieira Goncalves Coelho Rios

hi folks! I am trying to get virtualhosts configured so it permited to
execute my scripts from them.

The problem is that when i call my scripts using the domain uri i get an
error on suexec_log.

Here is it:

[2001-02-01 17:44:45]: error: command not in docroot
(/usr/home/hortalica/.public_html/cgi-bin/awcs.cgi)


That's always happens when i try
http://www.hortalica.com.br/cgi-bin/awcs.cgi
But when i try http://www.hortalica.com.br/~hortalica/cgi-bin/awcs.cgi i
get no problem and my scripts runs perfectly.

Here is my virtualhost configuration.

VirtualHost 192.168.1.10:80
DocumentRoot /usr/home/hortalica/.public_html
ServerName www.hortalica.com.br
Directory /usr/home/hortalica/.public_html
Options Includes
/Directory
Directory /usr/home/hortalica/.public_html/cgi-bin
Options ExecCGI
/Directory
/VirtualHost


Now the questions: Why i get this error "command not in docroot"?



Re: Apache-ASP, XML::XSLT, XML::DOM

2001-02-01 Thread Joshua Chamas

 Christian Heiss wrote:
 
 I have to install Apache-ASP, and there is a optional modul XSLT.
 I tried to install this module but there is another prerequisite
 Modul XML::DOM needed. If I want install this, the "make test"
 command failed, with the error message:
 
 "Can't locate object method 'equals' via package 'XML::Parser::ContentModel' at 
CmpDOM.pm line 168"
 

You only need this if you want to use the XSLT feature for
Apache::ASP, which is unlikely.  If you do, then I would 
suggest installing with CPAN   Bundle::XML , and then 
build your apache with the disable-rule=EXPAT like so:

# modperl part
perl Makefile.PL \
APACHE_SRC=../apache_1.3.14/src \
NO_HTTPD=1 \
USE_APACI=1 \
PREP_HTTPD=1 \
EVERYTHING=1

# apache part
./configure \
--prefix=/usr/local/apache \
--activate-module=src/modules/perl/libperl.a \
--enable-module=proxy \
--enable-module=so \
--disable-rule=EXPAT

-- Josh

_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks  free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051



RE: Apache::ASP

2001-02-01 Thread Wang, Pin-Chieh



Make sure you got the .htaccess file from the site/eg 
example directory .. the problem here is that your ASP
config has not been activated.  You could also try setting
the Location to /eg/

--Josh

I just noticed the "make test" part of installation has error  * error
code 29
with Command failed for target 'test_dynamic'

any ideal why this is failed? if this failure cause asp not running
correctly?

PC



Re: Apache::ASP

2001-02-01 Thread Joshua Chamas

"Wang, Pin-Chieh" wrote:
 
  Location /asp/
 SetHandler perl-script
 PerlHandler Apache:ASP
 PerlSetVar Global /tmp
  /Location
 
 When I call http://host/eg/index.html to test asp I got
 #!/usr/local/bin/perl5 asp
 [0]%([0]%source)
 

Make sure you got the .htaccess file from the site/eg 
example directory .. the problem here is that your ASP
config has not been activated.  You could also try setting
the Location to /eg/

--Josh



Devel-Symdump Failure

2001-02-01 Thread Wang, Pin-Chieh

Hi,
I installed Apache_1.3.14 with mod_perl 1.24_01 with DSO
everything seems o.k.
then I installed Apache-ASP-2.07 found I missing Devel::Symdump
I then went back to install Devel::Symdump
But when I make test in Devel::Symdump I had failure in 1/13 test
with error code 29
command failed for target 'test_dynamic'

Any body has any ideals?
Thanks

PC




ANNOUNCE: Apache-AuthenCache-0.04.tar.gz

2001-02-01 Thread jbodnar

Special thanks to Christian Gilmore who did a partial rewrite to switch the
cache to IPC::Cache, clean up code, and remove the logging of passwords.

-FW: [EMAIL PROTECTED]-

Date: Thu, 1 Feb 2001 22:11:05 +0100
From: PAUSE [EMAIL PROTECTED]
To: Jason Bodnar [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: CPAN Upload: J/JB/JBODNAR/Apache-AuthenCache-0.04.tar.gz

The uploaded file

Apache-AuthenCache-0.04.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/J/JB/JBODNAR/Apache-AuthenCache-0.04.tar.gz
  size: 4385 bytes
   md5: 2984cc8c6aedf033701275bca0f393ca

No action is required on your part
Request entered by: JBODNAR (Jason Bodnar)
Request entered on: Thu, 01 Feb 2001 21:10:14 GMT
Request completed:  Thu, 01 Feb 2001 21:11:05 GMT

Virtually Yours,
Id: paused,v 1.72 2000/12/26 15:12:53 k Exp k 

--End of forwarded message-

-- 
Jason Bodnar
[EMAIL PROTECTED]
Gocho Networks

Marge, this ticket doesn't just give me a seat.  It also gives me the 
right -- no, the duty -- to make a complete ass of myself.

-- Homer Simpson
   Dancin' Homer




RE: [OT] Dynamically changing current package

2001-02-01 Thread Robert Landrum

You can also change the package using globs.

*{NewPackage::} = *{TestPackage::};

NewPackage will then contain all things in TestPackage

Then you can redefined everything in TestPackage without affecting 
anything in NewPackage.

You can also do something like

for my $name (keys %{Test::}) {
*{"NewPackage::".$name} = *{"Test::".$name} if($name =~ /somefunc/);
}

That's a poor mans export

You can also load different modules based on developer if you force 
them to log in and create packages preceeded by their usernames

$user = $r-connection-user; # right?
$usrpkg = $user."::Foo::";
*{original::Foo::} = *{Foo::} unless(defined *{original::Foo::});

*{Foo::} = (defined *{$usrpkg}) ? *{$usrpkg} : *{original::Foo::};
# in case another user has already loader their stuff over top of Foo.

That should make life interesting... I've never actually tried any of 
this, I'm just spitting out some ideas...

Robert Landrum





At 12:34 PM -0500 2/1/01, [EMAIL PROTECTED] wrote:
  Andrew Ho [EMAIL PROTECTED] wrote:
 I know how to use "package" in the normal case, where it's static.
 However, you can't say "package $foo" or even "eval 'package
 foo'" or even "BEGIN { eval 'package foo' }." I'm wondering
 if there's any way short of hacking the Perl source itself
 to make the compiler dynamically choose a namespace.

The reason your eval examples don't work is because the scope of the package
declaration only extends to the end of the current block, the end of the
current file, or the end of the current 'eval', whichever comes first.

If you want to put code into a particular package at runtime, you have to
recompile that code along with the package declaration:

eval "
package $foo;
$scalar_containing_some_code
";

Or you can pull in the code from an external file:
  
eval "
package $foo;
do '$script';
";

The package declaration is scoped the way it is is because it is a
compile-time directive, not a run-time directive.  Code is placed into a
particular package at compile-time; to change the package of a particular
piece of code at run-time really means to destroy that compiled code and to
recompile it in a new package.  This is essentially what happens when you
use the string form of eval, above. 


Michael




RE: suexec denies execution of scripts

2001-02-01 Thread Stathy Touloumis

Because suexec is build with a predefined path which allows only scripts
underneath that path to run in.  You need to find out what the 'docroot' is
and be sure that your script is underneath this path.  There are several
other restrictions that need to be done to ensure that cgi's being run under
suexec need to adhere to.

http://www.apache.org/docs/suexec.html

 I respectfully request your help in order to get this working. My .cgi
 are not perl ones, but /bin/sh or whatever you want that works with
 suexec. I DO known this list is exclusive for mod_perl. But since i get
 no ideia where to go to seek for help. (as far as i known, there is no
 mailing list support for apache/suexec in www.apache.org).

 May some one (In the name of God) help with such, **PLEASE** ?




RE: [OT] Dynamically changing current package

2001-02-01 Thread Stathy Touloumis

 NewPackage will then contain all things in TestPackage

 Then you can redefined everything in TestPackage without affecting
 anything in NewPackage.

Actually it will, if you were to delete NewPackage, TestPackage would not
contain anything.  Modifying 'thingys' in TestPackage would modify
NewPackage.




Re: Best GCC compiler options for Intel (perl apache)

2001-02-01 Thread G.W. Haywood

Hi Tim,

On Thu, 1 Feb 2001, Tim Bunce wrote:

 Can anyone recommend extra gcc options to squeeze the last ounce of
 performance out of code (perl and apache in this case) on Intel?
 
 I don't mind tying the code down to one cpu type or loosing the ability
 to debug etc. We're already doing -O6 and are looking for more.

This kind of question usually spawns VERY long threads on this List...

I feel sure you shouldn't be using more than -O2 but I can't remember
why nor where I read it.  If I remember I'll let you know.

The compiler isn't the place to look for performance gains.  Look to
your system architecture, Perl code.  See if you can code the things
that get executed the most in C.  Use handlers, not Registry.  Cache.
Use RAID.  Throw away your database.  Well maybe not throw it away,
but be careful how you use it.  (I can't believe I'm saying this to
you:).  Remember the Pareto Principle.

 I'm using gcc 2.95.2, is that the latest/best?

It'll do.

73,
Ged.




Re: Best GCC compiler options for Intel (perl apache)

2001-02-01 Thread nick

This isn't the best place to ask these questions.


Steve Fink [EMAIL PROTECTED] writes:

And you'd probably want -march=i686 (or whatever CPU you're using).

Not necessarily. gcc and ia32 is weird that way.

I would use whatever Linus  co. decided to use for the kernel on that 
arch in question.

-- 
Nick Ing-Simmons




Re: Best GCC compiler options for Intel (perl apache)

2001-02-01 Thread Kurt D. Starsinic

On Thu, Feb 01, 2001 at 01:51:56PM +, Tim Bunce wrote:
 Can anyone recommend extra gcc options to squeeze the last ounce of
 performance out of code (perl and apache in this case) on Intel?
 
 I don't mind tying the code down to one cpu type or loosing the ability
 to debug etc. We're already doing -O6 and are looking for more.
 
 I recall Malcom Beattie (CC'd, Hi Malcolm!) experimenting in this area,
 something about not wasting a register for the frame pointer.
 
 I'm using gcc 2.95.2, is that the latest/best?
 It's on FreeBSD 4.1 and 4.2.

If you can get perl to compile under TenDRA, you might get better
performance.  It's a FreeBSD port, BTW.  I had looked into this a while
ago, but the documentation left a lot to be desired.  You might also try
pgcc.

- Kurt
|   `People wish to be settled; only as far as they are unsettled   |
|is there any hope for them.' -- Ralph Waldo Emerson|




Re: Best GCC compiler options for Intel (perl apache)

2001-02-01 Thread Steve Fink

Tim Bunce wrote:
 
 Can anyone recommend extra gcc options to squeeze the last ounce of
 performance out of code (perl and apache in this case) on Intel?
 
 I don't mind tying the code down to one cpu type or loosing the ability
 to debug etc. We're already doing -O6 and are looking for more.
 
 I recall Malcom Beattie (CC'd, Hi Malcolm!) experimenting in this area,
 something about not wasting a register for the frame pointer.

That particular option would be gcc -fomit-frame-pointer.

You might try -ffast-math -fexpensive-optimizations (never played with
the latter, though, and it's probably on with -O6 anyway).

If you really want to go crazy, you could try -fbranch-probabilities
(requires more than just turning it on; read the gcc man page.) I doubt
it's worth the trouble.

And you'd probably want -march=i686 (or whatever CPU you're using).

I don't know the state of pentium-specific optimizations, but does
Cygnus's Code Fusion still have a gcc with Pentium-specific
optimizations that aren't in the main tree? I just remember the numbers
saying that they'd slightly overtaken Intel's compiler, but that was a
year and a half ago.

Unrelated to the compiler, if you're throwing around significant chunks
of data, you might want to try tuning your drives. Especially if they're
IDE, since UDMA is often disabled for safety by default. I don't know
much about SCSI tuning, but whichever interface you're using, make sure
the heads are able to go around in circles really fast.

You can also play tricks with RAM disks, or solid-state hard drives like
the ones from platypustechnologies.com. But this gets too far afield.



Re: Best GCC compiler options for Intel (perl apache)

2001-02-01 Thread James W Walden

On Thu, 1 Feb 2001, Tim Bunce wrote:
 Can anyone recommend extra gcc options to squeeze the last ounce of
 performance out of code (perl and apache in this case) on Intel?

 I don't mind tying the code down to one cpu type or loosing the ability
 to debug etc. We're already doing -O6 and are looking for more.

I use '-march=i686 -mcpu=i686' to improve performance with gcc. The
percentage improvement varies greatly between applications but is often
around 10%. If you're willing to use a commercial compiler instead of
gcc, I get a 20-40% improvement with Intel's proton C compiler (which I
think is only available commercially for Windows so far) over gcc and
have found other commercial compilers to produce similar gains.

 I'm using gcc 2.95.2, is that the latest/best?

It is.  Gcc 3.0 is supposed to be released by the end of this quarter.

James Walden




Re: IDE for Perl

2001-02-01 Thread Peter Brown

Jimi Thompson writes:
  Can anyone tell me if there's a good IDE for PERL? 

its not realy an ide (well almost) but 
have you looked at xemacs/emacs ?
it does syntax hightighting
and all kinds of stuff i havent had a chance to look at yet

  I have some big
  projects coming and having the debug/testing etc. would be sooo
  bonus.  I looked at ActivePerl, but was hoping that maybe there was
  something else either better or cheaper.   I wish Adobe and Macromedia
  would make a Linux version of everything.  Then I'd never have to touch
  "the other OS" again.
will happen soon borland have jumped on the train with kylix
its up to peer group pressure now

Pete




DBD::mysql memory leak!

2001-02-01 Thread Mark Blythe

I have been testing and troubleshooting this for days, and I can find no
other answer to my problem except that DBD::mysql has a memory leak.

I have narrowed it down to this small script running through
Apache::Registry:


use DBI;
use DBD::mysql;
use strict;

print "Content-type: text/plain\n\n";

my $dbh = DBI-connect("dbi:mysql:db;host=localhost", "user", "pass")
   or die "no DB!\n";

my $sth = $dbh-prepare(q{
   select * from junk where id = 10
});

$sth-execute() or die "no sql\n";
while (my @row = $sth-fetchrow_array())
{
   print join("\n", @row), "\n";
}

$sth-finish;
$dbh-disconnect;


This script runs just fine, and displays the contents of the single
specified MySQL row.  However, if I watch the size of my httpd process, it
will grow over time as I access the script repeatedly.

I use the following script to load test it:


use LWP::Simple `get`; 
 
$uri = shift; 
$hits = 0; 
 
$SIG{INT} = sub { print "fetched: $hits"; exit }; 
 
while(1) { 
get $uri or die "get failed!"; 
$hits++; 
} 


I am using the latest DBD::mysql module, as far as I can tell.  I forced a
reinstall with CPAN shell, just to be sure.  Here is my version info:

Msql-Mysql-modules-1.2215
Embedded Perl version v5.6.0 for Apache/1.3.12 (Unix) mod_perl/1.24

As common as this mod_perl/DBD/MySQL combination is, SOMEBODY else has to
have had this same trouble and solved it.  Right? ... Right?

Thanks,

Mark Blythe
[EMAIL PROTECTED]

P.S.  I've used Apache::Leak and Apache::Status to no avail.





Re: DBD::mysql memory leak!

2001-02-01 Thread Sean C. Brady

Hi Mark.

On Thu, 1 Feb 2001, Mark Blythe wrote:

 I have been testing and troubleshooting this for days, and I can find no
 other answer to my problem except that DBD::mysql has a memory leak.
 
 I have narrowed it down to this small script running through
 Apache::Registry:
 
 

I know this is not related directly to your question... but, I don't think
you have to specify the DBD::mysql module  you only need to use DBI...

 use DBI;
 use DBD::mysql;


 use strict;
 
 print "Content-type: text/plain\n\n";
 
 my $dbh = DBI-connect("dbi:mysql:db;host=localhost", "user", "pass")
or die "no DB!\n";
 
 my $sth = $dbh-prepare(q{
select * from junk where id = 10
 });
 
 $sth-execute() or die "no sql\n";
 while (my @row = $sth-fetchrow_array())
 {
print join("\n", @row), "\n";
 }
 
 $sth-finish;
 $dbh-disconnect;
 
 
 This script runs just fine, and displays the contents of the single
 specified MySQL row.  However, if I watch the size of my httpd process, it
 will grow over time as I access the script repeatedly.
 
 I use the following script to load test it:
 
 
 use LWP::Simple `get`; 
  
 $uri = shift; 
 $hits = 0; 
  
 $SIG{INT} = sub { print "fetched: $hits"; exit }; 
  
 while(1) { 
 get $uri or die "get failed!"; 
 $hits++; 
 } 
 
 
 I am using the latest DBD::mysql module, as far as I can tell.  I forced a
 reinstall with CPAN shell, just to be sure.  Here is my version info:
 
 Msql-Mysql-modules-1.2215
 Embedded Perl version v5.6.0 for Apache/1.3.12 (Unix) mod_perl/1.24
 
 As common as this mod_perl/DBD/MySQL combination is, SOMEBODY else has to
 have had this same trouble and solved it.  Right? ... Right?
 
 Thanks,
 
 Mark Blythe
 [EMAIL PROTECTED]
 
 P.S.  I've used Apache::Leak and Apache::Status to no avail.
 
 


- Sean




RE: Prototype mismatch in Apache::PerlRun line 343

2001-02-01 Thread Wenzhong Tang

Hi Doug,

Just installed Apache 1.3.7 and mod_perl 1.25 on my Linux box.  To my
surprise, when I ran my scripts using PerlRun.pm, the "Prototype mismatch"
problem still occurs.  When examining the code, it happened to be that line
344 of the new PerlRun.pm is:
*{$fullname} = eval "sub ($p) {}";
instead of 
eval "*{\$fullname} = sub ($p) {}";
Apparently, the line in PerlRun.pm (mod_perl 1.25) is not doing what it
should do, which is replacing the sub that $fullname points to with a empty
sub with correct prototype.  Is there anything I am missing here?

Wenzhong Tang
[EMAIL PROTECTED]


-Original Message-
From: Doug MacEachern [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 29, 2001 2:03 PM
To: Wenzhong Tang
Cc: [EMAIL PROTECTED]
Subject: RE: Prototype mismatch in Apache::PerlRun line 343


On Fri, 26 Jan 2001, Wenzhong Tang wrote:

 Unfortunately the following line doesn't work:
 eval "*{\$fullname}($p) = sub {}";
 It probably should be:
 eval "*{\$fullname} = sub ($p) {}";
 The latter works on my Linux and Solaris tests.

right.  thanks, applied.



More Info: DBD::mysql leak!

2001-02-01 Thread Mark Blythe

Ok, through more trial and error, I've managed to whittle the offending
script down to this:

use strict;
print "Content-type: text/plain\n\nHello World!";

That's it, and it still leaks.  So, apparently the problem is not with DBI
or DBD::mysql at all.  The only components left seem to be Apache,
mod_perl, and Apache::Registry.

I'll keep experimenting.  Let me know if any of you experience similar
problems with this script.

Mark Blythe
[EMAIL PROTECTED]




Re: mod_perl 1.25 + perl 5.6

2001-02-01 Thread Matisse Enzer

You know I am also seeing this exact result.

I compiled perl 5.6 and Apache 1.3.17 using gcc egcs-2.91.66
on a RH Linux 6.1 system.

If I compile Apache without modperl it run OK. If i compile it with 
mod_perl 1.25 I also get the segmentation fault on startup.

I looked in ../mod_perl/SUPPORT  and didn't see anything obvious abot 
this problem.

-Matisse

Hi there,

On Wed, 31 Jan 2001, Vasily Petrushin wrote:

  I have a problem with perl 5.6 + mod_perl 1.25 + apache 1.3.17
  Operating System is Sun Solaris 8 for SPARC, 64bit.
  [Tue Jan 30 17:58:51 2001] [notice] child pid 17005 exit signal
  Segmentation Fault (11)

Have you looked at the information in .../mod_perl/SUPPORT


and did you compile your Perl?

?

73,
Ged.

-- 
---
Matisse Enzer
TechTv Web Engineering
[EMAIL PROTECTED]
415-355-4364 (desk)
415-225-6703 (cellphone)



Re: mod_perl 1.25 + perl 5.6

2001-02-01 Thread The Doctor

On Thu, Feb 01, 2001 at 05:25:41PM -0800, Matisse Enzer wrote:
 You know I am also seeing this exact result.
 
 I compiled perl 5.6 and Apache 1.3.17 using gcc egcs-2.91.66
 on a RH Linux 6.1 system.
 
 If I compile Apache without modperl it run OK. If i compile it with 
 mod_perl 1.25 I also get the segmentation fault on startup.
 
 I looked in ../mod_perl/SUPPORT  and didn't see anything obvious abot 
 this problem.
 
 -Matisse
 
 Hi there,
 
 On Wed, 31 Jan 2001, Vasily Petrushin wrote:
 
   I have a problem with perl 5.6 + mod_perl 1.25 + apache 1.3.17
   Operating System is Sun Solaris 8 for SPARC, 64bit.
   [Tue Jan 30 17:58:51 2001] [notice] child pid 17005 exit signal
   Segmentation Fault (11)
 
 Have you looked at the information in .../mod_perl/SUPPORT
 
 
 and did you compile your Perl?
 
 ?
 
 73,
 Ged.
 
 -- 
 ---
 Matisse Enzer
 TechTv Web Engineering
 [EMAIL PROTECTED]
 415-355-4364 (desk)
 415-225-6703 (cellphone)

I just ran make test using apache 1.3.17 + mod_perl 1.25 + perl 5.6 et al
and the test croaks!

-- 
God Queen and Country   Member - Liberal International
Never Satan President and Republic   This is [EMAIL PROTECTED]  Ici [EMAIL PROTECTED]
Society MUST be saved! Republics must dissolve.
10 Years using the Internet and still broadcasting the truth



[OT] Friendy Reminder

2001-02-01 Thread Gunther Birznieks

There have been a LOT of Off Topic (OT) posts this week on the mod_perl 
list without the OT prefix. At least more than I've seen as usual.

Please take the time to add a [OT] prefix to the posts when it is not 
directly mod_perl related.

If you are responding to a clearly OT post that didn't know better, please 
put the [OT] in your subject in response so that subsequent responses will 
have the [OT] in there with a little note letting the original poster know 
(eg a simple sentance like "I added [OT] to the subject because this thread 
is off topic).

Thanks. :)




Re: [RFC] mod_perl Digest path...

2001-02-01 Thread Stas Bekman

On Tue, 30 Jan 2001, Geoffrey Young wrote:

 sorry again for all the confusion with this morning's digest (I do code more
 carefully than I write, really I do...)

 this does present the opportune time to ask the list about the future of
 this digest...

 currently, the digest does not have a HTML home.  Matt at take23.org has
 graciously agreed to host it and work on the XML stylesheets required for
 the site.  This is a very good thing - but unfortunately, there is no easy
 way to derive a decent plain text version from an XML base...

 thus, the move to take23.org may mean that the digest no longer appears on
 the list in plaintext, but merely as a posting with a link to the current
 version...

 how does this strike everyone?

Why everybody tries to solve a problem that doesn't exist IMHO? Why
sourcing in XML in first place. Just throw the email as currently
generated by Geoff between PRE/PRE and that's it. That's what
ApacheToday and other online zines do and it seems just fine.

I guess that the only issue are the hrefs, but I guess this can be easily
converted with s/\[\d+\]/.../.

Thanks

_
Stas Bekman  JAm_pH --   Just Another mod_perl Hacker
http://stason.org/   mod_perl Guide  http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]   http://apachetoday.com http://logilune.com/
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/