[ADMIN] modperl list to move!

2002-03-01 Thread Ask Bjoern Hansen

Hi,

Early next week I will move the modperl lists that are at apache.org
to perl.apache.org; please be ready to adjust your procmail filters.  
:-)  The old adresses will keep working at least for a while.


 - ask

-- 
ask bjoern hansen, http://ask.netcetera.dk/ !try; do();
more than a billion impressions per week, http://valueclick.com




Re: virtual host "server root"

2002-03-01 Thread Rick Myers

On Mar 01, 2002 at 19:30:37 +, Ged Haywood wrote:
> Hi there,
> 
> On Wed, 27 Feb 2002, Rick Myers wrote:
> 
> > I'm trying to create a "root" directory for each of my virtuals.
> > the realm of the virtual that certainly shouldn't be within
> [snip]
> > I've come up with three solutions, none of which I
> > particularly like for various reasons.
> 
> Have you looked at mod_macro?

I hadn't until now, but it looks interesting. Not quite what
I had in mind though.

Thanks

--rick




Re: [OT] Hierarchical access to db under Apache and Zeus

2002-03-01 Thread Ask Bjoern Hansen

On Sat, 2 Mar 2002, Ron Savage wrote:

> This is off topic, I know. I'm accessing your general knowledge, not
> your mod_perl knowledge.

Well; please don't bring it up here then.  dbi-users at perl.org 
would maybe be more appropiate.
 
-- 
ask bjoern hansen, http://ask.netcetera.dk/ !try; do();
more than a billion impressions per week, http://valueclick.com




Re: [magick-users] Alternatives of phpGraphy?

2002-03-01 Thread Ron Savage

On Fri, 1 Mar 2002 17:40:36 +0100, Sebastian Barbe wrote:
>Hi,
>
>I am looking for an alternative to phpGraphy. Does anybody know any
>good
>software that works in the same way but is even better and FREE?

And what exactly does it do? A URI to an explanation will be
sufficient.
--
Ron Savage, [EMAIL PROTECTED] on 02/03/2002
http://savage.net.au/index.html





[OT] Hierarchical access to db under Apache and Zeus

2002-03-01 Thread Ron Savage

This is off topic, I know. I'm accessing your general knowledge, not
your mod_perl knowledge.

And the CGI script must run under Apache and Zeus. Exit mod_perl.

Imagine a club membership db. One table, 'people' say, has a list of
members of all clubs.

The problem:
1) A club official is allowed to see all people records for their
club
2) A state-level official is allowed to see all people records for
clubs in their state
3) A national-level official is allowed to see all people records,
period.

I'm writing all this in Perl, and am using MySQL under both web
servers, and I've designed all the tables, so can implement any db
and code changes required.

Any ideas/articles on implementing this?
--
Ron Savage, [EMAIL PROTECTED] on 02/03/2002
http://savage.net.au/index.html





Re: Segfault when using LWP

2002-03-01 Thread Ryan Veety

DOH!  Nevermind, I figured it out.  I didn't run ldconfig after upgrading
openssl, so httpd was linked to a different version than the ssl perl modules,
which aparently caused the segfaults...  Like I said earlier I thought it was
a library version mismatch so I recompiled *everything*, but for some reason
the perl modules seemed to pick up the new libcrypto without me running
ldconfig??.  Oh well, thanks anyway.

Ryan
 __
   .'  Ryan Veety <[EMAIL PROTECTED]> - http://www.ryanspc.com  `.
   |  PGP Key: http://www.ryanspc.com/pgp.txt   |
`--'




RE: MySQL, file upload, file size

2002-03-01 Thread Fitch, George A


What's your max_allowed_packet setting in my.cnf?

Gaf

-Original Message-
From: Gregor Mosheh, B.S. [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 01, 2002 3:20 PM
To: [EMAIL PROTECTED]
Subject: MySQL, file upload, file size


I'm using file upload fields, and submitting the MIME-encoded version of the
file contents to a MySQL database. If I try to upload a file larger than
about 500kB, the DB insertion fails and I get this in the Apache error_log:

DBD::mysql::st execute failed: MySQL server has gone away at
/usr/local/apache-dev/ultraform-lib/UltraForm2.pm line 496,
 chunk 3772.

When I connect to the server and use \s, the uptime and connection ID show
no indication that the MySQL server crashed or otherwise "went away".

What steps do I take to solve this?




MySQL, file upload, file size

2002-03-01 Thread Gregor Mosheh, B.S.

I'm using file upload fields, and submitting the MIME-encoded version of the
file contents to a MySQL database. If I try to upload a file larger than
about 500kB, the DB insertion fails and I get this in the Apache error_log:

DBD::mysql::st execute failed: MySQL server has gone away at
/usr/local/apache-dev/ultraform-lib/UltraForm2.pm line 496,
 chunk 3772.

When I connect to the server and use \s, the uptime and connection ID show
no indication that the MySQL server crashed or otherwise "went away".

What steps do I take to solve this?





Segfault when using LWP

2002-03-01 Thread Ryan Veety

I just upgraded to Apache 1.3.23, mod_perl 1.26, openssl 0.9.6c, modssl 2.8.7.
Since then, httpd segfaults every time I use LWP::UserAgent to grab from a ssl
server.  The following mod_perl script is an example:

#!/usr/bin/perl

use strict;
use LWP::UserAgent;

my $ua = LWP::UserAgent->new;
my $request = HTTP::Request->new(GET => 'https://www.modssl.org/');
my $response = $ua->request($request);
my $text = $response->content;

print "Content-type: text/html\n\n";
print "It worked\n";
print $text;


This works perfectly from the command line, but segfaults when run within
mod_perl.  It also works fine when run in /cgi-bin, and it will work fine when
run in mod_perl if I change the request from https to http.  My first thought
was that the perl modules were linked to an older version of openssl, this is
not the case, I reinstalled all the perl modules and then even deleted perl
completely, recompiled it, reinstalled all the necessary perl modules, rebuilt
apache/mod_perl with the rebuilt perl, and the same thing still happens.  Once
httpd segfaults once, each apache process seems to crash/restart once per
second until I apachectl restart :(.  This all worked fine under mod_perl
1.25.

Any ideas??
Ryan
 __
   .'  Ryan Veety <[EMAIL PROTECTED]> - http://www.ryanspc.com  `.
   |  PGP Key: http://www.ryanspc.com/pgp.txt   |
`--'





Re: virtual host "server root"

2002-03-01 Thread Andy Lester

> > I'm trying to create a "root" directory for each of my virtuals.
> > the realm of the virtual that certainly shouldn't be within
> [snip]
> > I've come up with three solutions, none of which I
> > particularly like for various reasons.
>
> Have you looked at mod_macro?

mod_macro has been a godsend for me.  I was about thisclose to writing
something to generate my http.conf for me.



-- 
%_=split/;/,".;;n;u;e;ot;t;her;c; ".   #   Andy Lester
'Perl ;@; a;a;j;m;er;y;t;p;n;d;s;o;'.  #   http://petdance.com
"hack";print map delete$_{$_},split//,q<   [EMAIL PROTECTED]   >





Re: RegistryLoader Segmentation fault

2002-03-01 Thread Fran Fabrizio


> see Recipe 9.19 for a general introduction into using gbd and getting
> a backtrace, as well as the SUPPORT document in the mod_perl sources


Here is the backtrace for now.  I'm going to try Perl 5.6.1 and then try 
to see what the backtrace looks like with a PERL_DEBUG=1 enabled 
mod_perl.  Thanks for the help thus far.

-Fran

(gdb) bt
#0  0x80ca6b6 in Perl_gv_init ()
#1  0x80cb9d5 in Perl_gv_fetchpv ()
#2  0x80810dd in perl_section_hash_init ()
#3  0x8081403 in perl_section ()
#4  0x809aa40 in ap_clear_module_list ()
#5  0x809b598 in ap_handle_command ()
#6  0x809b635 in ap_srm_command_loop ()
#7  0x809ef2a in ap_limit_section ()
#8  0x809aa40 in ap_clear_module_list ()
#9  0x809b598 in ap_handle_command ()
#10 0x809b635 in ap_srm_command_loop ()
#11 0x809bd52 in ap_process_resource_config ()
#12 0x80a0cc7 in ap_exists_config_define ()
#13 0x809aadc in ap_clear_module_list ()
#14 0x809b598 in ap_handle_command ()
#15 0x809b635 in ap_srm_command_loop ()
#16 0x809bd52 in ap_process_resource_config ()
#17 0x809c695 in ap_read_config ()
#18 0x80a6e9f in main ()
#19 0x400a1b65 in __libc_start_main (main=0x80a6bb8 , argc=1,
 ubp_av=0xbaf4, init=0x80621d4 <_init>, fini=0x814a26c <_fini>,
 rtld_fini=0x4000df24 <_dl_fini>, stack_end=0xbaec)
 at ../sysdeps/generic/libc-start.c:111




Re: RegistryLoader Segmentation fault

2002-03-01 Thread Geoffrey Young

whoops, forgot to CC the list, but it seems Ged stepped in with the
same info...

Fran Fabrizio wrote:
> 
> Hello,
> 
> I'm trying to follow the script in section 2.14 of the book "mod_perl
> Developer's Cookbook" in order to pre-load my Apache::registry scripts
> using Apache::RegistryLoader.  I'm getting a seg fault when I attempt to
> start apache.
> 

I've never seen a segfault with RegistryLoader, but there are a few
avenues that might help.

see Recipe 9.19 for a general introduction into using gbd and getting
a backtrace, as well as the SUPPORT document in the mod_perl sources

maybe someone else has seen this before and can offer more help

--Geoff



Re: RegistryLoader Segmentation fault

2002-03-01 Thread Fran Fabrizio

Ged,


>>using Apache::RegistryLoader.  I'm getting a seg fault when I attempt to 
>>start apache.
>>
> 
> Read mod_perl/SUPPORT.


Ok I've looked through it.  I've tried some of the quicker 
suggestions... gdb -core core and gdb httpd core tell me:

Core was generated by `/usr/local/apache/bin/httpd'.
Program terminated with signal 11, Segmentation fault.

#0  0x80ca6b6 in Perl_gv_init ()


I'll try some of the more involved stuff here in a moment


> Did you compile your own Perl, mod_perl and Apache?


Yes.  Perl 5.6.0, mod_perl 1.25, apache 1.3.19.

 
> You might be better off with Perl version 5.6.1 instead.


I will upgrade and see what happens.


> Are you using DSO?


No.

Thanks for the pointers thus far!

-Fran






Re: Blank pages

2002-03-01 Thread Ged Haywood

Hi there,

On Fri, 1 Mar 2002, Axel Andersson wrote:

> I run a mod_perl/mysql site, which works fine most of the time. Some
> pages, however, come out completely blank. Reload.. and hey presto,
[snip]
> Well, it's a longshot, but thanks anyway.

Another long shot, do you always specify full paths to files in your code?

If you don't get anywhere with that then I'd suggest looking at the debugging
section of the Guide: http://prel.apache.org/guide and/or peppering your code
at strategic places with 'print STDERR "$something_useful\n"' statements.

73,
Ged.




Summary: statINC or startINC ??

2002-03-01 Thread Dermot Paikkos

Thanx to Dave Wright and Bret McCoy.

The problem was with my httpd.conf. It had: 

   perlFreshRestart On
   perlInitHandler Apache::statINC
   perlModule Apache::Registry
   PerlModule Apache::Status
   PerlModule Apache::Leak
   PerlModule DBI
   PerlModule AuthDBI
   PerlModule OutputChain
   PerlModule EmbperlChain
   PerlModule HTML::Embperl
   PerlModule DBI
   PerlModule DBD::mysql
.

After upper-casing the perl* bits and StatINC and HUP the server my 
static site came back and the errors disappeared.
Dp.


- Original message below --
Hi 
 System info: Slackware linux 8.0 (2.2.19), 
 Apache/1.3.20 (Unix) Embperl/1.3.4 mod_perl/1.26

I'm a completely newbie and have a problem with your installation. I
think my problems are mainly to do with environment variables,
specifically @INC. The error log has the following:

 Undefined subroutine &Apache::startINC::handler called.

I have a statINC at not a startINC. So I modified the httpd.conf
accordingly. However I still get:

  Undefined subroutine &Apache::statINC::handler called.

As I don't know how to manually change @INC, I have added the 
paths to the PERL5LIB env variable (in my .cshrc) but this does not
take effect till I log in. So the server does not start unless I am
logged in and start it manually as it can not find statINC.pm. Even
then http requests generate the above error. 

So I guess I need to know how to make the PERL5LIB variable 
available to Apache from its first initialisation (would that be the
startup.pl or the UID of the httpd process?). I also need to make sure
that this is variable persists.

I hope that makes sense. 
Thanx.
Dp.
PS: Should my static site still work after installing mod_perl? it
doesn't.  
--- End of forwarded message ---
~~
Dermot Paikkos * [EMAIL PROTECTED]
Network Administrator @ Science Photo Library
Phone: 0207 432 1100 * Fax: 0207 286 8668




Re: RegistryLoader Segmentation fault

2002-03-01 Thread Ged Haywood

Hi there,

On Fri, 1 Mar 2002, Fran Fabrizio wrote:

> using Apache::RegistryLoader.  I'm getting a seg fault when I attempt to 
> start apache.

Read mod_perl/SUPPORT.

Did you compile your own Perl, mod_perl and Apache?

You might be better off with Perl version 5.6.1 instead.

Are you using DSO?

73,
Ged.






Re: statINC or startINC ??

2002-03-01 Thread David Wright

Hi Dermot,

> I'm a completely newbie and have a problem with your installation. I
> think my problems are mainly to do with environment variables,
> specifically @INC. The error log has the following:
>
>  Undefined subroutine &Apache::startINC::handler called.
>
> I have a statINC at not a startINC. So I modified the httpd.conf
> accordingly. However I still get:
>
>   Undefined subroutine &Apache::statINC::handler called.

Have you tried Apache::StatINC? - note the case.

If you can do 'perl -MApache::StatINC -e 42' on the command line without
any errors, then

PerlInitHandler Apache::StatINC

in your httpd.conf should be fine as well.

> As I don't know how to manually change @INC, I have added the
> paths to the PERL5LIB env variable (in my .cshrc) but this does not
> take effect till I log in. So the server does not start unless I am
> logged in and start it manually as it can not find statINC.pm. Even
> then http requests generate the above error.

perldoc -f use

If you have a set of custom modules that you need Apache to find,
something like:


use lib '/directory/root/of/your/modules' ;


in your conf should work.


david wright









Re: statINC or startINC ??

2002-03-01 Thread Brett W. McCoy

On Fri, 1 Mar 2002, Dermot Paikkos wrote:

> So I guess I need to know how to make the PERL5LIB variable
> available to Apache from its first initialisation (would that be the
> startup.pl or the UID of the httpd process?). I also need to make sure
> that this is variable persists.

PerlSetVar PERL5LIB 

should accomplish this.

You can also do

use lib '';

in your scripts to have them search the correct path to modules that
aren't in @INC.  I also use Apache::Reload.  See the appropriate
documentation (it talks about using Apache::Reload as a drop-in for
StatINC).

-- Brett
  http://www.chapelperilous.net/

My mother wants grandchildren, so I said, "Mom, go for it!"
-- Sue Murphy





statINC or startINC ??

2002-03-01 Thread Dermot Paikkos

Hi 
System info: Slackware linux 8.0 (2.2.19), 
Apache/1.3.20 (Unix) Embperl/1.3.4 mod_perl/1.26

I'm a completely newbie and have a problem with your installation. I 
think my problems are mainly to do with environment variables, 
specifically @INC. The error log has the following:

 Undefined subroutine &Apache::startINC::handler called.

I have a statINC at not a startINC. So I modified the httpd.conf 
accordingly. However I still get:

  Undefined subroutine &Apache::statINC::handler called.

As I don't know how to manually change @INC, I have added the 
paths to the PERL5LIB env variable (in my .cshrc) but this does not 
take effect till I log in. So the server does not start unless I am 
logged in and start it manually as it can not find statINC.pm. Even 
then http requests generate the above error. 

So I guess I need to know how to make the PERL5LIB variable 
available to Apache from its first initialisation (would that be the 
startup.pl or the UID of the httpd process?). I also need to make sure 
that this is variable persists.

I hope that makes sense. 
Thanx.
Dp.
PS: Should my static site still work after installing mod_perl? it 
doesn't.  
~~
Dermot Paikkos * [EMAIL PROTECTED]
Network Administrator @ Science Photo Library
Phone: 0207 432 1100 * Fax: 0207 286 8668




RegistryLoader Segmentation fault

2002-03-01 Thread Fran Fabrizio


Hello,

I'm trying to follow the script in section 2.14 of the book "mod_perl 
Developer's Cookbook" in order to pre-load my Apache::registry scripts 
using Apache::RegistryLoader.  I'm getting a seg fault when I attempt to 
start apache.

My startup.pl is as follows:

#!/usr/local/bin/perl

use lib qw(/usr/local/apache/lib/perl);
use Apache::DBI;
use Apache::Registry;
use Apache::RegistryLoader;
use DBI;
use DBD::Pg;
use strict;
use CGI qw(-compile :all);
use DirHandle;

my $rl = Apache::RegistryLoader->new;
my $dh = DirHandle->new("/usr/local/apache/cgi-bin/chimpkit/") or die $!;
foreach my $file ($dh->read) {
 next unless $file =~ m/\.pl$/;
 print STDOUT "Pre-loading $file\n";
$rl->handler("/cgi-bin/chimpkit/$file","/usr/local/apache/cgi-bin/chimpkit/$file");
}

1;

When I attempt to start apache, I get the following messages on STDOUT:

[root@castle bin]# ./apachectl start
Pre-loading chimpworks.pl
Apache::Debug: [level 1]
Compiled package "Apache::ROOT::cgi_2dbin::chimpkit::chimpworks_2epl" 
for process 27233 at 
/usr/lib/perl5/site_perl/5.6.0/i386-linux/Apache/RegistryLoader.pm line 76.
./apachectl: line 171: 27233 Segmentation fault  (core dumped) $HTTPD
./apachectl start: httpd could not be started
[root@castle bin]#

Nothing has been written to the error log.  The format of my 
$rl->handler() call seems ok to me.  I perused the archives for a while 
and tried a couple of things that fixed other people's RegistryLoader 
problems, to no avail.  Everything works fine if I comment out the call 
to handler() except of course now each child has a copy of the compiled 
code.  Any thoughts?

Thanks,
Fran




RE: webmail for mod_perl?

2002-03-01 Thread Joe Breeden

We use a combination of Mail::IMAPClient and MIME::Lite. You can look at 
http://howtos.eoutfitters.net/email for a description of our email servers. The 
mod_perl IMAP client handler has not been completed enough to release to the 
community, but once it is ready I put an announcement here.



> -Original Message-
> From: will trillich [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 28, 2002 5:49 PM
> To: [EMAIL PROTECTED]
> Subject: webmail for mod_perl?
> 
> 
> is there a sane implementation of webmail-style mod_perl
> modules for apache?
> 
> we're looking to offer email access online through
> apache/mod_perl similar to what folks get at yahoo/egroups --
> and we're hoping to find some mod_perl code that'll hook into
> pop/imap email servers. (and we're hoping to avoid loading php
> into ram.) i saw a thread in the archives (begun on Wed, 12 Dec
> 2001 by Medi Montaseri) but most of the suggestions seemed to
> point to php. we're hoping to stick with mod_perl. :)
> 
> rtfm welcome if you specify which fm to r. :) thanks...
> 
> --thanks!
> 
> -- 
> Legalize Liberty.
>  
> [EMAIL PROTECTED]
> http://sourceforge.net/projects/newbiedoc -- we need your brain!
> http://www.dontUthink.com/ -- your brain needs us!
> 



Blank pages

2002-03-01 Thread Axel Andersson

Hi,
I run a mod_perl/mysql site, which works fine most of the time. Some
pages, however, come out completely blank. Reload.. and hey presto, it
works. Now, I realize this could be practically anything, so I'm just
asking if anyone has come across something similar.

I use Apache::DBI 0.88 for database connections, Apache 1.3.23 and
mod_perl/1.2. Strange thing is, nothing shows up in the error log, even
using -w.

Well, it's a longshot, but thanks anyway.

Axel Andersson

-- 
[EMAIL PROTECTED]
http://www.animanga.nu/morris/

31. With intagible breath in center of forehead, as this reaches heart at
the moment of sleep, have direction over dreams and over death itself.




[ANNOUNCE] Apache::GD::Thumbnail-0.03

2002-03-01 Thread Issac Goldstand

Changes:

  Cache control headers are returned to the browser BEFORE the thumbnail is generated 
now (why I didn't do this originally is beyond me :-))

The uploaded file

Apache-GD-Thumbnail-0.03.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/I/IS/ISAAC/Apache-GD-Thumbnail-0.03.tar.gz
  size: 2589 bytes
   md5: cecadf3fdfa04f6aa50d94243a49ed0e