Selectively persistent connections

2007-07-04 Thread Mattia Barbon \<[EMAIL PROTECTED]>
[Sorry if this is a duplicate, but I believe the first message
 did not get through]

  Hi all,
I am working in an Apache2/mod_perl2 environment, with MySQL DBs, and
I have a somewhat special need with respect to persistent connections;
I need some of the database connections to be persistent,
while most should stay not persistent; also, I'd like to have
a hook, to perform some initialization on a freshly open connection.

  After looking at the documentation/code I do not think I can use
Apache::DBI for that (but I'd love to be proven wrong!). Can anybody
point me towards a solution. I can obviously copy and modify
Apache::DBI, but it seems the kind of code that it's easy to get wrong
in very subtle ways, so I'd rather avoid that.

  Any suggestion appreciated.

Thanks!
Mattia

P.S.: I am not sure if this question is best posted on a DBI
mailing list


--
Scegli infostrada: ADSL gratis per tutta l’estate e telefoni senza canone 
Telecom
http://click.libero.it/infostrada



Re: bouncing emails

2007-01-28 Thread í Pavlovský <[EMAIL PROTECTED]>
Bill Whillers wrote:
> Can somebody recommend a standardized, up-to-date and similar module or 
> package that does basically the same thing, giving good results and following 
> recent RFC/IETF standards?
>   
Mail::DeliveryStatus::BounceParser maybe?


Reference to: mod_perl2 bug report [message #924360]

2005-09-26 Thread [EMAIL PROTECTED]
I'have the exact same error/problem in my environment as mentioned here:
http://www.issociate.de/board/post/244105/mod_perl2_bug_report.html

However, I'm a little unclear of the details of the fix due to my inexperience 
with FreeBSD.  I was hoping that someone could explain this fix in further 
detail.

Thanks in advance for any help/thoughts!

Ian T.




Re: Fwd: 103 Buffer FLush & modperl

2005-08-11 Thread [EMAIL PROTECTED]


Ray,

Did some tests with you code thought it may help.

I am on Apache 2.5.3 with mod_perl 2.1 and perl 5.8.5 and I have the 
same exact result with your code examples.


Other scripts I have will not work without $|=1; before printing. It's 
frustrating. I am also having to re-arrange my print functions in my 
scripts.


By the way, a lot of my scripts use CGI::Compress::Gzip, seems as 
though it is saving me from a lot of trouble that I didn't know about 
until running some scripts without it.



$|=1;
use DBI;
use Date::Calc qw(:all);
use CGI::Carp qw(fatalsToBrowser);
use CGI;
use Time::Local;
use CGI::Compress::Gzip;

my $now=time;
 my $then=$now+3600;
 my @vals=split(" ",scalar gmtime($then));
 my $expiration="expires= $vals[0], $vals[2]-$vals[1]-$vals[4] $vals[3] 
GMT";


my $path="/";
my $cookie="Set-Cookie: TEST=TestCookie; $expiration;  path=$path;
domain=127.0.0.1;n";

#$|=1;
print $cookie;

my $q = CGI::Compress::Gzip->new;
print $q->header;
# print "Cache-Control: no-cache\nContent-type: text/html\n\n";
#$|=1;

print "Started "."time".time()."\n";


That code runs fine on my system.

Also, using your Failing Script. If I don't set the buffer to flush at 
all, it works.


#$|=1;
print $cookie;

Tony

Ray Hunter wrote:


OK I've managed to get this down to the bare bones and be 100% reproduceable
two scripts are enclosed. The only difference is the buffer handling. Maybe you
could test this on your server to see if you get the same result.


1. Working script

use DBI;
use Date::Calc qw(:all);
use CGI::Carp qw(fatalsToBrowser);
use CGI;
use Time::Local;

my $now=time;
 my $then=$now+3600;
 my @vals=split(" ",scalar gmtime($then));
 my $expiration="expires= $vals[0], $vals[2]-$vals[1]-$vals[4] $vals[3] GMT";

my $path="/";
my $cookie="Set-Cookie: TEST=TestCookie; $expiration;  path=$path;
domain=127.0.0.1;n";

$|=0;
print $cookie;

print "Cache-Control: no-cachenContent-type: text/html;charset=ISO-8859-1nn";
$|=1;

print "Started "."time".time()."n";


2. Failing Script
use DBI;
use Date::Calc qw(:all);
use CGI::Carp qw(fatalsToBrowser);
use CGI;
use Time::Local;

my $now=time;
 my $then=$now+3600;
 my @vals=split(" ",scalar gmtime($then));
 my $expiration="expires= $vals[0], $vals[2]-$vals[1]-$vals[4] $vals[3] GMT";

my $path="/";
my $cookie="Set-Cookie: TEST=TestCookie; $expiration;  path=$path;
domain=127.0.0.1;n";

$|=1;
print $cookie;

print "Cache-Control: no-cachenContent-type: text/html;charset=ISO-8859-1nn";
#$|=1;

print "Started "."time".time()."n";





- Forwarded message from Ray Hunter <[EMAIL PROTECTED]> -
   Date: Thu, 11 Aug 2005 18:18:17 +0200
   From: Ray Hunter <[EMAIL PROTECTED]>
Reply-To: Ray Hunter <[EMAIL PROTECTED]>
Subject: 103 Buffer FLush & modperl
 To: [EMAIL PROTECTED]

on ASPN you wrote:
I have been getting some strange error on my system lately, so I took
the time to completely upgrade my server last night to see of I could
fix the problem with new updates. First thing this morning the errors
re-surfaced.


I had similar issues recently.

I installed some old scripts onto a new machine running Apache 2.0.54, modperl,
and PERL 5.8.7

These scripts had been running OK for a long time.

Then all of a sudden I kept getting complaints about the script not sending a
complete header

Looks like the problem was related to buffer flushing.

If we had

$|=1;
print $cookie;
print "Cache-Control: no-cachenContent-type: text/html;charset=ISO-8859-1nn";
print $HTML;

it fails with a 500 internal server error:Premature end of script headers: x.cgi


but

print $cookie;
print "Cache-Control: no-cachenContent-type: text/html;charset=ISO-8859-1nn";
$|=1;
print $HTML;

works just fine.

Seems there is something new/dodgy in the modperl buffer flushing mechanism that
is saying: hey our buffer is being flushed, but we have not sent the header yet
= script error.


Ray Hunter : Network Consultant
[EMAIL PROTECTED]
Globis Consulting BV, Dillenburgstraat 9a, 5652AM Eindhoven NL,
Registered at the KvK, Eindhoven, under number BV 17098279
tel: +31 620 363864

- End forwarded message -


Ray Hunter : Network Consultant
[EMAIL PROTECTED]
Globis Consulting BV, Dillenburgstraat 9a, 5652AM Eindhoven NL,
Registered at the KvK, Eindhoven, under number BV 17098279
tel: +31 620 363864
 






Re: mod_perl variables

2005-08-10 Thread [EMAIL PROTECTED]


Ok,

I went to google and did some more searching, this time just about the
my var.

I wrote this for an example of BAD use of $variable based on the
article I found.

I believe this demonstrates the coding in my website currently online.
lol, which is failing periodically.

---
my $i = 1;
my $variable;

if($i > 0)
{
  $variable = "Hello World!";
  print_it();
}

sub print_it()
{
  print "$variable";
  $variable=1;
}


{
  my $variable = "True";
  print "$variable";
}

print "$variable";
---

When I run it for the first time I get

Hello World!
True
1

Every time after that I get

1
True
Hello World!

Until the process dies and it runs in a new thread.

I believe this is the demonstration of my problem right? I'm pretty
sure I understand now.

Thanks for the tips mate! I'll post this as my fix in the forum.
Tony

[EMAIL PROTECTED] wrote:



Thank you for the response.

I am sure going to start using strict.

But one thing, why doesn't my example of NOT using strict, my, our, or 
local ever fail.


Shouldn't it confuse the $html var with the value of the $html var in 
the parent file.


Any ideas on what kind of an example will demonstrate to me the 
variable problem I'm having in a small test program. I'm trying to 
make a program that will show the effects of not using strict and 
declaring the $vars. I want to be able to get it to mess up, and then 
declare the $vars and see it work differently.


I am trying to do this because I do not understand how the $vars are 
treated differently when not declared.


Thanks a lot!
Tony

Boysenberry Payne wrote:


It might be that your variable aren't scoped properly.
Try:

use strict;

my $variable
or
our $variable
to keep the variable scoped to the packages they're in.


Boysenberry

This message contains information that is confidential
and proprietary to Humaniteque and / or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.

http://www.habitatlife.com
The World's Best Site Builder
On Aug 10, 2005, at 11:57 AM, [EMAIL PROTECTED] wrote:



Hello Everyone,

I have an issue that I am working on. I always ask questions that I 
have to a forum before writing the list just in case someone in the 
forum knows the answer. Usually I don't get any responses.


I started this thread,

http://www.tek-tips.com/viewthread.cfm?qid=1104388&page=1

Will someone take a look and see if my last question can be 
answered. The first two posts will provide context for my situation. 
My handle is perl21


I was following some advice from a fellow named Fish.

In my last post in that thread I ask how to make my mod_perl script 
mess up the variable assignment of $html without using my or local


Thank you,
Tony














Re: mod_perl variables

2005-08-10 Thread [EMAIL PROTECTED]


Thank you for the response.

I am sure going to start using strict.

But one thing, why doesn't my example of NOT using strict, my, our, or 
local ever fail.


Shouldn't it confuse the $html var with the value of the $html var in 
the parent file.


Any ideas on what kind of an example will demonstrate to me the 
variable problem I'm having in a small test program. I'm trying to make 
a program that will show the effects of not using strict and declaring 
the $vars. I want to be able to get it to mess up, and then declare the 
$vars and see it work differently.


I am trying to do this because I do not understand how the $vars are 
treated differently when not declared.


Thanks a lot!
Tony

Boysenberry Payne wrote:


It might be that your variable aren't scoped properly.
Try:

use strict;

my $variable
or
our $variable
to keep the variable scoped to the packages they're in.


Boysenberry

This message contains information that is confidential
and proprietary to Humaniteque and / or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.

http://www.habitatlife.com
The World's Best Site Builder
On Aug 10, 2005, at 11:57 AM, [EMAIL PROTECTED] wrote:



Hello Everyone,

I have an issue that I am working on. I always ask questions that I 
have to a forum before writing the list just in case someone in the 
forum knows the answer. Usually I don't get any responses.


I started this thread,

http://www.tek-tips.com/viewthread.cfm?qid=1104388&page=1

Will someone take a look and see if my last question can be answered. 
The first two posts will provide context for my situation. My handle 
is perl21


I was following some advice from a fellow named Fish.

In my last post in that thread I ask how to make my mod_perl script 
mess up the variable assignment of $html without using my or local


Thank you,
Tony










mod_perl variables

2005-08-10 Thread [EMAIL PROTECTED]


Hello Everyone,

I have an issue that I am working on. I always ask questions that I 
have to a forum before writing the list just in case someone in the 
forum knows the answer. Usually I don't get any responses.


I started this thread,

http://www.tek-tips.com/viewthread.cfm?qid=1104388&page=1

Will someone take a look and see if my last question can be answered. 
The first two posts will provide context for my situation. My handle is 
perl21


I was following some advice from a fellow named Fish.

In my last post in that thread I ask how to make my mod_perl script 
mess up the variable assignment of $html without using my or local


Thank you,
Tony



:Apache2 IO flush: (103) Software caused connection abort

2005-08-05 Thread [EMAIL PROTECTED]


I have been getting some strange error on my system lately, so I took 
the time to completely upgrade my server last night to see of I could 
fix the problem with new updates. First thing this morning the errors 
re-surfaced.


The error I'm getting is

:Apache2 IO flush: (103) Software caused connection abort at 
/pathtosite/admin.sd line 1136,


Admin.sd is mine and is a mod_perl file. It uses some basic modules

   use CGI qw/:standard/;
   use CGI::Cookie;
   use CGI::Compress::Gzip;
   use Time::Local;
   use MIME::Lite;
   use CGI::Lite;

I have added use Apache::DBI; to my startup.pl file so that mod_perl 
maintains the persistent connection to my database. I have a single 
database on the server. My website with all it's mod_perl files create 
approx. 20 connections to the MySql Server.


I currently have the following installed.

Apache/2.0.54 (Unix) mod_ssl/2.0.54 OpenSSL/0.9.7a PHP/5.0.4 
mod_perl/2.0.1 Perl/v5.8.7


My website also runs under an https connection. It's mandatory to 
connect to the site.


Now, about the error, at line 1136 of admin.sd is this line.

print $html;

And that's it. All the files creating the error say the problem line in 
the file is a line which prints the output of the cgi.


My cgi's do a lot of mysql queries, open a template, build a page, and 
output the page in a single print command. print $html;


My os is "Fedora Core release 2 (Tettnang)"

This is all the info I can think of to provide context for my errors.

If anyone has any ideas, I'll try them.

One more thing, the errors happen at a low ratio to successful 
requests. So much so, I've only gotten one of my testers to produce the 
error. I have never been able to do it. And the tester said nothing 
appeared wrong on the screen. No internal server error, just appears as 
a normal successful page request.


Everytime I see the errors come in, I call my clients and ask if 
they've seen any errors. I normally get a no to that question, and twice 
I've heard white pages being returned. Could have been many other things 
though. I think the errors on behind the scenes.


The only reason I know about them is because if this

   ErrorDocument 400 /error.osn
  ErrorDocument 401 /error.osn
  ErrorDocument 403 /error.osn
  ErrorDocument 404 /error.osn
  ErrorDocument 405 /error.osn
  ErrorDocument 408 /error.osn
  ErrorDocument 410 /error.osn
  ErrorDocument 411 /error.osn
  ErrorDocument 412 /error.osn
  ErrorDocument 413 /error.osn
  ErrorDocument 414 /error.osn
  ErrorDocument 415 /error.osn
  ErrorDocument 500 /error.osn
  ErrorDocument 501 /error.osn
  ErrorDocument 502 /error.osn
  ErrorDocument 503 /error.osn
  ErrorDocument 506 /error.osn

The osn file is a standard perl file which emails me the %ENV values. 
So I can quickly take care of the error.


The problem is, the :Apache2 IO flush: error is getting reported, but 
the user see's no error. error.osn should present an html page stating 
the error was reported and will be taken care of. Instead the page 
successfully renders and send me an error. Sending an email when no 
error is presented to the user also slows that request.


Can anyone help? If not, I'm going to open a bug report to Apache.

Thanks,
Tony



A Problem With Diplaying A Perl Generated Romanian Page In IE...

2005-02-23 Thread Farhad Ahani ([EMAIL PROTECTED])
Hi Everbody,

We have a client that has a page with romanian characters which IE
doesn't want to display. Serving static romanian pages works fine with
the server. But this one is served dynamically via a perl script.

In IE certain characters are displayed as empty boxes when the file is
served, but if the file is saved and viewed locally it displays fine.
Firefox displays perfectly. The character encoding on this has beeb set
to be the romanian one (ISO-8859-16) in the head section of the html,
(  ). For example here is a part of source code of
HTML page which is been served.

4. Urmând clinica, la ce
beneficii v-aţi aşteptat în urma implementǎrii EM ?
Vǎ rugǎm bifaţi tot ce se aplicǎ.


If you want to have a look at the page, here is the url and user/pass,

http://www.eeimplementors.org/index.pl?page=65

Username: [EMAIL PROTECTED]
Password: apache

If you've got any ideas, I'd appreciate them.

Thanks for your time,
Farhad


Re: Custom Form using PerlHandler with redirection

2005-02-11 Thread [EMAIL PROTECTED]
On Thu, Feb 10, 2005 at 07:38:44AM -0500, Geoffrey Young wrote:
> Pratik wrote:
> >>tried on success authentication ..
> >>$r->header_out('redirect.html');
> >>return REDIRECT;
> > Shouldn't you be doing :
> > 
> > use Apache::Constants qw(REDIRECT OK);
> > []
> > []
> > $r->header_out(Location => 'redirect.html');
> 
Hi,
  Yes, the top of the package's class usage was/is/has
  use Apache::Constant qw(:common REDIRECT);
to elaborate..
on successful authen the following returns to browser..
 
print <
http://host/mydir/redirect.html";>


Redirect 



Redirect test..

redirecting..

EOD
## 200
return OK;

The client does get the above print results in their friendly
neighborhood browser && then 5 secs later ..  the redirection 
occurs. However, the real physical file is never GET/gotten.
Even though the logs say.. well less the $REMOTE_IP and timestamps:)
aaa.bbb.ccc.ddd - - [.*] "POST /mydir HTTP/1.1" 200 -
aaa.bbb.ccc.ddd - - [.*] "GET /mydir/redirect.html HTTP/1.1" 200 507
Instead the browser gets the original html form.. with the desired
fully qualified URL in the URL window..

Now we do the RFC2616 dance..
GET /mydir/redirect.html HTTP/1.1
Host: myhost


HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: text/html

1f4
Then the EOD print() block as indicated above..
OK;-? so our request loop loops back to the initial form:-* 
So the thought was self .. maybe we need to return immediately
if we have run this handler already.. so short circuit the 
handler cold.. worth a try. Still no dice..
return OK unless $r->is_initial_req; 

Howto  transfer control away from the handler() to 
our final destination redirected url? 
 
Much appreciate all the input.

Best Regards,
[EMAIL PROTECTED]
 


Custom Form using PerlHandler with redirection

2005-02-10 Thread [EMAIL PROTECTED]
Hello,
I am not sure how to workaround this issue. Was hoping
someone could hit me with any suggestion:) I am using a custom
form instead of the usual Basic or Digest popup. Authentication
works fine however redirection is not working. 
tried on a successful authentication..
redirection a old fashioned way..
print EOD;
[...]
 
[...]
EOD
return OK;
tried on success authentication ..
$r->header_out('redirect.html');
return REDIRECT;

In the above snippits I get the same result. In the top of the
browser's URL is the target file /mydir/redirect.html 
But the actual_file named redirect.html is never redirected to..
(never sent to browser..) This file definitely exists in the
directory. The location only has two lines currently..
SetHandler perl-script
PerlHandler MyModule

The ideal would be to do it in a way simular to the http-equiv.
Where a page is displayed and then redirection to the physical
resource occurs. Hope this is enough for suggestions/pointers. 

TIA
Best Regards,
[EMAIL PROTECTED]



Re: apxs:Error: Invalid query string `APR_VERSION'

2005-01-30 Thread [EMAIL PROTECTED]
I suggest you download apreq's current trunk and
try that instead.  Your problem may be that your
debian apache2 binary isn't named "httpd".  Trunk
should get the true name from apxs now, but it's
If I'm successful I'll post it on the appropriate list. :)
possible that still doesn't work.  If not, please
followup on the apreq-dev@ list.  Thanks.
I'll do that. Thanks for the hint.
Didn't realise there was a apreq list.
--manfred


--
de.glassdoc.org
en.glassdoc.org


apxs:Error: Invalid query string `APR_VERSION'

2005-01-30 Thread [EMAIL PROTECTED]
I tried to install libapreq2-2.40-dev on a debian sarge like so
./configure --with-apache2-apxs=/usr/bin/apxs2  
I get the following 
apxs:Error: Invalid query string `APR_VERSION'. 
build/version_check.pl failed: no version_string found in ''.   
configure: error: Bad apache2 version   
Everything else is just plain debian packages.
Somebody knows a solution?
--manfred
--
de.glassdoc.org
en.glassdoc.org


Class::DBI, mod_perl1, multiple databases, and database handles

2004-12-15 Thread [EMAIL PROTECTED]

sent to [EMAIL PROTECTED] and [EMAIL PROTECTED]



I use Class::DBI to connect to several databases from within mod_perl. 
Occasionally a request will hang and there will be a slew of "attempt to free 
unreferenced scalar" messages in the error_log. I am assuming this is because 
of multiple processes connecting to multiple databases at the same time via a 
single database handle.



I found this thread where Perrin H. shows how to overload db_Main:



http://aspn.activestate.com/ASPN/Mail/Message/modperl/2203391



This shows how to only connect to a single database, so I modified it a bit so 
the subclass sets its connection info before the call to connect.



Also, I use Class::DBI::mysql to facilitate setting up the object methods for 
me.



I think that part works properly, but the server will not start. I think what 
is blowing up is when Class::DBI::mysql goes to load the table info. Here is 
the error I get:



configuring DB interface at /usr/local/app/Application/Data.pm line 13.

in my db_Main at /usr/local/app/Application/DBI.pm line 9.

Syntax error on line 1230 of /usr/local/app/apache/conf/httpd.conf:

Can't locate object method "fetch_hash" via package "DBI::st" at 
/usr/lib/perl5/site_perl/5.8.0/Class/DBI/mysql.pm line 65.

Compilation failed in require at /usr/local/app/Application/Data.pm line 26.

BEGIN failed--compilation aborted at /usr/local/app/Application/Data.pm line 26.

Compilation failed in require at /usr/local/app/Application.pm line 15.

BEGIN failed--compilation aborted at /usr/local/app/Application.pm line 15.

Compilation failed in require at (eval 14) line 3.



./apache/bin/apachectl start: httpd could not be started



Here is the inheratance chain:



Class::DBI

 + Class::DBI::mysql

   + Application::DBI

 + Application::Data

   + Application::Data::Table1

   + My::Database1::Table2

   + ...

 + My::Database2

   + My::Database2::Table1

   + My::Database2::Table2

   + ...

 + ...







You can see the definition of Application::DBI at:



http://waveright.homeip.net/~trwww/code/ApplicationDBIpm.txt



The definition of Application::Data is at:



http://waveright.homeip.net/~trwww/code/ApplicationData.txt



and the code for Application::Data::Person, the module that is being used when 
the fatal error is generated can be seen here:



http://waveright.homeip.net/~trwww/code/ApplicationDataPerson.txt



Thank you for reading,



Todd W.







___
Join Excite! - http://www.excite.com
The most personalized portal on the Web!

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Hosting provider disallows mod_perl - "memory hog / unstable"

2004-09-01 Thread [EMAIL PROTECTED]
Hi all,
   Thank you all for your responses, I am getting a better picture now.
 
I guess my hosting provider's concern is that they have a lot of clients who have infrequently running scripts. By design, mod_perl keeps things in memory for longer so that subsequent calls do not incur a reload of the environment. By restricting use to CGI they get such infrequently used environments unloaded ASAP.
 
Is there a way to configure mod_perl to aggressively unload perl instantiations such that it holds onto data for the minimum timespan?
 
Thanks,
   Martin.
Jeff Norman <[EMAIL PROTECTED]> wrote:
On Mon, 2004-08-30 at 14:12, Perrin Harkins wrote:> The truth is that mod_perl uses the same amount of memory that Perl CGI> scripts use. The difference is that CGI scripts exit as soon as they> finish. Serving 10 simultaneous requests with CGI requires the same> amount of memory as it does with mod_perl (with a small amount extra for> the apache interface modules). You can do things under mod_perl like> load tons of stuff into a global variable, but that would be the> programmer's fault, not mod_perl's.That's not entirely true. It is in fact the case that mod_perl's*upper-bound* on memeroy usage is similar to the equivalent scriptrunnung as a cgi.A well designed mod_perl application loads as many shared libraries aspossible before Apache forks off the child processes. This takesadvantage of the
 standard "copy-on-write" behavior of the fork() systemcall; meaning that only the portions of the process memory that differfrom the parent will actually take up extra memory, the rest is sharedwith the parent until one of them tries to write to that memory, atwhich time it is copied before the change is made, effectively"unsharing" that chunck of memory.Unfortunately, it's not a perfect world, and the Perl interpreter isn'tperfect either: it mixes code and data segments together throughout theprocess address space. This has the effect that as the code runs andvariables/structures are changed, some of the surrounding code segmentsin the memory space are swept up into the memory chunks during acopy-on-write, thereby slowly duplicating the memory between processes(where the code would ideally be indefinitely shared).Fortunately, Apache has a built in defence against this memory creep:the MaxRequestsPerChild directive forces a
 child process to die andrespawn after a certain number requests have been served, therebyforcing the child process to "start fresh" with the maximum amount ofshared memory.In the long run, this means that if you pre-load as many sharedlibraries as possible and tweak the MaxRequestsPerChild directive,you'll probably see significantly less memory usage on average. Not tomention all the other speed and efficiency increases that you're alreadymod_perl provides.j--[EMAIL PROTECTED] (please don't reply to @yahoo)Post your free ad now! Yahoo! Canada Personals

Re: mod_perl presence at OSCON (and other CONs) is at danger

2004-06-09 Thread [EMAIL PROTECTED]
Hi,
  FWIW IMO  Speed, Flexibility, comprehension, 
Google_sex_appeal:) I find modperl cool.
It would be useful IMO to promote by articles/board
that contained everything from simple to complex
usages for modperl catagorized by stage(s) used.
(That way people can hit the ground running.)
This might prod others to start to comprehend the
vast spectrum of ways it is best of breed. I have
nothing against PHP and can see its uses. 
(It has gone a long ways from Personal Home Pages).
This might be usefully presented in a CPANish way
on a central website. 3 out of 4 are already pretty
apparent. Full comprehension seems to be the issue.
I guess what I am trying to say is that perhaps 
it simply goes over many people's heads. 

Best Regards,
[EMAIL PROTECTED]

-- 
/*  Security is a work in progress - dreamwvr */
#   48 69 65 72 6F 70 68 61 6E 74 32
# Note: To begin Journey type man afterboot,man help,man hier[.]  
# 66 6F 72 20 48 69 72 65   0001
// "Who's Afraid of Schrodinger's Cat?" /var/(.)?mail/me \?  ;-]

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



OT[maybe] IPC or broke:)

2004-05-03 Thread [EMAIL PROTECTED]
Hi,
  I have a handler that currently simply authenticates 
a user. Then once they are authenticated they are able to 
run a specific program with diff args living on the server. 

The thing is the program can take from 10 to like 60 seconds
to complete results. 
This means that:
page never really loads since it is waiting for 
results that take far too long to get. Just looking for 
other opinions on handling this cleanly. 

TIA,
[EMAIL PROTECTED]

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: internal_redirect to randomly named filename

2004-02-10 Thread [EMAIL PROTECTED]
On Tue, Feb 03, 2004 at 11:09:31AM -0500, Geoffrey Young wrote:
> I don't see why you need to use either with internal_redirect() - just pass
> it the URI and let Apache handle it.  you would use a subrequest (initiated
> from eather of the lookup functions) along with $sub->run() if you wanted to
> send the contents of the subrequest along.
(For the archives since It might be useful info.. them again maybe not.:-)
Well, I was hoping this was the case however this is what happens..
 [...]
 $sub = $r->lookup_file("randfile.html"); 
  $filename = $sub->filename();
[...]
$sub->internal_redirect($filename);
  $sub->run() and return 'OK';

  if($sub->run ne 'OK') {
   
$sub->log_error("Error running subrequest!");

  }
Just tried this and I get the usual file_not_found page..
Not Found

The requested URL /var/www/htdocs/test/randfile.html was not found on this server.
FYI:
If one uses the internal_redir* with lookup_file() the above err is what occurs.
If one uses the internal_redir* with lookup_uri() and the file exists
one does get the page. So me thinks I am missing something obvious. Is it?
thought train was that subrequests make Apache reload the page as if it was 
a completely new request. That way redirection would occur simularly to
META tags redirection when set to "0" seconds. Well back to it. 

 Best Regards,
[EMAIL PROTECTED]



-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



internal_redirect to randomly named filename

2004-02-02 Thread [EMAIL PROTECTED]
Hi All,
  Since lookup_uri() is only to be used when the actual
URI physically exists. Having said that how does not tell 
it to pretend that a randomly generated virtual file exists?
Is that what lookup_filename() is for? I am wanting to do a 
internal_redirect() to a virtual file whose name is always
changing. This way the Location is never the same twice.
Any suggestions appreciated.

TIA
Best Regards,
[EMAIL PROTECTED] 
 
-- 
/*  Security is a work in progress - dreamwvr */
#   48 69 65 72 6F 70 68 61 6E 74 32
# Note: To begin Journey type man afterboot,man help,man hier[.]  
# 66 6F 72 20 48 69 72 65   0001
// "Who's Afraid of Schrodinger's Cat?" /var/(.)?mail/me \?  ;-]

-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: mod_perl and CGI.pm in chroot enviroment.

2004-01-26 Thread [EMAIL PROTECTED]
On Mon, Jan 26, 2004 at 04:39:28PM +, Fco. Valladolid wrote:
helo, 
> I'am trying do a form hanlder with CGI.pm and Apache::Registry in chroot enviroment, 
> OpenBSD 3.4 
> OS.
Just to confirm in March last year I posted a diff which if you 
unravel explains modperl in a chroot..
http://www.monkey.org/openbsd/archive/tech/0303/msg00129.html
> My question is: it is necessary put CGI.PM in ServerRoot for chroot enviroment. ?
ServerRoot in chroot() means that CGI.pm must exist where the httpd
can see it. Since if for example 
/var/www is your ServerRoot then under chroot() the 
/var/www becomes as far as apache is concerned literally /
Therefore this means your modules/packages/classes need 
to live under 
/var/www/same/path/as/non-root/*.pm
(for clarity anyhow. That is how I have done it on occasion anyhow.) 
> There are other way to do forms in mod_perl ?..

TMTOWTDI IMHO also FYI google defines daemon as server:)
Sorry totally not defined in this QUERY;-)
## lots of mod_perl stuff above this HTML segment..
$r->content_type('text/html');  
$r->send_http_header;

return 'OK' if $r->header_only;
 
$r->print(<
  
  read() AND Set-Cookies: to/from $username\'s browser.
  
  
[..]
YOUR_CLOSING_HTML_TAGS

HTML

[...]
HIH
Best Regards,
[EMAIL PROTECTED]

-- 
/*  Security is a work in progress - dreamwvr */
#   48 69 65 72 6F 70 68 61 6E 74 32
# Note: To begin Journey type man afterboot,man help,man hier[.]  
# 66 6F 72 20 48 69 72 65   0001
// "Who's Afraid of Schrodinger's Cat?" /var/(.)?mail/me \?  ;-]

-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Re: Bandwidth limiting module: Apache::Quota

2004-01-17 Thread [EMAIL PROTECTED]
Hi,
  Have you looked at?

http://www.snert.com/Software/mod_throttle/

HIH
Best Regards,
[EMAIL PROTECTED]

-- 
/*  Security is a work in progress - dreamwvr */
#   48 69 65 72 6F 70 68 61 6E 74 32
# Note: To begin Journey type man afterboot,man help,man hier[.]  
# 66 6F 72 20 48 69 72 65   0001
// "Who's Afraid of Schrodinger's Cat?" /var/(.)?mail/me \?  ;-]

-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html