Re: Rose::DB and Apache::DBI

2007-10-23 Thread Arshavir Grigorian
On 10/23/07, Perrin Harkins <[EMAIL PROTECTED]> wrote: > On 10/23/07, John Siracusa <[EMAIL PROTECTED]> wrote: > > I've had some bad experiences with passing database handles around in > > pnotes. > > It should be safe to do that. One thing to remember is that pnotes > takes an alias to what you p

Rose::DB and Apache::DBI

2007-10-23 Thread Arshavir Grigorian
Hi, I just started using Rose::DB and have been experiencing certain database connectivity issues. DBD::Pg::st execute failed: ERROR: prepared statement "dbdpg_1" already exists My set up is as follows: The box runs 2 Apache servers - one on port 80 and the other on port 8080. The former uses

FYI

2007-10-22 Thread Arshavir Grigorian
Not sure if people already know about this, but running any search off of perl.apache.org gives a 500.

Re: how to use Apache::DBI

2007-07-30 Thread Arshavir Grigorian
connect_on_init() creates the database connection when the Apache child process starts (vs when it serves the first request). This ensures that the first request gets to use an existing connection vs having to wait for a connection to be made. Also to benefit from Apache::DBI functionality your sc

Re: Quick Question

2007-05-30 Thread Arshavir Grigorian
Try $r->get_server_name(); Good luck. On 5/30/07, Alexander Burrows <[EMAIL PROTECTED]> wrote: Ok I'm building a site that will have multiple domains pointing at it and will pull a different template based on the domain. The problem I'm having is I can't seem to remember for the life of me

Re: Using Persistent Data Structures between a webprogram(CGI) and Perl program

2007-04-22 Thread Arshavir Grigorian
What's the error message in your webserver logs? On 4/22/07, Deepak Mallya <[EMAIL PROTECTED]> wrote: Hi, Is there a way in which CGI programs could use the Data structures created by another perl program.I tried using Storable and it works well between two perl programs which are run on

Re: Using Persistent Data Structures in Perl

2007-04-21 Thread Arshavir Grigorian
Take a look at Storable - http://search.cpan.org/~ams/Storable-2.16/Storable.pm On 4/21/07, Deepak Mallya <[EMAIL PROTECTED]> wrote: Hi all, Can anyone tell me how to use Persistent Data structures in Perl.For Eg:- I have a Hash data structure built in one program and I want it to be in

Re: mod_perl.

2007-04-20 Thread Arshavir Grigorian
Asim, Apache is the name of the web server. There are 2 main versions - Apache 1.x (1.3) and Apache 2.x. Obviously, the 2.x version is newer and has more features, a cleaner configuration interface, etc. The source code for the Apache webserver is available from the http://httpd.apache.org/ websi

Class::DBI and M:M

2007-03-16 Thread Arshavir Grigorian
Hi, I have a table "contact" and a table "link" which has 2 foreign keys to "contact" - contact_id_1 and contact_id_2. It is essentially a many-to-many relationship but with only 2 tables. Can Class::DBI handle this and if so, how should I set up my classes? Thanks. Arsh

Re: different default oracle date formats under mod_perl and scripts

2006-08-25 Thread Arshavir Grigorian
On 8/25/06, Jay Buffington <[EMAIL PROTECTED]> wrote: Hi, I'm using DBI with DBD::Oracle. I've noticed that under scripts the default date format is mm/dd/ HH24:MI:SS, where as under mod_perl the default returned date format is -MM-DD. That is, if I select a date column from the databa

Re: dynamic loading

2006-08-23 Thread Arshavir Grigorian
Thanks for all the posts.

dynamic loading

2006-08-21 Thread Arshavir Grigorian
Hi, I am wondering if anyone has experience with a framework for dynamically loading certain modules into an application and executing certain code based on whether a certain module is loaded (available or not). By "dynamically", I do not mean loading run-time, only being able to safely exclude c

Re: mod_perl comforts

2006-08-17 Thread Arshavir Grigorian
    The same thing happens with Tamplate object. Most part of my scriptshave to generate output over a Template Toolkit. So, may I declare the Template object in the only place, and then use it into response handlers ?You can create a Template object in your top handler, store it in  the request's

web-based file manager

2006-08-16 Thread Arshavir Grigorian
Hi, Could someone recommend a web-based file manager (or better yet, just library) that works well under mod_perl and hopefully allows for customization? Thanks. Arshavir

Re: Dumping / Profiling Memory ?

2006-08-15 Thread Arshavir Grigorian
On 8/15/06, Perrin Harkins <[EMAIL PROTECTED]> wrote: On Tue, 2006-08-15 at 12:49 -0700, Arshavir Grigorian wrote: > What would be a good tool for finding where this type of a problem > problem is? Memory growth? You basically comment out code until it stops happening. > Al

Re: Dumping / Profiling Memory ?

2006-08-15 Thread Arshavir Grigorian
On 8/15/06, Perrin Harkins <[EMAIL PROTECTED]> wrote: On Tue, 2006-08-15 at 15:24 -0400, Jonathan Vanasco wrote: > Does anyone know if there's something in httpd / mod_perl that will > let me dump and analyze the memory in the child (and possibly the > parent)? Linux::Smaps, if you're on Linux.

working release

2006-08-05 Thread Arshavir Grigorian
Hi, Considering that I can't use the current stable version of mod_perl and libapreq, I am wondering if anyone could point me to an older (not 1.x though), "really" stable, bullet proof release that I could use in the meantime (while the smart people are fixing the current release). Many thanks

Re: libapreq test issues

2006-08-05 Thread Arshavir Grigorian
Looks like some tests are failing to mod_perl itself. Obviously, the environment is the same as before and I am attaching the stderr. Any help appreciated. [warning] setting ulimit to allow core files ulimit -c unlimited; /usr/bin/perl /usr/local/apache2/build/mod_perl-2.0.2/t/TEST -verbose 't/ap

libapreq test issues

2006-08-04 Thread Arshavir Grigorian
Hi, I was trying to install the latest stable libapreq and got several errors on the tests. I also downloaded the latest snapshot, but the errors didn't go away. I am sending the error logs and stderr output, as well as some pertinent info about my environment. I'd appreciate any help. Arsh ST

Re: CGI::Carp

2005-07-26 Thread Arshavir Grigorian
Arshavir Grigorian wrote: Hello list, Not sure when this started happening, but at some point calling CGI::Carp::carp() started resulting in deep recursion within CGI::Carp::warn() eventually killing the process. I think the recursion is caused by the following: $main::SIG{__WARN__}=\&

CGI::Carp

2005-07-21 Thread Arshavir Grigorian
Hello list, Not sure when this started happening, but at some point calling CGI::Carp::carp() started resulting in deep recursion within CGI::Carp::warn() eventually killing the process. I think the recursion is caused by the following: $main::SIG{__WARN__}=\&CGI::Carp::warn; sub realwarn {

Re: BerkeleyDB as a cache backend

2005-07-08 Thread Arshavir Grigorian
Thanks for all the comments. I ended up using an RDBMS (Postgres) with Storable and it's working very well. -- Arshavir Grigorian Systems Administrator/Engineer

BerkeleyDB as a cache backend

2005-06-24 Thread Arshavir Grigorian
be better off just using an RDBMS table (2 columns - key,value) as the cache backend to avoid these types of issues. Thanks for any ideas, pointers. -- Arshavir Grigorian Systems Administrator/Engineer

Re: progress reporting

2005-06-14 Thread Arshavir Grigorian
$r->headers_out->set(Location => '/status/'); return Apache2::Const::REDIRECT; } else { open STDIN, "/dev/null"; + $r->pnotes( 'dbh' => Utils->connect() ); my $object = Class->new(); $object->generate_resultset(); return A

Re: progress reporting

2005-06-14 Thread Arshavir Grigorian
Perrin Harkins wrote: On Monday 23 May 2005 3:21 pm, Arshavir Grigorian wrote: I have some code that takes a long time to execute. What I would like to do is to display several real time status messages on the user's browser as the work is being done (Started doing A ... Done, Started do

Re: using stacked_handlers()

2005-06-14 Thread Arshavir Grigorian
Geoffrey Young wrote: Arshavir Grigorian wrote: Hello list, I am trying to use the stacked handlers functionality but cannot seem to get it working. What I have is the following 2 modules: package Test; use strict; sub handler { my $r = shift; $r->push_handlers(PerlResponseHand

using stacked_handlers()

2005-06-14 Thread Arshavir Grigorian
uest to http://localhost/test/ would eventually be passed to Test1 and I would see the "we are here" message, but all I get is an empty screen. Does anyone see any problems with this setup? TIA. -- Arshavir Grigorian Systems Administrator/Engineer

Re: Apache Error Log Format

2005-06-01 Thread Arshavir Grigorian
ce! Maybe it has to do with this: http://perl.apache.org/docs/2.0/user/install/install.html#Apache -DAP_UNSAFE_ERROR_LOG_UNESCAPED -- Arshavir Grigorian Systems Administrator/Engineer

progress reporting

2005-05-23 Thread Arshavir Grigorian
e the status messages and display some results. I am thinking that I need is something similar to internal redirects, but I am not sure what. Thanks for any ideas/pointers. -- Arshavir Grigorian Systems Administrator/Engineer

Re: Culture shock

2005-04-18 Thread Arshavir Grigorian
ectly but I don't know what. Can anyone advice me? Thanx. Dp. -- Arshavir Grigorian Systems Administrator/Engineer M-CAM, Inc.

Re: securing web form interaction

2005-02-16 Thread Arshavir Grigorian
ben syverson wrote: On Feb 15, 2005, at 12:02 PM, Jonathan Vanasco wrote: preemptive defense of potential SQL injection attacks Check out mod_security -- it has this built-in. (There's an intro here:

modperl and qr

2005-01-27 Thread Arshavir Grigorian
Hello list, The qr example in the guide does not work as expected. Using the /o in the foreach loop matches based on the first value of $re and never changes even when $re is recompiled. The /o modifier should be removed since that's exactly what we are trying to avoid. http://perl.apache.org/d

Re: site layout

2004-12-15 Thread Arshavir Grigorian
Michael Peters wrote: Arshavir Grigorian wrote: Hi, I have a module called Application that pretty much acts as a dispatcher and handles the root URI of my application. The problem is the images that I would like to put under the same URI path, but can't do because I don't know how to

site layout

2004-12-15 Thread Arshavir Grigorian
Hi, I have a module called Application that pretty much acts as a dispatcher and handles the root URI of my application. The problem is the images that I would like to put under the same URI path, but can't do because I don't know how to return the request back to Apache from Application when th

Re: pnotes

2004-12-08 Thread Arshavir Grigorian
Perrin Harkins wrote: Arshavir Grigorian wrote: I have module called Application which handles all the requests to the site (except for images, etc) and then dispatches the request to a different module based on the $r->path_info(). Apache::Dispatch could do this for you if you like. You co

Re: formatting issue

2004-12-07 Thread Arshavir Grigorian
Stas Bekman wrote: Arshavir Grigorian wrote: I am using mp2 (1.99_17) and have the following line in my Exception class to get a complete stacktrace: $handle->log_error("$self: ".Carp::longmess ("$message")); The problem is that in my logs all of the control chars (\n,

formatting issue

2004-12-07 Thread Arshavir Grigorian
Hello list, I am using mp2 (1.99_17) and have the following line in my Exception class to get a complete stacktrace: if (Apache->can('request')) { $handle = Apache->request; } else { $handle = Apache->server; } $handle->log_error("$self: ".Carp::longmess ("$message")); The problem is that

Re: pnotes

2004-11-24 Thread Arshavir Grigorian
Stas Bekman wrote: Arshavir Grigorian wrote: Hello list, I have module called Application which handles all the requests to the site (except for images, etc) and then dispatches the request to a different module based on the $r->path_info(). I am thinking about creating a Template Tool

pnotes

2004-11-24 Thread Arshavir Grigorian
Hello list, I have module called Application which handles all the requests to the site (except for images, etc) and then dispatches the request to a different module based on the $r->path_info(). I am thinking about creating a Template Toolkit object and a DBI handle in Application::handler()

Internal Server Error on perl.apache.org

2004-11-17 Thread Arshavir Grigorian
Hello list, I just tried searching for 'path_info' in the 2.0 docs and got an internal server error(500). http://perl.apache.org/search/swish.cgi?query=path_info&sbm=SecI&submit=search Hope it's easy to fix. Best, Arshavir -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://pe

Re: logging at startup

2004-11-15 Thread Arshavir Grigorian
Perrin Harkins wrote: On Wed, 2004-11-10 at 16:09, Arshavir Grigorian wrote: How can I write my code to know whether it is in a request and only if so, output the standard error page. You should be able to use $Apache::Server::Starting and $Apache::Server::ReStarting for this. There may

Re: Apache::Cookie

2004-11-12 Thread Arshavir Grigorian
Geoffrey Young wrote: Thanks for the feedback. I guess I am wondering who I would need to talk to in order to get this fixed. Joe is the man :) Just to understand, why does it need to use the err_headers_out instead of headers_out? There does not seem to be any errors. Am I misinterpreting

Re: logging at startup

2004-11-12 Thread Arshavir Grigorian
Tom Schindl wrote: Are you talking about mp1? This would be a possibility but with a significant performance hit. You could turn it the other wayround because you know when your server is starting: http://perl.apache.org/docs/1.0/api/Apache.html#Global_Variables Because I'm at it where do I find

Re: logging at startup

2004-11-12 Thread Arshavir Grigorian
Perrin Harkins wrote: On Wed, 2004-11-10 at 16:09, Arshavir Grigorian wrote: How can I write my code to know whether it is in a request and only if so, output the standard error page. You should be able to use $Apache::Server::Starting and $Apache::Server::ReStarting for this. There may

Re: Apache::Cookie

2004-11-11 Thread Arshavir Grigorian
Geoffrey Young wrote: libapreq2 is currently using $r->headers_out instead of $r->err_headers_out, which is why you're not seeing the cookie on your redirect response. I think the consensus is that this is a bug in libapreq2-2.04, but I haven't seen any other apreq committers weigh in on the subje

Re: Apache::Cookie->new/bake broken - mod_perl 2

2004-11-10 Thread Arshavir Grigorian
I actually reported the same problem yesterday, but wasn't sure whether I was doing something wrong. Is this the appropriate list for discussing liapreq2 issues? Arshavir Dan Sully wrote: I'm running into an interesting problem, using Apache::SessionManager. My first request to the webpage succe

Re: logging at startup

2004-11-10 Thread Arshavir Grigorian
Perrin Harkins wrote: On Wed, 2004-11-10 at 10:11, Arshavir Grigorian wrote: The problem is that when the module is loaded there is no request object and I am not sure how I can use log_error without it. Are you in a request at the time when the error happens? If so, you can get a

logging at startup

2004-11-10 Thread Arshavir Grigorian
Hi, I have a package hash that I am trying to tie to a db table when the package is loaded. I also have an error handling routine that logs the error using Apache::Log->log_error() routine then displays a standard error page to the user. The problem is that when the module is loaded there is no

Apache::Cookie

2004-11-09 Thread Arshavir Grigorian
Hi, I am using Apache::Cookie (libapreq2-2.04-dev) to generate cookies. However, for some reason, the bake() method does not work. # WORKS my $cookie = $ticket->cookie()->as_string(); $r->err_headers_out->add('Set-Cookie' => $cookie); # DOES NOT WORK $ticket->cookie()->bake();

Re:

2004-11-08 Thread Arshavir Grigorian
Perrin Harkins wrote: On Mon, 2004-11-08 at 10:45, Arshavir Grigorian wrote: Is there a way to have /path/login go directly to its handler (Login.pm) and just /path to Application.pm? Make sure you define the most specific one, i.e. /path/login/, last. - Perrin Thanks, Perrin

modperl@perl.apache.org

2004-11-08 Thread Arshavir Grigorian
Hi, I have 2 modules Login.pm and Application.pm configured to handle 2 URLs /path/login and /path respectively through the directive. However, for some reason going to /path/login first invokes Application::handler, which in turn redirects the browser to /path/login (because a cookie is not s

Re: Coredump running t/filter/in_error on Solaris 2.6

2004-09-09 Thread Arshavir Grigorian
Stas Bekman wrote: Stas Bekman wrote: Chris Hughes wrote: Basically the test seems to be working (ie. 500 expected and received), but handling the 500 error kills apache (seems to be a simple dereference of a null pointer; probably returned from a call of strerror(500)). Note that on Solaris st

Re: [Fwd: [mp2] coredump strerror code on Solaris 8

2004-09-09 Thread Arshavir Grigorian
Stas Bekman wrote: Joe Orton wrote: On Wed, Sep 08, 2004 at 06:18:49PM -0400, Stas Bekman wrote: But normally apr_strerror(500, buf, 256) returns "not specified error" string or something like that, which is cool. Why does it segfault is what I can't understand. Notice that it doesn't happen on

Re: [mp2] coredump in t/filter/in_error on Solaris 8

2004-09-08 Thread Arshavir Grigorian
Stas Bekman wrote: Arshavir Grigorian wrote: Stas Bekman wrote: Arshavir Grigorian wrote: -8<-- Start Bug Report 8<-- 1. Problem Description: make test fails on one of the tests - t/filter/in_error...malformed response at /usr

Re: [mp2] coredump in t/filter/in_error on Solaris 8

2004-09-07 Thread Arshavir Grigorian
Stas Bekman wrote: Arshavir Grigorian wrote: -8<-- Start Bug Report 8<-- 1. Problem Description: make test fails on one of the tests - t/filter/in_error...malformed response at /usr/local/apache2/build/mod_perl-1.99_16/blib/lib/

[mp2] coredump in t/filter/in_error on Solaris 8

2004-09-01 Thread Arshavir Grigorian
-8<-- Start Bug Report 8<-- 1. Problem Description: make test fails on one of the tests - t/filter/in_error...malformed response at /usr/local/apache2/build/mod_perl-1.99_16/blib/lib/Apache/TestClient.pm line 102. t/filter/in_error..