cvs commit: modperl-2.0/t/modules include.t

2002-04-08 Thread dougm

dougm   02/04/08 18:00:52

  Modified:.Changes
   src/modules/perl mod_perl.c modperl_global.c
   t/htdocs/includes test.shtml
   t/modules include.t
  Added:   t/htdocs/includes-registry cgipm.pl
  Log:
  fix 'PerlOptions +GlobalRequest' when used within subrequests
  
  Revision  ChangesPath
  1.6   +2 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Changes   7 Apr 2002 22:47:31 -   1.5
  +++ Changes   9 Apr 2002 01:00:51 -   1.6
   -1,5 +1,7 
   =item 1.99_02-dev
   
  +fix 'PerlOptions +GlobalRequest' when used within subrequests [dougm]
  +
   get rid of some subroutine redefined warnings in ModPerl::MM that
   show up with newer bleedperls. [dougm]
   
  
  
  
  1.113 +6 -0  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.112
  retrieving revision 1.113
  diff -u -r1.112 -r1.113
  --- mod_perl.c6 Apr 2002 17:42:10 -   1.112
  +++ mod_perl.c9 Apr 2002 01:00:51 -   1.113
   -673,6 +673,12 
   return DECLINED;
   }
   
  +/* 
  + * need to do this incase we are inside a subrequest,
  + * since header_parser hook is not run in subrequests.
  + */
  +modperl_global_request_cfg_set(r);
  +
   #ifdef USE_ITHREADS
   interp = modperl_interp_select(r, r-connection, r-server);
   aTHX = interp-perl;
  
  
  
  1.5   +5 -8  modperl-2.0/src/modules/perl/modperl_global.c
  
  Index: modperl_global.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_global.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- modperl_global.c  5 Dec 2001 19:00:29 -   1.4
  +++ modperl_global.c  9 Apr 2002 01:00:52 -   1.5
   -15,19 +15,16 
   void modperl_global_request_set(request_rec *r)
   {
   MP_dRCFG;
  +request_rec *old_r = NULL;
  +
  +/* reset old value, important for subrequests */
  +(void)modperl_tls_get_request_rec(old_r);
  +modperl_tls_reset_cleanup_request_rec(r-pool, old_r);
   
   modperl_tls_set_request_rec(r);
   
   /* so 'PerlOptions +GlobalRequest' doesnt wipe us out */
   MpReqSET_GLOBAL_REQUEST_On(rcfg);
  -
  -if (r-main) {
  -/* reset after subrequests */
  -modperl_tls_reset_cleanup_request_rec(r-pool, r-main);
  -}
  -else {
  -modperl_tls_reset_cleanup_request_rec(r-pool, NULL);
  -}
   }
   
   void modperl_global_request_obj_set(pTHX_ SV *svr)
  
  
  
  1.2   +2 -0  modperl-2.0/t/htdocs/includes/test.shtml
  
  Index: test.shtml
  ===
  RCS file: /home/cvs/modperl-2.0/t/htdocs/includes/test.shtml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- test.shtml26 Feb 2002 19:10:04 -  1.1
  +++ test.shtml9 Apr 2002 01:00:52 -   1.2
   -2,6 +2,8 
   
   !--#include virtual=/includes-registry/test.pl --
   
  +!--#include virtual=/includes-registry/cgipm.pl --
  +
   p align=right[a href=../index.htmlback/a]/p
   
   !--#include virtual=/includes/footer.shtml --
  
  
  
  1.1  modperl-2.0/t/htdocs/includes-registry/cgipm.pl
  
  Index: cgipm.pl
  ===
  use CGI ();
  
  my $cgi = CGI-new;
  
  print $cgi-header;
  
  print cgi.pm\n;
  
  __END__
  
  
  
  1.2   +1 -0  modperl-2.0/t/modules/include.t
  
  Index: include.t
  ===
  RCS file: /home/cvs/modperl-2.0/t/modules/include.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- include.t 26 Feb 2002 19:13:44 -  1.1
  +++ include.t 9 Apr 2002 01:00:52 -   1.2
   -9,6 +9,7 
   my patterns = (
   'mod_perl mod_include test',
   'Hello World',
  +'cgi.pm',
   'footer',
   );
   
  
  
  



cvs commit: modperl-2.0 Changes

2002-04-08 Thread dougm

dougm   02/04/08 19:59:19

  Modified:src/modules/perl modperl_util.c
   .Changes
  Log:
  fix ModPerl::Util::exit to clear $ before calling Perl_croak
  
  Revision  ChangesPath
  1.38  +1 -0  modperl-2.0/src/modules/perl/modperl_util.c
  
  Index: modperl_util.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- modperl_util.c29 Jan 2002 09:50:39 -  1.37
  +++ modperl_util.c9 Apr 2002 02:59:19 -   1.38
   -517,6 +517,7 
   ENTER;
   SAVESPTR(PL_diehook);
   PL_diehook = Nullsv; 
  +sv_setpv(ERRSV, );
   Perl_croak(aTHX_ NULL);
   }
   
  
  
  
  1.7   +2 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Changes   9 Apr 2002 01:00:51 -   1.6
  +++ Changes   9 Apr 2002 02:59:19 -   1.7
   -1,5 +1,7 
   =item 1.99_02-dev
   
  +fix ModPerl::Util::exit to clear $ before calling Perl_croak [dougm]
  +
   fix 'PerlOptions +GlobalRequest' when used within subrequests [dougm]
   
   get rid of some subroutine redefined warnings in ModPerl::MM that
  
  
  



Re: [announce] mod_perl-1.99_01

2002-04-08 Thread Stas Bekman

John Siracusa wrote:
 You might want to reconsider the use of VT escape codes in the build
 process.  The red error message was cute, but there's a big potential
 downside (see attached screenshot).
 
 In the words of the W3C's CSS validator: You have no background-color with
 your color :)

sigh :(

the idea was to make certain messages more outstanding, so people
will pay attention to warnings and errors. In your examples warnings
are not really seen on certain terminals, which is worse than using the 
default fg color.
I've tried using on_white for bg and the results are bad.

Currently we use:

%colors = (
 emerg   = 'bold white on_blue',
 alert   = 'bold blue on_yellow',
 crit= 'reverse',
 error   = 'bold red',
 warning = 'yellow',
 notice  = 'green',
 info= 'cyan',
 debug   = 'magenta',
 reset   = 'reset',
 todo= 'underline',
 );

I've changed my gnome-terminal prefs to use black as bg and white as fg, 
and it was pretty much OK with the current colours, darker colours being 
less visible.

I guess what's important is to have at least 2 additional to the default 
colors for warnings and errors. It seems that 'bold red' will be 
perfectly seen on pretty much any background (but red :). Apparently 
yellow is not a good choice. Any better suggestions for cross background 
fg color? refer to the Term::ANSIColor manpage for more options.

Please play with
Apache-Test/lib/Apache/TestTrace.pm and see if you can come up with a 
better solution.

I've searched google, but didn't find any info regarding Term::ANSIColor 
and suggesting good cross-platform, cross-terminal colors.

Thanks.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: [announce] mod_perl-1.99_01

2002-04-08 Thread Ged Haywood

Hi Stas,

On Mon, 8 Apr 2002, Stas Bekman wrote:

 John Siracusa wrote:
  downside (see attached screenshot).
 
 the idea was to make certain messages more outstanding

Then print only the messages you want people to see.  In my view there
is far too much output from a typical build and install (of anything:).

Compilations should be SILENT unless something goes wrong.

73,
Ged.





Re: [announce] mod_perl-1.99_01

2002-04-08 Thread Stas Bekman

Ged Haywood wrote:
 Hi Stas,
 
 On Mon, 8 Apr 2002, Stas Bekman wrote:
 
 
John Siracusa wrote:

downside (see attached screenshot).

the idea was to make certain messages more outstanding
 
 
 Then print only the messages you want people to see.  In my view there
 is far too much output from a typical build and install (of anything:).
 
 Compilations should be SILENT unless something goes wrong.

The build process takes time, if you don't give an indication
of what's going on users will try to do funky things. Since the
build process is comprised of many small sub-processes you cannot
really use something like completion bar.

Also remember that mod_perl build prints very little,
it's the compilation messages that generated most of the output.
p.s. I don't recall seeing silent build processes at all.

__
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: PDF generation

2002-04-08 Thread Patrick

On Sun, Apr 07, 2002 at 07:51:42PM +0200, Thomas Eibner took time to write:
  More precisely I have LaTeX templates, I use CGI::FastTemplate to
  fill them in with dynamic data, run pdflatex, and then have a nice
  PDF file.
 
 Sounds like an interesting solution, but how long does it take to
 generate the pdf files? I need something that will insert data into

Few seconds, at least for my cases (and by doing PUSHs to the Web
client it let it know exactly where we are at the generation).

You should also consider, if possible, to generate files in advance
of use.

 PDF's at certain positions (they may change) and I was looking wheter
 it would be possible doing something like CGI::FastTemplate just for
 PDF's. The only requirement would be that you could use _any_ program
 that generates PDF's to generate these templates. So I built part of a
 PDF parser that would extract the text portions of a PDF, but then I
 found that a PDF generated by Adobe Distiller (just as an example)
 generates text sections that look something like:
 [(Kv)25.1(ar r)9.9(adioj mangxas la fla)20(v)24.8(a)]
 for the simple text of Kvar radioj mangxas la flava. 
 Doesn't that just look hopeless to parse? I'm about to give up on this
 solution, any comments?

I also think that should not mess with the PDF output directly.
Because it looks like text, but as you show yourself, it is in fact
more complicated. 

Patrick.



Re: PDF generation

2002-04-08 Thread Thomas Eibner

On Mon, Apr 08, 2002 at 01:32:58PM +0200, Patrick wrote:
 Few seconds, at least for my cases (and by doing PUSHs to the Web
 client it let it know exactly where we are at the generation).

Okay, that sounds bareable.

 You should also consider, if possible, to generate files in advance
 of use.

That would have been a possibility if there wasn't such a high impact
when you generate the statistics I need.

 I also think that should not mess with the PDF output directly.
 Because it looks like text, but as you show yourself, it is in fact
 more complicated. 

That is true, but it's a fine line between either having to do ALL the
work everytime a layout has to change (try getting any of your 
graphical designers to make a layout in LaTeX :( ) or just parsing a
PDF. And since placing content at an absolute position isn't really an
option either it's not possible just to import the PDF and then write
the information needed to the document. 

I wonder how much PDI from pdflib.org will do..

-- 
  Thomas Eibner http://thomas.eibner.dk/ DnsZone http://dnszone.org/
  mod_pointer http://stderr.net/mod_pointer http://photos.eibner.dk/



Re: [announce] mod_perl-1.99_01

2002-04-08 Thread John Siracusa

On 4/8/02 2:41 AM, Stas Bekman wrote:
 I've searched google, but didn't find any info regarding Term::ANSIColor
 and suggesting good cross-platform, cross-terminal colors.

Maybe I didn't understand the earlier part of your message, but can't you
specify both the foreground and the background color of text?  It'd be ugly,
but if you specified both you could be (relatively) sure the colors would
show up.

If you really want to be safe, you can use an old-style attention-grabbing
technique like this:

** ## **
  WARNING!!!
** ## **

blah blah blah

** ## **
  WARNING!!!
** ## **

People will see stuff like that :)  Or you could take the high road and just
print it normally.  As long as it's the last thing printed (i.e. It doesn't
scroll by while they're away or in another window), people will probably
read it :)  And if not, it could be argued that they get what they deserve
;)

-John




RE: PDF generation

2002-04-08 Thread Jeff

Of course others have already told you about Text::PDF, and no doubt
you googled the group Yahoo!

http://groups.yahoo.com/group/perl-text-pdf-modules/messages

You can do anything you want with PDFs, but the interface is hard to
grok
and you really need to wrap it.

I have a framework that we use to pull info from a database on-the-fly, 
and generate either Excel spreadsheets, Text dumps or PDFs. It ain't 
really ready for public primetime. 

I put out a message about 6 months ago in the PDF list asking if anyone 
wanted to co-operate with me on getting it ready for realworld. 
The goal is to be able to create some relatively simple Perl structures 
and then throw them at a Spreadsheet, PDF, HTML or other rendering
engine 
and reap the rewards!

The doc tree used [i.e. Perl structures] leant heavily on the CSS
analysis
done by the w3 guys on how to organise layout and styles etc in such a
way as to be independent of the ultimate rendering environment.

Here is the post where I postulate an ideal universe where data is 
automagically formatted in wondrous tabular PDF prose...

http://groups.yahoo.com/group/perl-text-pdf-modules/message/468

mail me direct if you want to help take it further.

Regards
Jeff 


-Original Message-
From: Thomas Eibner [mailto:[EMAIL PROTECTED]] 
Sent: 08 April 2002 13:47
To: modperl
Subject: Re: PDF generation


On Mon, Apr 08, 2002 at 01:32:58PM +0200, Patrick wrote:
 Few seconds, at least for my cases (and by doing PUSHs to the Web
 client it let it know exactly where we are at the generation).

Okay, that sounds bareable.

 You should also consider, if possible, to generate files in advance
 of use.

That would have been a possibility if there wasn't such a high impact
when you generate the statistics I need.

 I also think that should not mess with the PDF output directly.
 Because it looks like text, but as you show yourself, it is in fact
 more complicated. 

That is true, but it's a fine line between either having to do ALL the
work everytime a layout has to change (try getting any of your 
graphical designers to make a layout in LaTeX :( ) or just parsing a
PDF. And since placing content at an absolute position isn't really an
option either it's not possible just to import the PDF and then write
the information needed to the document. 

I wonder how much PDI from pdflib.org will do..

-- 
  Thomas Eibner http://thomas.eibner.dk/ DnsZone http://dnszone.org/
  mod_pointer http://stderr.net/mod_pointer http://photos.eibner.dk/





Re: [announce] mod_perl-1.99_01

2002-04-08 Thread Stas Bekman

John Siracusa wrote:
 On 4/8/02 2:41 AM, Stas Bekman wrote:
 
I've searched google, but didn't find any info regarding Term::ANSIColor
and suggesting good cross-platform, cross-terminal colors.
 
 
 Maybe I didn't understand the earlier part of your message, but can't you
 specify both the foreground and the background color of text?  It'd be ugly,
 but if you specified both you could be (relatively) sure the colors would
 show up.

Try it. The results are ugly.

 If you really want to be safe, you can use an old-style attention-grabbing
 technique like this:
 
 ** ## **
   WARNING!!!
 ** ## **
 
 blah blah blah
 
 ** ## **
   WARNING!!!
 ** ## **

well, yes, if we don't figure out how to keep the color and have people 
happy, we will need to do something like that. But it'll make the output 
even longer :(

Also there is an alternative way, try runnning with
APACHE_TEST_NO_COLOR=1 perl Makefile.PL

this is a poor man's version of non-coloured, but still distinguishable 
printing.

 People will see stuff like that :)  Or you could take the high road and just
 print it normally.  As long as it's the last thing printed (i.e. It doesn't
 scroll by while they're away or in another window), people will probably
 read it :)  And if not, it could be argued that they get what they deserve
 ;)

Sure, but those people end up asking questions here :). And it takes a 
few emails before you figure out that they had a warning and ignored it. 
So if we can make these stand out, that would save a lot of time to 
everybody.

Hmm, should we beep on every error? :)
beep; beep; beep; ...; beep() x 100;

;)

__
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




PDF's [OT I THINK]

2002-04-08 Thread Geoff Ellis

not sure where to start looking for some info, so I thought here first

I need to be able to print pdf's from an apache webserver using perl...
I know usually that just an link to the file is sufficient, but these files
are outside of the /var/www/path to webserver.

2 questions really..

1st - does anyone have any info on this
2nd - could someone point in to a resource..

many thanks

geoff





Re: PDF's [OT I THINK]

2002-04-08 Thread Rafiq Ismail (ADMIN)

Hi Geoff,
 not sure where to start looking for some info, so I thought here first

 I need to be able to print pdf's from an apache webserver using perl...
 I know usually that just an link to the file is sufficient, but these files
 are outside of the /var/www/path to webserver.

In such cases I usually point to a dynamic link which then sets the mime
type and then reads and spews out the document.  The browser will then
either render or hit you with a save option.


fiq
__
__  __   _ __  __
|  \/  | ___   __| | ___ _ __ _ __ |  \/  | __ _ _ __
| |\/| |/ _ \ / _` |/ _ \ '__| '_ \| |\/| |/ _` | '_ \
| |  | | (_) | (_| |  __/ |  | | | | |  | | (_| | | | |
|_|  |_|\___/ \__,_|\___|_|  |_| |_|_|  |_|\__,_|_| |_|
a pathetic example of his organic heritage
- Bad Religion




tt2 using mason tags

2002-04-08 Thread Rafiq Ismail (ADMIN)

Hi,

I'm experimenting with conversion of a mason template based system to tt2.
I tried to set TT2Tags to mason and then to %  however this, even with
the evaluate option to on, doesn't seem to work. (Apache::Template)

I then wrote a custom handler which uses a custom parser, which I've
constructed with the tag style set to mason.  No go there either. I've got
inline perl turned on, however I seem to alternate between a random
permissions error (probably a silly oversight) and an unevaluated
tempalate.

Does this sound familiar?

Has anyone had any success with porting straight from Mason?

Part two would be to replace the inline code with tt2 directives- thought
it was worth mentioning this before getting flamed.  :)

I'm just after evaluation with mason tags.  Anyone?

TIA,
fiq




__
__  __   _ __  __
|  \/  | ___   __| | ___ _ __ _ __ |  \/  | __ _ _ __
| |\/| |/ _ \ / _` |/ _ \ '__| '_ \| |\/| |/ _` | '_ \
| |  | | (_) | (_| |  __/ |  | | | | |  | | (_| | | | |
|_|  |_|\___/ \__,_|\___|_|  |_| |_|_|  |_|\__,_|_| |_|
a pathetic example of his organic heritage
- Bad Religion





Re: tt2 using mason tags

2002-04-08 Thread Mark Fowler

On Mon, 8 Apr 2002, Rafiq Ismail (ADMIN) wrote:

 Converting Mason to TT2 stuff

Hi.

May I suggest you repost this to the template toolkit list?
http://www.template-toolkit.org/mailman/listinfo/templates

Sounds like you're getting confused between [% %] for template code 
and [% PERL %] ... [% END %] for actual real perl code

Later.

Mark.

-- 
s''  Mark Fowler London.pm   Bath.pm
 http://www.twoshortplanks.com/  [EMAIL PROTECTED]
';use Term'Cap;$t=Tgetent Term'Cap{};print$t-Tputs(cl);for$w(split/  +/
){for(0..30){$|=print$t-Tgoto(cm,$_,$y). $w;select$k,$k,$k,.03}$y+=2}




Re: tt2 using mason tags

2002-04-08 Thread Perrin Harkins

Mark Fowler wrote:
 Sounds like you're getting confused between [% %] for template code 
 and [% PERL %] ... [% END %] for actual real perl code

Agreed.  Also, any significant Mason component is likely to use Mason's 
built-in object model, which is not part of TT.  You will probably have 
to port some code before it will run.

- Perrin




Re: Configuration of mod-perl and cgi-bin in appach conf file

2002-04-08 Thread Geoffrey Young

Wong, Connie wrote:
 
 Hello Geoffrey,

hi...

these types of questions are probably more suited to the general mod_perl list, so I've
cc'd them.

 
 My host is running an Apache server with mod-perl, and I have all the html
 files resided in the /usr/local/apache/htdocs directory and all my perl
 script is resided in the directory that I created for perl
 /usr/local/apache/Scripts.
 
 This works fine with the following config in the apache httpsd.conf file.
 
 PerlRequire conf/startup.pl
 PerlFreshRestart On
 
 Alias /Scripts/ /usr/local/apache/Scripts/
 
 Location /Scripts
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
PerlSendHeader On
PerlSetupEnv On
 /Location
 
 I have 2 questions:
 
 Question #1: running  mod-perl
  If I want to create a home for my application, say
 /home/server_name/proj_A/www, under the www directory,
 I have docs and Scripts subdirectories. The docs subdirectory contains all
 html files and the Scripts directory contains all the perl (mod-perl) files.
 How do I configure this in the apache configuration file in order to make it
 run correctly?


it really depends on what you want to do.  the easiest way would be to set the
DocumentRoot to /home/server_name/proj_A/www for the partucular vhost, assuming that 
your
entire application is the only thing on the vhost.  

another option is the Location directive, couple with an Alias directive.  for help 
with
generic apache directives, see the documentation at http://httpd.apache.org/docs

 
 Question #2: running cgi - how to configure this in apache conf file?
   Someone else running a CGI program on the same apache server, his
 application is resided in home/server_name/porj_B/www.
 
 I configured the following directives in the apache configuration file, it
 launches the html page is ok, but it try to invoke the perl (cgi-bin) then I
 got the Internal Server Error message. It does not know where to find the
 perl script.
 
 Alias /docs/ /home/server_name/proj_B/docs/
 Directory /home/server_name/proj_B/docs
 Options Indexes FollowSymlinks MultiViews
 AllowOverride None
 Order allow,deny
 Allow from all
 /Directory
 
 ScriptAlias /cgi-bin/ /home/server_name/proj_B/cgi-bin/
 Directory /home/server_name/proj_B/cgi-bin
 AllowOverride None
 Options None
 Order allow,deny
 Allow from all
 /Directory

ScriptAlias is generally used with the Location directive.  I'm not sure if it will 
work
with Directory at all, but it may - I've never tried.  a better approach for 
Directory
containers is probably want to use just the Alias directive and place a SetHandler
cgi-script directive within the Directory.  that's about the only thing I can see 
that
may be wrong off the top of my head.

again, since this is just regular mod_cgi stuff, the Apache documentation site would 
be a
good place to start for general apache setup tips.

HTH

--Geoff



Re: Ordering in %INC for PerlRestart

2002-04-08 Thread Perrin Harkins

Ged Haywood wrote:
 Hi there,
 
 On Tue, 2 Apr 2002, [iso-8859-1] Sreeji K Das wrote:
 
 
I use PerlFreshRestart on to reload my modules.
 
 [snip]
 
However, here my modules are getting loaded before the
PerlRequire'd is loaded (since %INC is a hash).

First, can some1 suggest a solution for this ?
 
 
 I always stop (with SIGTERM) and start my servers rather than using
 restart (SIGUSR1) as I find that there are fewer surprises.  I think
 that Perrin will agree.  There are very few systems that can't cope
 with a few seconds of downtime.

It's certainly a lot safer, and it won't trash your shared memory the 
way PerlFreshRestart will.

- Perrin




take23.org 500 internal server error (probably OT)

2002-04-08 Thread David Nelson

Hello all,

Thanks to everyone for helping promote open source! 
What a great feeling it is to be a part of this
movement.  http://www.take23.org is down due to an
internal server error at the moment.  If anyone knows
who maintains this and can email them, they'd probably
appreciate it.  Sorry if this is very off topic.

Since I'm posting, I'll share one more quick question.
 Does anyone know how to license software as GPL but
have it only be able to be used by non-profit
companies?  I'm writing an OO Perl / mod_perl based
'click to donate' management software package, but I
don't want it to be used by people/companies seeking
to profit from it.  The goal of the software is to let
people run their own 'click to save rainforest',
'click to feed the hungry' etc.

Thanks for any advice you all have on this.

peace,
David
 

__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/



Re: take23.org 500 internal server error (probably OT)

2002-04-08 Thread Luciano Miguel Ferreira Rocha

On Mon, Apr 08, 2002 at 11:44:24AM -0700, David Nelson wrote:
 Since I'm posting, I'll share one more quick question.
  Does anyone know how to license software as GPL but
 have it only be able to be used by non-profit
 companies?
Then you can't use GPL. GPL isn't against people making money of software,
but against people depriving the users from their rights to change and
distribute the software. OSI's OpenSource also isn't against people
making money, and one rule that OpenSource licences must abide is
indiscrimination against people using the software for money.

You'll have to make your own licence, then.

Regards,
Luciano Rocha

-- 
Luciano Rocha, [EMAIL PROTECTED]

The trouble with computers is that they do what you tell them, not what
you want.
-- D. Cohen



Re: mod_perl and open files limit

2002-04-08 Thread Perrin Harkins

Ged Haywood wrote:
 I'd suggest setting MaxRequestsPerChild to a low value (I generally
 use something in the range of 50-100 but Perrin will tell you that's
 *very* low... :) to avoid leak problems.

A setting of 0 is fine, as long as you are using Apache::SizeLimit or 
Apache::GTopLimit.  In fact, that's the best way to do it, since it 
gives your child processes the longest possible lifespan while 
preventing them from getting too big.

As for the source of the original problem, it is probably a bug in the 
local code.  You should check to make sure all of your filehandles are 
being closed.  The other suspicious-sounding module is 
Apache::Lock::File.  You can check it by replacing it with NullLocker 
and watching to see if the problem disappears.

- Perrin




Re: [announce] mod_perl-1.99_01

2002-04-08 Thread Kee Hinckley

At 9:18 AM +0100 4/8/02, Ged Haywood wrote:
Then print only the messages you want people to see.  In my view there
is far too much output from a typical build and install (of anything:).

I have to agree with this.  Installers are notorious for this, with 
compilers following close behind.  I remember once (a long long time 
ago) when I was working in the computer center in college and someone 
couldn't figure out why their program wouldn't run.  They'd been 
compiling, editing, and running it for an hour, but it just wouldn't 
run.  The compiler put out about five lines of copyright and random 
info everytime it ran.  They didn't notice the one line of error 
message that followed that.

All that diagnostic stuff is useful if something goes wrong, but not 
otherwise.  I like some of the newer installers now that at the end 
of the run tell you exactly what directories things were installed 
with, instead of asking you to peruse several pages of output.  I'd 
say do this:

Dump all your informative info to a variable or tmp file.  If there's 
an error--print the informative stuff *then*, along with the error 
(or an error message and pointer to the tmp file).  If there 
isn't--print a nice summary and toss the variable out.

If you've got sub-builds and the like, then print a message when they 
start, and print a . for every compile as you (invisibly) see the 
output go by.  And of course you can erase the line and show the next 
build in the same place.
-- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
[EMAIL PROTECTED]

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.



Re: tt2 using mason tags

2002-04-08 Thread Rafiq Ismail (ADMIN)

 Mark Fowler wrote:
 Agreed.  Also, any significant Mason component is likely to use Mason's
 built-in object model, which is not part of TT.  You will probably have
 to port some code before it will run.

Understood, but it's a small application which is more custom o.o. perl
and inline perl based than it is custom mason.  Other than the fact that
it gets rendered by mason, it is pretty independent.

It's just the fact that in spite of my specifying that it should use
inline_perl, it didn't interpolate the inline code which uses custom
modules in mason tags.  I've got it to try and interpolate now, however it
seems to warn that $VARNAME's are odd symbols.  I'll look at that later.
Going to redo the whole thing in tt2 directives anyway.

Cheers to all.

fiq

__
__  __   _ __  __
|  \/  | ___   __| | ___ _ __ _ __ |  \/  | __ _ _ __
| |\/| |/ _ \ / _` |/ _ \ '__| '_ \| |\/| |/ _` | '_ \
| |  | | (_) | (_| |  __/ |  | | | | |  | | (_| | | | |
|_|  |_|\___/ \__,_|\___|_|  |_| |_|_|  |_|\__,_|_| |_|
a pathetic example of his organic heritage
- Bad Religion




Re: take23.org 500 internal server error (probably OT)

2002-04-08 Thread Matt Sergeant

On Monday 08 April 2002 7:44 pm, David Nelson wrote:
 Hello all,

 Thanks to everyone for helping promote open source!
 What a great feeling it is to be a part of this
 movement.  http://www.take23.org is down due to an
 internal server error at the moment.  If anyone knows
 who maintains this and can email them, they'd probably
 appreciate it.  Sorry if this is very off topic.

Fixed. Thanks for the heads-up.

 Since I'm posting, I'll share one more quick question.
  Does anyone know how to license software as GPL but
 have it only be able to be used by non-profit
 companies?

Try the Aladdin Public license. This is what pdflib (www.pdflib.com) uses.

-- 
:-get a SMart net/:-



[JOB] mod_perl/DBI programmer in Fairfax, VA

2002-04-08 Thread Robert Landrum

Capitol Advantage
Fairfax, VA, USA

Description:

Online Congressional Directory publisher is looking for a lead 
programmer (or programmers) to maintain our existing codebase 
(written in mod_perl) and develop new additional components for the 
system.

Skills Required:

Perl, mod_perl, Apache, Linux, DBI.

Additional Desired Skills:

Oracle, Solaris, Mysql, SMTP protocol familiarity, socket 
programming, process management (fork), juggling.


If interested, please contact:

Bob Hansan
[EMAIL PROTECTED]
2731-A Prosperity Ave
Fairfax VA 22031
P: 703-289-4670
F: 703-289-4678



dear administrator, Unsubscribe me please

2002-04-08 Thread Upal


Dear Administrator of mod-perl discussion group,

Please unsubscribe me from this group.

With regards,

Upal Nath

=
Upal.

__
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/



Re: tt2 using mason tags

2002-04-08 Thread Perrin Harkins

Rafiq Ismail (ADMIN) wrote:
 It's just the fact that in spite of my specifying that it should use
 inline_perl, it didn't interpolate the inline code which uses custom
 modules in mason tags.  I've got it to try and interpolate now, however it
 seems to warn that $VARNAME's are odd symbols.

If you post an example of the troublesome templates on the TT list, 
someone will probably be able to help you.

- Perrin




Help Requested: Segfault 11 7 MONTHS after compilation on multiple servers all compiled the same running different code and different Redhat Released all on the same day [BUG]

2002-04-08 Thread Kevin A. McGrail

Synopsis: My servers, installed per instructions at
http://www.peregrinehw.com/downloads/apached/devel, were originally compiled
in July of Last year.  On February 6th of this year, without warning or
change, we began segfault 11'ing for the first time in years on multiple
servers with enough differences to rule out code bases or hardware.  On Mar
26th, we turned off mod_perl by SIMPLY commenting the Apache::Registry line
in httpd.conf and NOT recompiling.  Our segfaults stopped.

After more research I thought it was a bug, exploit or attack caused by a
malicious program or user sending a bizarre string.  To test this, I enabled
a VERY strict .htaccess on our development site denying access to all but
our beta tests.  The segfaults stopped even with mod_perl enabled again.

Now, more than 2 months later, we are still working on why and how to fix
the problem. Through the recommendation of many people at the Apache project
and the PHP exploit, we have upgraded to Apache 1.3.23.  We are now trying
Apache 1.3.24 as of 3PM today.

We have tried in vain to get a core file (Compiled with the #WITH DEBUG
lines in the instructions above and chmod'd 777 core files in
/usr/local/apache.  However, the child processes don't actually core dump so
their is nothing to trace.  If anyone can help me get a core file, I think
this would help immensely.

So, the best I can do is read and try changes one and a time and I am ready
to make this crackpot theory  ;-)

Code Red II (or a variant thereof) starts at octet 63.  My servers are at 66
and it has taken till February to get there. Hence, the delay between the
compilation in July and the segfaults in Feb and it explains why my servers
are bombing and not hundreds of others on different IP ranges.  What's odd
is I thought a follow-up request for default.ida was part of Code Red but
I'm not seeing those errors, just the malformed host header

Anyway, I believe we have now correlated a malformed host entry with our
segfaults finally.  It takes a while but this is what seems to blow it up.
It ONLY happens when Apache::Registry is enabled in the httpd.conf (still
compiled in and still loading startup.pl, just no scripts are activating
it).

[Mon Apr  8 14:04:03 2002] [error] [client 195.210.129.26] Client sent
malformed Host header
[Mon Apr  8 14:12:51 2002] [notice] child pid 11889 exit signal Segmentation
fault (11)
[Mon Apr  8 15:04:49 2002] [error] [client 218.76.7.137] Client sent
malformed Host header
[Mon Apr  8 15:42:52 2002] [notice] child pid 13768 exit signal Segmentation
fault (11)

As you can see, it takes a while to crash the process but blocking access to
the server via .htaccess STOPS the segmentation faults as I mentioned
before.


I would appreciate any comments of similar experiences or help in regards to
making a core file.

Regards,

KAM





[±¤'°í]ÃÖ°íÀÇ »ç³» ÀÎÆ®¶ó³Ý ±¸Ãàºñ¿ë=ÃÊƯ°¡ 468¸¸¿ø!!

2002-04-08 Thread news
Title: Untitled Document





  

  


  

  


  

  


  

  


  

  


   
 
  
  

  


  

  ¼ö½Å°ÅºÎ: ¸ÞÀÏ ¼ö½ÅÀ» ¿øÇÏÁö ¾Ê´Â °æ¿ì ¿©±â¸¦ 
´­·¯ÁֽʽÿÀ.

  


  
  





[JOB WABTED] [OT]

2002-04-08 Thread Ged Haywood

Hi all,

Sorry this is somewhat off-topic.  A colleague who is seeking work
(preferably contract) has asked me to let people know.  His name is
Bill Horsman.  I've known him for several years, he's a good man.

Hope this is useful to someone.

73,
Ged.

--
Capabilities:

1.  Expert Java programmer, 4+ years experience (10 years IT contracting).

2.  Lots of Web Application exprience.  Servlets.  Java Server Pages.
Resin servlet engine.  Linux (web  system administration).  Good HTML
design, CSS.  SQL Databases (e.g. Ingres, DB2, Oracle).

3.  Technical Architect.  Object Oriented design.  Efficient re-use of
open source components.  Extreme Programming.  Refactoring.

4.  Lots of experience of complete project lifecycle.  Able to satisfy
high-level deadlines whilst remaining focused on development. 

5.  Novice Perl Programmer.  (Well, I said it was OT :)

6.  Willing to work on site, any location.

7.  CV at http://www.logicalcobwebs.com/billhorsman.cv.html
--





off: DJBDNS

2002-04-08 Thread Udlei Nattis

hi
i have one webinterface writting in modperl
i looking for one people to translator to english
becausa my english is very bad ;)

if you interesting
please, contact-me

mail: [EMAIL PROTECTED]
icq: 62598138

bye nattis




Re: Help Requested: Segfault 11 7 MONTHS after compilation on multipleservers all compiled the same running different code and different RedhatReleased all on the same day [BUG]

2002-04-08 Thread Ged Haywood

Hi there,

On Mon, 8 Apr 2002, Kevin A. McGrail wrote:

 help in regards to making a core file.

Check the debug section of the Guide:

http://perl.apache.org/guide

Also see the file .../mod_perl-x.xx/SUPPORT for advice on what
information should be posted with a reort such as yours.

73,
Ged.

PS: That's a VERY long subject line... :)




mod_perl restart vs. graceful

2002-04-08 Thread John E. Leon Guerrero

i'm interested in understanding the consequences of restart vs. graceful
better.

i've seen where the mod_perl guides recommend stopping and then restarting a
mod_perl apache rather than doing a graceful restart.  i only saw
indications that memory does not get cleaned up cleanly if this is done.

my operations group does graceful restarts for the sole purpose of rotating
logs.  their method has the beauty that apache continues to run after the
graceful (very important when automated jobs are playing with your website
at midnight when no employee is watching the system.)  we could change the
script to do a stop then restart, but we've seen where this method (done
manually) was not 100% reliable and would sometimes require a couple of
stops before we could really restart apache (never understood why this was
so.)  if there is sufficient reason to move to a hard stop/restart, then i
suppose we could make the job retry like 5 times and then email a pager if
there continues to be a problem.  i just need ammunition if i am to
jeapordize my operations group's sleep for yet another reason.

can anyone elaborate?  thank you,
jlg

John Leon Guerrero -- http://www.live365.com





Re: Newbie Alert: Q: References to Authenticating a User to MS-SQL 2000?

2002-04-08 Thread Peter Bi

Darren:

you can subclass the authentication() method in the module
AccessCookieMaster.pm I posted just a hour ago, if you won't mind asking
your users enable cookies.

ie:
replacing select 1 from url_user.table where username='username' and
password='password'
by
select 1 from ... AND url='$request_uri'

For better control, you may need to double check the URL each time in
AccessCookie.pm

Peter Bi
[EMAIL PROTECTED]

- Original Message -
From: Darren Ward [EMAIL PROTECTED]
To: Apache-Perl (E-mail) [EMAIL PROTECTED]
Sent: Monday, April 08, 2002 4:49 PM
Subject: Newbie Alert: Q: References to Authenticating a User to MS-SQL
2000?


 Hi All,

 Subject line says it all really.

 I have a need to authenticate users against a MS-SQL 2000 Server which has
a
 table with 'username' and 'password' fields but also on the Apache side
need
 to be able to use a third field in the table 'url' to control what url's
the
 user can access.

 The url field would be a one to many to the username.

 Any ideas?

 Darren Ward   (PGradCS, CCIE #8245, CCNP, CCDP, MCP)
 Victorian Operations Manager
 Mobile: 0411 750 418
 Email: [EMAIL PROTECTED]
 PGP Key: http://lithium.nttaus.com.au/~darrenw/darrenw.asc
 PGP Fingerprint: A4F9 3E93 4EE2 9CDF 5436  06EF 41B8 6027 4505 AE48

 NTT Australia IP Pty Ltd
 ABN 73 080 394 645
 Level M1, Rialto Towers
 525 Collins Street, VIC. 3000
 Tel: (03) 9683 0007
 Fax: (03) 9620 7497
 http://www.nttaus.com.au/IP/
 --
--
 -
 Australian General Telecommunications Carrier License No 23
 --
--
 -
 Disclaimer:
 Please note that this correspondence is for the named
 person's use only and may contain information that is
 confidential and privileged.

 If you received this correspondence in error, please
 immediately delete it from your system and notify
 the sender.  Please ensure that you do not disclose,
 copy or rely on any part of this correspondence if
 you are not the intended recipient.  We apologise for
 any inconvenience and thank you for your assistance.






Re: Thanks and GoodBye

2002-04-08 Thread ___cliff rayman___

i have a set of detailed plans that allows for a
mod_ssl front end with mutliple backends, of
which i have built mod_perl and mod_php. this
version works in a virtualhost environment (i did
not setup the php for virtualhost, but that is trivial).

it has not yet been tested in a heavy production
environment, but it should build just fine, and it will
work great for testing and learning.  i think it will work
better on 1.3.24 (because of better proxy buffering
and releasing), but there was a bug in that
release, and the patch came out after i reverted
to 1.3.23.  let me know if you'd like a copy.

cliff

John Kolvereid wrote:

 Hi Perrin,
 I might try it later.  Actually, I am a programmer
 and I would very much like to take advantage of the
 features that mod_perl offer.  If all fails I'll drop
 back to CGI, JSP and PHP.  Thanks.

John Kolvereid
 --- Perrin Harkins [EMAIL PROTECTED] wrote:
  John Kolvereid wrote:
  Thanks for all your help, but I am NOT able to
   install mod_perl.  It's probably something that is
  not
   installed on my particular server - I'll never
  know.
 
  I suspect you were just trying to do too much at
  once on your first try
  by throwing PHP and SSL in the mix.  I suggest you
  look at SpeedyCGI
  (http://daemoninc.com/speedycgi/), which offers
  similar speedups for CGI
  scripts but does not require you to recompile
  Apache.  It doesn't have
  the same feature set as mod_perl, but all you wanted
  to do was speed up
  your existing CGI scripts anyway.
 
  - Perrin
 

 __
 Do You Yahoo!?
 Yahoo! Tax Center - online filing with TurboTax
 http://taxes.yahoo.com/

--
___cliff [EMAIL PROTECTED]http://www.genwax.com/