two common questions

2008-01-07 Thread lists user
1. Do you run common web program under modperl handlers? or just run
them under Registry?
For me I mostly wrote web scripts with CGI methods like using CGI.pm
and CGI::Session, and run them under Modperl::Registry.
I don't know if there's a site which is fully run by pure modperl
handlers, not the registry scripts.

2. I heard that Apache::DBI will break the entire database sometime,
is it true? When will we use or not use Apache::DBI?

Thanks!


apache responce time for each request

2007-11-22 Thread lists user
hello members,

We run a video playing site. For each movie, we want to record its played time.
( for example, client A watched movie A for 30 minutes, client B
watched movie B for 2 hours).
So I think for each requested movie, it's maybe possible to get
apache's responce time by modperl.
But how can I do it from the start? please guide me.

Thanks always!

--jen


Re: apache responce time for each request

2007-11-22 Thread lists user
On 11/22/07, Ben van Staveren [EMAIL PROTECTED] wrote:
 You can time how long it takes for someone to download the movie,
 which isn't equal to the time it takes them to view it.

Yes I just need the download time.How can I get it? use which handler
and which function? thank you again.


modperl blog system

2007-11-14 Thread lists user
is there a free weblog system which is developed by modperl, or common perl CGI?
my company's site want to add a blog entry,surely i can write one in
few days,but don't like to re-make wheels.
thanks guys.


strange errors on ModPerl::Registry

2007-09-28 Thread lists user
I have two sections in httpd.conf,one for modperl handler,one for
registry scripts.

Location /iplook
  SetHandler modperl
  PerlResponseHandler IP::Lookup
/Location

Alias /perl/ /home/httpd/test/
Location /perl
SetHandler perl-script
PerlResponseHandler ModPerl::Registry
Options +ExecCGI
PerlOptions ParseHeaders
/Location


The first section works pretty well.The second configure for registry
can't work.
I put a test script under /home/httpd/test,its contest is:

use strict;
use CGI;

my $q = $ENV{MOD_PERL} ? CGI-new(+shift) : CGI-new;

print $q-header;
print hello world;

Then I request this test.cgi from browser,

http://example.com/perl/test.cgi

It can't work.I got the error message in error_log:

[error] Can't locate Apache/Response.pm in @INC (@INC contains: ... at
/usr/lib/perl5/5.8.5/CGI.pm line 186.\nCompilation failed in require
at /opt/httpd2059/test/test.cgi line 3.\nBEGIN failed--compilation
aborted at /opt/httpd2059/test/test.cgi line 3.\n


Please help.thanks in advance.


basic mp questions

2007-09-26 Thread lists user
Hello,

I'm reading the documents about modperl and C API for Apache.I have
several questions again,thanks for any helps in advance.

1) what're the advantage of C modules than modperl modules?and what're
the advantage of modperl modules than C's?

2) Where in startup.pl,I wrote,

#startup.pl
use MIME::Base64 ();

then in Mymodule.pm,I wrote,

#Mymodule.pm
use MIME::Base64 qw/encode_base64/;

--
from the documents I know that in Mymodule MIME::Base64 won't be
loaded again since it's already loaded by startup.pl (modperl checks
the %INC and know it's already there).
But,why the function of encode_base64() can be successfully loaded
since the loading action doesn't happen in Mymodule?As you see,in
startup.pl I don't load that function encode_base64().

Thanks!


get user's request data

2007-09-24 Thread lists user
Rather than use Apache2::Request to get user's request data,

$req = Apache2::Request-new($r);
@foo = $req-param(foo);


how can I use pure mp2 methods to do it? thanks.


why need apache::request?

2007-09-20 Thread lists user
I have another question,since we have modperl's full features,why we
need Apache::Request yet?
Thanks.


Re: why need apache::request?

2007-09-20 Thread lists user
2007/9/20, Philippe M. Chiasson [EMAIL PROTECTED]:
 lists user wrote:
  I have another question,since we have modperl's full features,

 Depends on how you define full features ;-)

  why we
  need Apache::Request yet?

 It's called Apache2::Request now for mod_perl 2. Main reason to want to
 use it is to deal with client data. POST/GET/cookie data is not fully parsed 
 by
 mod_perl 2, and Apache2::Request does a mighty good job at taking care
 of that. It's a much better/faster alternative to using CGI.pm


Thank you for the kind answer.

--jenifer


upgrade to mp2

2007-09-19 Thread lists user
Hello,

currently we have mp1 installed.but I will upgrade it to mp2.
does it have any risk?or will mp2 get conflict with mp1?
thanks.


Re: mod_perl2 compiling error

2007-08-23 Thread lists user
I could never install Apache2::Request successfully.
I'm running RH Linux as4,2.6.9 kernel.

2007/8/23, Manoj Bist [EMAIL PROTECTED]:
 Hi Jon,

 Which OS platform are you working on?

 On platforms like ubuntu linux you can get precompile packages for all
 these modules.
 You just need to do: sudo apt-get install package-name.

 An option like this may already be available on your development platform.

 -Manoj.

 On 8/22/07, jónJósef Bjarnason [EMAIL PROTECTED] wrote:
  Thanks.
 
  I had to compile Perl again, then mod_perl2.
  mod_perl works now, nothing else thoguh,
  Problems compiling DBI, DBD..etc. (MySql on a different machine)
 
  I´m getting therevery slowly.
  Thank you all for your time and help.
 
  Regards
  Jon
 
 
  Þann 8/22/2007, skrifaði Manoj Bist [EMAIL PROTECTED]:
 
  In general to create a shared object the constituent object files
  should be PICable. Look for Makefile(s) which compile the individual
  source files.  It would have a variable like 'CFLAGS'. Adding '-fPIC'
  to it should take care of it.
  
  
  On 8/21/07, jónJósef Bjarnason [EMAIL PROTECTED] wrote:
   When running make for mod_perl 2.0.3 I get an error telling me to use
   -fPIC option.
   Does anyone know where to put that compiling option  ?
  
   Regards
   Jon
  
   Apache 2.2.4
   Perl 5.8.8
   mod_perl 2.0.3
   Ubuntu 6.06 LTS 64bit AMD
  
   when compiling -o mod_perl.so:
   `a local symbol' can not be used when making a shared
   object; recompile with -fPIC