Re: Documentation patch for mod_perl//win32

2001-11-21 Thread Alessandro Forghieri

Greetings.

Randy That's great that you thought this out and put it together;
Randy a few comments below appear below ...

Thanks for playing editor - and I am accepting all of your suggestions,
with the possible exception of what follows.

Randy I got confused about which is the first and which is the
Randy second category ... However, is this much detail needed?

The reason this section got in there is that a previous version
of the guide included  a highly opinionated quote against multithreading on
single processor
machines, which totally failed to take into account applications with long
running requests (except for saying that such apps should not exist). Hence
the counter-example, which I have now somewhat shortened.
If  there is still a consensus on it being overkill,
I can drop it altogether.

The revised version is below.

Cheers,
alf

snipsnip

=for RCS $Id: modperl_multithread_NT.pod,v 1.2 2001/11/21 10:09:30 forghier
Exp forghier $

=head1 OS caveats: multithreading on Windows NT

=head2 The problem

On Win32, mod_perl is effectively single threaded. What this
means is that a single instance of the interpreter is created,
and this is then protected by a server-wide lock that prevents
more than one thread from using the interpreter at any one time.
The fact that this will prevent parallel processing of requests,
including static requests, can have serious implications for
production servers that often must handle concurrent or
long-running requests.

This situation will change with Apache/mod_perl 2.0, which is
based on a multi-process/multi-thread approach using a native
Win32 threads implementation. See
http://perl.apache.org/~dougm/modperl_2.0.html for details.

At the time of writing, Apache-2.0 is in a beta stage of
development. mod_perl-2.0 is being actively developed, including the
Win32 port; if you would like a preview and/or would like to
contribute to the development process, see the documents on obtaining
mod_perl-2.0 by cvs, which can be obtained from mod_perl's home page
(http://perl.apache.org)

=head2 Does it really matter?

How serious is this? For some people and application classes it may be a
non-problem, assuming the static material issue is handled differently.

Low traffic and single user development sites will likely be
unaffected (though the lattest are likely to experience some surprises
when moving to an environment where requests are no longer serialized
and concurrency kicks in).

If your application is CPU bound, and all requests take roughly the
same time to complete, then having more processing thread than
processors (CPUs) will actually slow things down, because of the
context switching overhead. Note that, even in this case, the current
state of mod_perl will bar owners of multiprocessor Win32 machines
from gaining a load balancing advantage from their superior hardware.

On the other hand, applications dealing with a large service times
spread - say ranging from fractions of a second to a minute and above
- stand to lose a great deal of responsiveness from being single
threaded. The reason is that short requests that happen to be queueued
after long ones will be delayed for the entire duration of the jobs
that precede them in the queue; with multitasking they would get a chance
to complete much earlier.

=head2 Workarounds

If you need multithreading on Win32, either because your application
has long running requests, or because you can afford multiprocessor
hardware, and assuming you cannot switch operating system, you may
want to consider a few workarounds and/or alternatives - which do not
require waiting for 2.0.

You may be able to make Win32 multithreading a non-issue by tuning or
rearranging your application and your architecture (useful tips on
both counts can be found elsewhere in this document). You may be able
to significantly reduce your worst-case timing problems or you may
find that you can move the webserver to a more mod_perl friendly
operating system by using a multi tier scheme.

If your application needs the full power of the Apache modules (often
the case for people running outside Apache::Registry) you may want to
consider a multi_server load balancing setup which uses mod_rewrite
(or a similar URL partitioning scheme) to spread requests on several web
servers, listening on different ports.

The mod_proxy dual server setup,discussed in the Strategy section,
is also a possibility, although people who have tried it have reported
problems with Win32 mod_proxy.

If you code to Apache::Registry (writing CGI compliant code) and can
characterize the time demanded by a request from its URL, you can use
a rewrite based load balancing with a single server, by sending short
requests to mod_perl while routing longer ones to the pure CGI
environment - on the basis that startup, compilation and init times
will matter less in this case.

If none of the above works for you, then you will have to turn to some
non mod_perl alternatives: this, 

Re: mod_perl make test fails

2001-11-21 Thread Lyle Brooks

I experienced a similar problem (I was upgrading one thing, which
let to upgrading another,... which led to why not upgrade just about
everything :-)

My configuration/versions are pretty similar.

I modified lib/Apache/test.pm, at line 8 I put

use URI::URL ();

and then I modified t/internal/hooks.t, also at line 8 I added

use URI::URL ();

That seemed to get past the error and the tests passed.

HTH

 Hi there!
 
 I'm trying to compile apache_1.3.22+mod_perl-1.26 on a redhat 7.1
 linux box. I replace the original gcc  2.xx with gcc version 3.0.2
 and perl 5.6.0 with perl 5.6.1 both compiled in the same box.
 
 Any help will be highly appreciated
 
 _ Jose Albert
 
 These are the last lines of the output of 'make test'
 
 ../apache_1.3.22/src/httpd -f `pwd`/t/conf/httpd.conf -X -d `pwd`/t
 
 httpd listening on port 8529
 will write error_log to: t/logs/error_log
 letting apache warm up...\c
 done
 /usr/bin/perl t/TEST 0
 Can't locate object method new via package URI::URL (perhaps
 you forgot to load URI::URL?) at ../blib/lib/Apache/test.pm line
 252.
 make: *** [run_tests] Error 255
 
 * This is the error log **
 [root@lancelot mod_perl-1.26]# cat t/logs/error_log
 [notice] Destruction-DESTROY called for $global_object
 [Wed Nov 14 12:41:28 2001] [warn] [notice] child_init for process
 4115, report any problems to [no address given]
 



RE: PerlModule not updating %INC

2001-11-21 Thread Geoffrey Young



 -Original Message-
 From: Perrin Harkins [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, November 20, 2001 6:43 PM
 To: David Pisoni; [EMAIL PROTECTED]; Robert Landrum
 Subject: Re: PerlModule not updating %INC
 
[snip]
 
 It sounds like this is a real bug with PerlModule.  This was 
 supposed to be
 fixed by 1.26, but I guess the fix didn't work or it got broken again.
 (Doug?)

I wonder if this has something to do with the multiple init thing 

http://marc.theaimsgroup.com/?l=apache-modperlm=100510779912574w=2

if the interpreter is really being entirely broken down on each restart
(including the initial one that Apache does when it reparses httpd.conf)
%INC might be getting mucked up...

--Geoff



Re: mod_perl make test fails

2001-11-21 Thread Marcus Taylor



 


this fixes it (reposted here)



make test expects 3 pre-loaded perl modules to be present

in order to execute.  One of them is LWP::UserAgent (part of libwww-perl)


The problem you specify only occurs if you have installed a version of

libwww-perl that is  5.53 (probably v. 5.6)


If you don't want to downgrade, you can install 5.53 to a local directory,

set $PERL5LIB to include it, then rerun make test.


Marcus Taylor

Semantico

http://www.semantico.com/







[SOT] EmuMail and mod_perl

2001-11-21 Thread Geoffrey Young

hi all...

  just curious if anyone out there has run EmuMail's WebMail under mod_perl.
I've been tasked with evaluating a legacy system here and the feasability of
porting the installation from FastCGI to mod_perl in the hopes of reducing
the strain on the box and speeding things up a bit. (please don't ask why
we're using EmuMail in the first place...)

  what bothers me are these two bits of information on making the switch.
from the EmuMail README.modperl:

  Emumail has been certified to run under modperl, but extensive tests have
shown that there are some intermittent problems with it, so we highly
recommend using FCGI over modperl. But if you choose to run modperl, in
general you should have no problems.

  4. in your emumail html directory (/home/emumail/html)
copy emumail.cgi to EMU.pm

  really, these two items give me the heebie-geebies.  any first-hand
experiences with this product?

--Geoff



Random perl errors

2001-11-21 Thread Michael Nelson

I have two web servers carrying a light load that are encountering errors
like the following. They occur randomly but often enough to be a serious
problem. Example #2 in particular seems to repeat itself continuously
until I restart Apache.

I have perused the mod_perl archives and some other places but haven't
seen anything that looks similar. I suspect some kind of memory problem
somewhere but I am out of ideas, short of instrumenting Perl's source
code by hand.

Errors:

1) Not a CODE reference at [blah] line 482. The offending line looks
something like:

   Function (String, String '$self-{Blah}');

2) Undefined subroutine FOO::BAR::BAZ called at file line 74. The code
that invokes FOO::FAR::BAZ looks something like:

   eval use FOO::BAR;
   {FOO::BAR::BAZ} ($parameter);

3) Undefined subroutine amp;main:: called at blib/lib/Net/SSLeay.pm [blah
blah blah...] occurred once on Monday on the one machine that uses
Net::SSLeay.

We are running FreeBSD 4.2, Apache 1.3.22, mod_perl 1.26, and both Perl
5.00503 and Perl 5.6.1. Native libraries used on _both_ servers:

  - DBD::Sybase 0.93 w/ FreeTDS 0.53 to talk to SQL Server
  - XML-Parser-2.29 (though typically only used once when a configuration
module is use'd for the first time).

I would appreciate any ideas people might have on how to nail this.

Thanks,
-mike





Re: Random perl errors

2001-11-21 Thread Stas Bekman

Michael Nelson wrote:

 I have two web servers carrying a light load that are encountering errors
 like the following. They occur randomly but often enough to be a serious
 problem. Example #2 in particular seems to repeat itself continuously
 until I restart Apache.
 
 I have perused the mod_perl archives and some other places but haven't
 seen anything that looks similar. I suspect some kind of memory problem
 somewhere but I am out of ideas, short of instrumenting Perl's source
 code by hand.
 
 Errors:
 
 1) Not a CODE reference at [blah] line 482. The offending line looks
 something like:
 
Function (String, String '$self-{Blah}');
 
 2) Undefined subroutine FOO::BAR::BAZ called at file line 74. The code
 that invokes FOO::FAR::BAZ looks something like:
 
eval use FOO::BAR;
{FOO::BAR::BAZ} ($parameter);
 
 3) Undefined subroutine amp;main:: called at blib/lib/Net/SSLeay.pm [blah
 blah blah...] occurred once on Monday on the one machine that uses
 Net::SSLeay.
 
 We are running FreeBSD 4.2, Apache 1.3.22, mod_perl 1.26, and both Perl
 5.00503 and Perl 5.6.1. Native libraries used on _both_ servers:
 
   - DBD::Sybase 0.93 w/ FreeTDS 0.53 to talk to SQL Server
   - XML-Parser-2.29 (though typically only used once when a configuration
 module is use'd for the first time).
 
 I would appreciate any ideas people might have on how to nail this.


the short answer test the code under -X,

the long answer in the beginning of this chapter:
http://perl.apache.org/guide/porting.html



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




Re: PerlModule not updating %INC

2001-11-21 Thread Perrin Harkins

 I wonder if this has something to do with the multiple init thing

 http://marc.theaimsgroup.com/?l=apache-modperlm=100510779912574w=2

It does.  It's exactly the same bug.

 if the interpreter is really being entirely broken down on each restart
 (including the initial one that Apache does when it reparses httpd.conf)
 %INC might be getting mucked up...

It shouldn't.  I thought the interpreter didn't actually get broken down on
restart at all unless you have PerlFreshRestart on.  However, I see that
Doug said this:

i think that using *Apache::ReadConfig elsewhere will still trigger the
double loading of all Perl{Require,Module}s, but i doubt the people
suffering from the double load problem are using that feature.  so i'll
deal with that later.

David, are you using Apache::ReadConfig or anything that uses it?

- Perrin




RE: PerlModule not updating %INC

2001-11-21 Thread Geoffrey Young



 -Original Message-
 From: Perrin Harkins [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 21, 2001 11:01 AM
 To: Geoffrey Young; [EMAIL PROTECTED]; David Pisoni
 Subject: Re: PerlModule not updating %INC
 
 
  I wonder if this has something to do with the multiple init thing
 
  http://marc.theaimsgroup.com/?l=apache-modperlm=100510779912574w=2
 
 It does.  It's exactly the same bug.
 
  if the interpreter is really being entirely broken down on 
 each restart
  (including the initial one that Apache does when it 
 reparses httpd.conf)
  %INC might be getting mucked up...
 
 It shouldn't.  I thought the interpreter didn't actually get 
 broken down on
 restart at all unless you have PerlFreshRestart on. 
  However, 
 I see that
 Doug said this:
 
 i think that using *Apache::ReadConfig elsewhere will still 
 trigger the
 double loading of all Perl{Require,Module}s, but i doubt the people
 suffering from the double load problem are using that 
 feature.  so i'll
 deal with that later.

yeah, I read that and didn't understand the how patch he offered worked here
at all.

IIRC, I ran a test with only httpd.conf.default with only these additions

PerlModule My::Foo

then

package My::Foo;
warn initializing...;


in lib/perl and I got 'initializing' on each restart.  no Apache::ReadConfig
going on here.

I may have time to test this again today, but if someone else could verify,
that would be great.

--Geoff



Re: PerlModule not updating %INC

2001-11-21 Thread Perrin Harkins

 IIRC, I ran a test with only httpd.conf.default with only these additions

 PerlModule My::Foo

 then

 package My::Foo;
 warn initializing...;


 in lib/perl and I got 'initializing' on each restart.  no
Apache::ReadConfig
 going on here.

And no PerlFreshRestart?




RE: PerlModule not updating %INC

2001-11-21 Thread Geoffrey Young



 -Original Message-
 From: Perrin Harkins [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 21, 2001 11:12 AM
 To: Geoffrey Young; [EMAIL PROTECTED]; David Pisoni
 Subject: Re: PerlModule not updating %INC
 
 
  IIRC, I ran a test with only httpd.conf.default with only 
 these additions
 
  PerlModule My::Foo
 
  then
 
  package My::Foo;
  warn initializing...;
 
 
  in lib/perl and I got 'initializing' on each restart.  no
 Apache::ReadConfig
  going on here.
 
 And no PerlFreshRestart?

nope - I literally copied the default httpd.conf and added the single
PerlModule directive.  maybe a ServerName and Port change too, but no other
mod_perl stuff.

this drove me batty as I was trying to document how module initialization
code worked.  I did lots of archive digging and convinced myself that the
current behavior is broken and that Doug thinks that what we all expect to
see is the proper behavior, despite the fact that I created mod_perl builds
back to 1.24 and saw the same thing.

--Geoff 



RE: PerlModule not updating %INC

2001-11-21 Thread Geoffrey Young

ok, here was my test...

[geoff@mainsheet apache]$ diff -u conf/httpd.conf.default conf/httpd.conf
--- conf/httpd.conf.default Wed Nov 21 02:00:16 2001
+++ conf/httpd.conf Wed Nov 21 11:59:35 2001
@@ -38,6 +38,8 @@
 # server as /usr/local/apache/logs/foo.log.
 #
 
+PerlModule My::Foo
+
 ### Section 1: Global Environment
 #
 # The directives in this section affect the overall operation of Apache,
@@ -248,7 +250,7 @@
 #  don't use Group #-1 on these systems!
 #
 User nobody
-Group #-1
+Group nobody
 
 #
 # ServerAdmin: Your address, where problems with the server should be
[geoff@mainsheet apache]$ cat lib/perl/My/Foo.pm 
package My::Foo;
open my $fh, '/tmp/test';
print $fh scalar localtime, \n;
1;
[geoff@mainsheet apache]$ cat /tmp/test
[geoff@mainsheet apache]$ ./bin/apachectl start
./bin/apachectl start: httpd started
[geoff@mainsheet apache]$ cat /tmp/test
Wed Nov 21 12:01:06 2001
[geoff@mainsheet apache]$ ./bin/apachectl restart
./bin/apachectl restart: httpd restarted
[geoff@mainsheet apache]$ cat /tmp/test
Wed Nov 21 12:01:06 2001
Wed Nov 21 12:01:17 2001



that's not what we should be seeing, right?

--Geoff

[geoff@mainsheet apache]$ HEAD http://mainsheet.laserlink.net:8080
200 OK
Connection: close
Date: Wed, 21 Nov 2001 17:04:08 GMT
Accept-Ranges: bytes
Server: Apache/1.3.23-dev (Unix) mod_perl/1.26_01-dev
Content-Length: 413
Content-Type: text/html
ETag: 6b82a-19d-3bdd9d6c
Last-Modified: Mon, 29 Oct 2001 18:18:20 GMT
Client-Date: Wed, 21 Nov 2001 17:04:08 GMT
Client-Peer: 10.5.6.32:8080



Re: PerlModule not updating %INC

2001-11-21 Thread David Pisoni

At 11.00 -0500 11/21/2001, Perrin Harkins wrote:
SNIP

David, are you using Apache::ReadConfig or anything that uses it?

- Perrin

Nope, not using ReadConfig.  And to address another point, the behavior is consistant 
regardless of whether or not PerlFreshRestart is on.

David



A request's Origins

2001-11-21 Thread Rasoul Hajikhani

Hello folks,
I am trying to find out where (which machine) a request has come from.
We have several web servers running on different machines serving
different documents, so it is possible to jump servers back and forth.
This means that I would have to know what prev-uri was/is and what
r-uri was/is. The problem is that if the request object is the original
one, not a redirect or ErrorDocument handler r, the r-prev returns
undef. Jumping from one server to another is not a redirect (in my
case), so r-prev returns undef every time. Any ideas?

Also, has any one encountered an error using MLDBM::Sync saving to an
NFS mounted file?

Appreciate all comments.
Thanks in advance
-r



Seeking Legal help

2001-11-21 Thread Medi Montaseri


HiI know this is not the lawyers hang-out, but it is seasoned 
contractor's hangout and as such I need some legal advice...May I?

I did some work (about $25000 worth) for a customer and I'm having
problem collecting. 

One big problem is that I don't have a formal signed hardcopy contract
binding my customer to the work and cost. I however do have verbal,
email communications, FTP logs, Web Access logs, hardcopy business
projections, Witnesses and such showing that I'm not making this up.

After months of promissing sweet equity, partnership, this and that,
finally customer has asked me to invoice them and charge interest for the
unpaid balance. At the same time customer is using the application
I wrote for them. I however have a feeling that they are simply buying
time and differing the problem. And they might even file chapter 11 as
their marketing projection was not so correct. But I did my part.

What can I do?

Should I see a lawyer, and put out yet some more money towards something
that could never materialize? 

Is there some kind of Small Business Arbitration Committee? 

I'm in Northern California, Bay area

Thanks

-- 
-
Medi Montaseri   [EMAIL PROTECTED]
Unix Distributed Systems EngineerHTTP://www.CyberShell.com
CyberShell Engineering
-




RE: A request's Origins

2001-11-21 Thread Andy Sharp

If you're simply looking for which link they clicked on to bring them to
this particular page/screen; it should be stored in $ENV{HTTP_REFERER}

Also:
my $prev_page = $r-header_in(Referer);  #
http://www.someplace.com/withalinktohere.html

--A

 Hello folks,
 I am trying to find out where (which machine) a request has 
 come from. We have several web servers running on different 
 machines serving different documents, so it is possible to 
 jump servers back and forth. This means that I would have to 
 know what prev-uri was/is and what
 r-uri was/is. The problem is that if the request object is 
 the original
 one, not a redirect or ErrorDocument handler r, the r-prev 
 returns undef. Jumping from one server to another is not a 
 redirect (in my case), so r-prev returns undef every time. Any ideas?





Apache::Session Problem

2001-11-21 Thread Jonathan M. Hollin

Fellow Perl Mongers,

Can anyone help with my latest programming riddle?

I am trying to take advantage of the session-handling features of
Apache::Session.  My program includes the following code (line numbers added
for clarity):

20: # Session handler (I)...
21: use Apache::Session::DBI;

[cut]

40: # Session handler (II)...
41: my %session;
42: tie %session, 'Apache::Session::DBI',
43: {DataSource = dbi:$db_driver:sessions:$db_address};
44: my $session_cookie = session_id=$session{_session_id};;

[cut]

The variables $db_driver and $db_address are imported from a small
configuration file that defines them as mysql and 192.168.0.201
respectively.

My program dies when called (via CGI under mod_perl) with an 500 Internal
Server Error with the following line appended to error.log:

[Wed Nov 21 22:25:12 2001] [error] PerlRun: `Can't locate object method
TIEHASH via package Apache::Session::DBI at
e:/apache/htdocs/shapeshifter/system/logon.cgi line 42.'



Platform:  Win2K, Apache, mod_perl, MySQL...

Any suggestions (apart from quit programming and take up farming instead)?

Jonathan M. Hollin - WYPUG Co-ordinator
West Yorkshire Perl User Group
http://wypug.pm.org/




Re: Apache::Session Problem

2001-11-21 Thread Ilya Martynov

 On Wed, 21 Nov 2001 22:49:46 -, Jonathan M. Hollin 
[EMAIL PROTECTED] said:

Jonathan Fellow Perl Mongers,
Jonathan Can anyone help with my latest programming riddle?

Jonathan I am trying to take advantage of the session-handling
Jonathan features of Apache::Session.  My program includes the
Jonathan following code (line numbers added for clarity):

Jonathan 20: # Session handler (I)...
Jonathan 21: use Apache::Session::DBI;

Jonathan [..skip..]

Jonathan Platform:  Win2K, Apache, mod_perl, MySQL...

Jonathan Any suggestions (apart from quit programming and take up
Jonathan farming instead)?

I'm not sure why your code doesn't work but why are you using such old
Apache::Session? Take new Apache::Session which provides MySQL support
via Apache::Session::MySQL.

-- 
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
| Ilya Martynov (http://martynov.org/)  TIV.net (http://tiv.net/) |
| GnuPG 1024D/323BDEE6 D7F7 561E 4C1D 8A15 8E80  E4AE BE1A 53EB 323B DEE6 |
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-



[OT] Re: Seeking Legal help

2001-11-21 Thread Matt Sergeant

On Wed, 21 Nov 2001, Medi Montaseri wrote:


 HiI know this is not the lawyers hang-out, but it is seasoned
 contractor's hangout and as such I need some legal advice...May I?

 I did some work (about $25000 worth) for a customer and I'm having
 problem collecting.

 One big problem is that I don't have a formal signed hardcopy contract
 binding my customer to the work and cost. I however do have verbal,
 email communications, FTP logs, Web Access logs, hardcopy business
 projections, Witnesses and such showing that I'm not making this up.

 After months of promissing sweet equity, partnership, this and that,
 finally customer has asked me to invoice them and charge interest for the
 unpaid balance. At the same time customer is using the application
 I wrote for them. I however have a feeling that they are simply buying
 time and differing the problem. And they might even file chapter 11 as
 their marketing projection was not so correct. But I did my part.

 What can I do?

 Should I see a lawyer, and put out yet some more money towards something
 that could never materialize?

Well I'm from the UK, but I imagine most things apply.

Firstly, I think you have enough to confirm a contract, assuming you have
something stating that a contract will be forthcoming. However laws on
this can vary greatly.

Step one: Invoice. Now. If you haven't invoiced and you're arguing they
haven't paid up yet, you have no leg to stand on.

Step two: talk to these people! That's the most important thing to do.
Maybe they weighlayed your invoice. Or don't have the money just yet but
expect it soon.

Step three: Once you've given them 90 days after date of invoice, get a
solicitor (not a barrister) to draft a threatening letter. It'll cost you
about $100. I'm afraid you'll have to give them another 30 days at this
point.

Step four: Get a lawyer. Sue. $25,000 is not to be sniffed at.

-- 
Matt/

/||** Founder and CTO  **  **   http://axkit.com/ **
   //||**  AxKit.com Ltd   **  ** XML Application Serving **
  // ||** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
 \\//
 //\\
//  \\




Re: [OT] Re: Seeking Legal help

2001-11-21 Thread Dave Rolsky

On Wed, 21 Nov 2001, Matt Sergeant wrote:

 Maybe they weighlayed your invoice. Or don't have the money just yet but
 ^^^???

You folks may have invented the language but its still spelled waylayed!

 Step three: Once you've given them 90 days after date of invoice, get a
 solicitor (not a barrister) to draft a threatening letter. It'll cost you
 about $100. I'm afraid you'll have to give them another 30 days at this
 point.

We just have lawyers.  There's no distinction between solicitors and
barristers.


Actually, I'd start by seeing a lawyer since you want this as expedited as
possible.  A lawyer might tell you that you only have to wait 30 days
after the invoice (or something like that).  You never know.  It won't
cost all that much to simply make an appointment and talk to a lawyer for
an hour or so (probably $100-200) and it'll be probably be worth it to
talk to something with contract law experience in your state.


-dave

/*==
www.urth.org
We await the New Sun
==*/




Apache::Session Problem -- Addendum

2001-11-21 Thread Jonathan M. Hollin

Thanks to Ilya Martynov for his response...

I changed Apache::Session::DBI to Apache::Session::MySQL and tried
again.  The following error graced my error log:

[Wed Nov 21 23:01:13 2001] [error] PerlRun: `Died at
E:/Apache/site/lib/Apache/Session/Generate/MD5.pm line 40.'

Looking at MD5.pm - line 39, 40 and 41 read as follows:

if ($session-{data}-{_session_id} !~ /^[a-fA-F0-9]+$/) {
die;
}

I adjusted line 40 to read:

die $session-{data}-{_session_id};

The error log now gets:

[Wed Nov 21 23:07:54 2001] [error] PerlRun: `HASH(0x48acc64) at
E:/Apache/site/lib/Apache/Session/Generate/MD5.pm line 40.'

Yikes!

Any ideas?...


[original email follows...]
Fellow Perl Mongers,

Can anyone help with my latest programming riddle?

I am trying to take advantage of the session-handling features of
Apache::Session.  My program includes the following code (line numbers added
for clarity):

20: # Session handler (I)...
21: use Apache::Session::DBI;

[cut]

40: # Session handler (II)...
41: my %session;
42: tie %session, 'Apache::Session::DBI',
43: {DataSource = dbi:$db_driver:sessions:$db_address};
44: my $session_cookie = session_id=$session{_session_id};;

[cut]

The variables $db_driver and $db_address are imported from a small
configuration file that defines them as mysql and 192.168.0.201
respectively.

My program dies when called (via CGI under mod_perl) with an 500 Internal
Server Error with the following line appended to error.log:

[Wed Nov 21 22:25:12 2001] [error] PerlRun: `Can't locate object method
TIEHASH via package Apache::Session::DBI at
e:/apache/htdocs/shapeshifter/system/logon.cgi line 42.'



Platform:  Win2K, Apache, mod_perl, MySQL...

Any suggestions (apart from quit programming and take up farming instead)?

Jonathan M. Hollin - WYPUG Co-ordinator
West Yorkshire Perl User Group
http://wypug.pm.org/




Re: Seeking Legal help

2001-11-21 Thread Robert Landrum

At 3:21 PM -0800 11/21/01, Medi Montaseri wrote:
HiI know this is not the lawyers hang-out, but it is seasoned
contractor's hangout and as such I need some legal advice...May I?

I did some work (about $25000 worth) for a customer and I'm having
problem collecting.

One big problem is that I don't have a formal signed hardcopy contract
binding my customer to the work and cost. I however do have verbal,
email communications, FTP logs, Web Access logs, hardcopy business
projections, Witnesses and such showing that I'm not making this up.

After months of promissing sweet equity, partnership, this and that,
finally customer has asked me to invoice them and charge interest for the
unpaid balance. At the same time customer is using the application
I wrote for them. I however have a feeling that they are simply buying
time and differing the problem. And they might even file chapter 11 as
their marketing projection was not so correct. But I did my part.

What can I do?

Contact a lawyer.  Then tell the client that you have contacted a 
lawyer.  Put this in writing and sign it.  Be specific and let them 
know what it is exactly that you want, and that if they do not 
comply, you'll be forced to enlist the service of a lawyer and file 
suit.

Most of the time, this will be enough to get them to pay...  Nobody 
want's a legal battle, least of all a small business.

If they fail to pay, you have two options.  Bite the bullet and move 
on or sue them.

I am not a lawyer, but this is the process that my friend went 
through when he did about $20,000 worth of work for a client that was 
more than 180 days delinquent.  After court costs and lawyer fees, 
etc., he walked away with
$8,000.

Not great, but better than nothing.

Rob


--
Only two things are infinite: The universe, and human stupidity. And I'm not
sure about the former. --Albert Einstein



Re: Seeking Legal help

2001-11-21 Thread Michael Bacarella

On Wed, Nov 21, 2001 at 03:21:06PM -0800, Medi Montaseri wrote:

[...]

 After months of promissing sweet equity, partnership, this and that,
 finally customer has asked me to invoice them and charge interest for the
 unpaid balance. At the same time customer is using the application
 I wrote for them. I however have a feeling that they are simply buying
 time and differing the problem. And they might even file chapter 11 as
 their marketing projection was not so correct. But I did my part.

[...]

Eek. The chapter 11 part really means you have no time to spare.

See a lawyer yesterday.

---
Michael Bacarella [EMAIL PROTECTED]
Technical Staff / System Development,
New York Connect.Net, Ltd.



Re: Seeking Legal help

2001-11-21 Thread Robert Koberg

Invoice immediatley. When you send it, tell the client you are sending it,
and that you could really use the money since this is how you pay the bills.
Call the client back in a few days to see if they got it.  If they haven't
then offer to fax it to him.  If  they have it ask them how long it will
take, because you really need the money. Offer to contact the accounting
department so the client does not need to be bothered.

If this does not work then get a lawyer. But when you do this be prepared to
wait a much longer time.

best,
-Rob

- Original Message -
From: Robert Landrum [EMAIL PROTECTED]
To: Medi Montaseri [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, November 21, 2001 3:21 PM
Subject: Re: Seeking Legal help


 At 3:21 PM -0800 11/21/01, Medi Montaseri wrote:
 HiI know this is not the lawyers hang-out, but it is seasoned
 contractor's hangout and as such I need some legal advice...May I?
 
 I did some work (about $25000 worth) for a customer and I'm having
 problem collecting.
 
 One big problem is that I don't have a formal signed hardcopy contract
 binding my customer to the work and cost. I however do have verbal,
 email communications, FTP logs, Web Access logs, hardcopy business
 projections, Witnesses and such showing that I'm not making this up.
 
 After months of promissing sweet equity, partnership, this and that,
 finally customer has asked me to invoice them and charge interest for the
 unpaid balance. At the same time customer is using the application
 I wrote for them. I however have a feeling that they are simply buying
 time and differing the problem. And they might even file chapter 11 as
 their marketing projection was not so correct. But I did my part.
 
 What can I do?

 Contact a lawyer.  Then tell the client that you have contacted a
 lawyer.  Put this in writing and sign it.  Be specific and let them
 know what it is exactly that you want, and that if they do not
 comply, you'll be forced to enlist the service of a lawyer and file
 suit.

 Most of the time, this will be enough to get them to pay...  Nobody
 want's a legal battle, least of all a small business.

 If they fail to pay, you have two options.  Bite the bullet and move
 on or sue them.

 I am not a lawyer, but this is the process that my friend went
 through when he did about $20,000 worth of work for a client that was
 more than 180 days delinquent.  After court costs and lawyer fees,
 etc., he walked away with
 $8,000.

 Not great, but better than nothing.

 Rob


 --
 Only two things are infinite: The universe, and human stupidity. And I'm
not
 sure about the former. --Albert Einstein




Re: Seeking Legal help

2001-11-21 Thread Todd Finney

At 06:38 PM 11/21/01, Michael Bacarella wrote:
On Wed, Nov 21, 2001 at 03:21:06PM -0800, Medi Montaseri wrote:
  After months of promissing sweet equity, partnership, this and 
 that,
  finally customer has asked me to invoice them and charge interest 
 for the
  unpaid balance. At the same time customer is using the application
  I wrote for them. I however have a feeling that they are simply 
 buying
  time and differing the problem. And they might even file chapter 11 
 as
  their marketing projection was not so correct. But I did my part.

Eek. The chapter 11 part really means you have no time to spare.
See a lawyer yesterday.

Seconded.  Once they file Chapter 11, unsecured debtors (read: you) are 
basically SOL.   You can't collect, you can't even *ask*.

I just went through this with a client that I've been chasing over a 
couple thousand dollars for a year or so.   I waited too long, they 
filed for Chapter 11, and now there's effectively no possibility of 
ever collecting.

Live and learn.

cheers,
Todd






Re: Apache::Session Problem -- Addendum

2001-11-21 Thread Perrin Harkins

 I changed Apache::Session::DBI to Apache::Session::MySQL and tried
 again.

What's the version number of your Apache::Session?  It should be 1.54.

 42: tie %session, 'Apache::Session::DBI',
 43: {DataSource = dbi:$db_driver:sessions:$db_address};

With Apache::Session::MySQL, the docs say you should be passing the user
name and password.

- Perrin




Re: Apache::Session Problem -- Addendum

2001-11-21 Thread Tatsuhiko Miyagawa

On Wed, 21 Nov 2001 23:23:33 -
Jonathan M. Hollin [EMAIL PROTECTED] wrote:

 42: tie %session, 'Apache::Session::DBI',
 43: {DataSource = dbi:$db_driver:sessions:$db_address};

put $sid (session id: undef for fresh) after 'Apache::Session::MySQL'.

--
Tatsuhiko Miyagawa [EMAIL PROTECTED]




Re: A request's Origins

2001-11-21 Thread Randal L. Schwartz

 Andy == Andy Sharp [EMAIL PROTECTED] writes:

Andy If you're simply looking for which link they clicked on to bring them to
Andy this particular page/screen; it should be stored in $ENV{HTTP_REFERER}

Unless that value is wrong (sometimes), faked (possibly), or stripped
(by a security-conscious user, browser, or gateway).

REFERER is just a hint.  Trust it about as far as you can throw
your computer.  Laptops don't count. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
[EMAIL PROTECTED] URL:http://www.stonehenge.com/merlyn/
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!



cvs commit: modperl-2.0/lib/Apache Build.pm

2001-11-21 Thread stas

stas01/11/21 19:46:47

  Modified:lib/Apache Build.pm
  Log:
  doc patch: '-e rebuild' reads better than '-erebuild'
  
  Revision  ChangesPath
  1.74  +4 -4  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- Build.pm  2001/11/21 02:35:33 1.73
  +++ Build.pm  2001/11/22 03:46:47 1.74
  @@ -462,7 +462,7 @@
   print Running: $command\n;
   system $command;
   }
  -# % perl -MApache::Build -erebuild
  +# % perl -MApache::Build -e rebuild
   *main::rebuild = \rebuild if $0 eq '-e';
   
   #--- attribute access ---
  @@ -1040,7 +1040,7 @@
   
# rebuild mod_perl with build opts from the previous build
% cd modperl-2.0
  - % perl -MApache::Build -erebuild
  + % perl -MApache::Build -e rebuild
   
   =head1 DESCRIPTION
   
  @@ -1052,12 +1052,12 @@
   chdir to the mod_perl source directory and run:
   
 % cd modperl-2.0
  -  % perl -MApache::Build -erebuild
  +  % perl -MApache::Build -e rebuild
   
   If you want to rebuild not yet installed, but already built mod_perl,
   run from its root directory:
   
  -  % perl -Ilib -MApache::Build -erebuild
  +  % perl -Ilib -MApache::Build -e rebuild
   
   =head1 METHODS