compiled mp2 handler?

2007-08-21 Thread Jen mlists
I saw this document on perl.apache.com site,

When a mod_perl hook is called for a given phase, the glue code has an
index into the array of handlers, so it knows to return DECLINED right
away if no handlers are configured, without entering the Perl runtime
as 1.0 did. The handlers are also now stored in an apr_array_header_t,
which is much lighter and faster than using a Perl AV, as 1.0 did. And
more importantly, keeps us out of the Perl runtime until we're sure we
need to be there.

Perl*Handlers are now "compiled", that is, the various forms of:

  PerlResponseHandler MyModule->handler
  # defaults to MyModule::handler or MyModule->handler
  PerlResponseHandler MyModule
  PerlResponseHandler $MyObject->handler
  PerlResponseHandler 'sub { print "foo\n"; return OK }'

are only parsed once, unlike 1.0 which parsed every time the handler
was used. There will also be an option to parse the handlers at
startup time. Note: this feature is currently not enabled with
threads, as each clone needs its own copy of Perl structures.

=

does this mean mp1 handler need to be parsed and compiled each time
when requests came and called that handler?
>From my understanding,mp1 handler should always be compiled only once
at apache startup time.Otherwise I don't think the handler has
performance advantage than common CGI.

Please help explain it.Thanks!


recording perl module

2007-08-21 Thread usha rani
hi ,

  i am doing mod_perl but i am not able to run in apache,
httpd.configfile we has added
*> LoadModule perl_module /usr/lib/httpd/modules/mod_perl.so *
then also we not able to run so any one can give suggestion what are the
 changes
we has to make in httpd.conf file.


 thankig you,
Usha


-- 
www.g-billboards.com


Re: recording perl module

2007-08-21 Thread Clinton Gormley
You haven't given us any information about your setup, or the error that
you see, so it is very difficult to help you.

You will find an installation guide here:

http://perl.apache.org/docs/2.0/user/install/install.html

Clint

On Tue, 2007-08-21 at 16:59 +0530, usha rani wrote:
> hi ,
>  
>   i am doing mod_perl but i am not able to run in apache,
> httpd.config file we has added 
> > LoadModule perl_module /usr/lib/httpd/modules/mod_perl.so 
> then also we not able to run so any one can give suggestion what are
> the  changes
> we has to make in httpd.conf file.
>  
>  
>  thankig you,
> Usha
> 
> 
> -- 
> www.g-billboards.com 



Re: recording perl module

2007-08-21 Thread gautam chekuri
have you specifed the directory/location in httpd.conf under which
URLs would be handled by mod_perl .. ?

you can refer to the following url :

http://modperlbook.org/html/ch04_02.html


On 8/21/07, usha rani <[EMAIL PROTECTED]> wrote:
> hi ,
>
>   i am doing mod_perl but i am not able to run in apache, httpd.config
> file we has added
> > LoadModule perl_module
> /usr/lib/httpd/modules/mod_perl.so
> then also we not able to run so any one can give suggestion what are the
> changes
> we has to make in httpd.conf file.
>
>
>  thankig you,
> Usha
>
>
> --
> www.g-billboards.com


Re: Configuring Mod_perl and Apache web Server

2007-08-21 Thread usha rani
hi,

We would like to have information regarding configuration of MOD_PERL
2.0.3 with Apache Server -2.2.4 <[EMAIL PROTECTED]>
version in cygwin.

 I need some information regarding configuration of httpd.conf  file,
what are the changes we have to make
 in httpd.conf file for MOD_PERL.

 If any one knows the information please reply back to me.

with thanks®ards,
Usha.

-- 
www.g-billboards.com


mod_perl2 compiling error

2007-08-21 Thread jónJósef Bjarnason
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 

Þessi tölvupóstur og viðhengi gæti innihaldið trúnaðarupplýsingar og/eða
einkamál og ereingöngu ætlaður þeim sem hann er stílaður á. Ef sending
þessi hefur ranglega borist yður vinsamlega gætið fyllsta trúnaðar,
tilkynnið sendanda og eyðileggið sendinguna eins og skylt er skv. 47.
gr. laga nr. 81/2003 um fjarskipti.

The information transmitted, including any attachment, may contain
confidential and/or privileged material and is intended only for the
addressee. If you receive this in error, please keep the information
confidential, contact the sender and delete the material from your
system.


How to display images ?

2007-08-21 Thread RGKärcher
Hi guys , 

I a new to perl and mod_perl and Apache::Asp , And I
wold like to ask you  How to display an image ? 

I tried the example that display a binary file
included in  /eg , but Is there a simple way to show a
an image ? and I want to show a flash animation also
in my scripts .

I use a code like this in PHP to display an image in
$image variable :

print " http://www.mysite.net/\";>  \n";

How can I do the same under mod_perl ?

Thanks guys  ,

Rick Karcher



Ricardo german Kärcher

[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]


  

¡Sé un mejor fotógrafo!
Perfeccioná tu técnica y encontrá las mejores fotos. Visitá 
http://ar.yahoo.com/promos/mejorfotografo.html


Re: How to display images ?

2007-08-21 Thread Georg Grabler
On Tuesday 21 August 2007 15:48:23 RGKärcher wrote:
> print " http://www.mysite.net/\";>   src=\"site_images/$image \"  width=\"160\"
> height=\"180\" alt=\"image \" class=\"float-left\"
> />\n";

Perl is just a bit differnt. Either, use ${image} instead of $image or use 
sprintf.

-- 
Yours,
Georg (STiAT)


Re: How to display images ?

2007-08-21 Thread Michael Peters
Georg Grabler wrote:
> On Tuesday 21 August 2007 15:48:23 RGKärcher wrote:
>> print " http://www.mysite.net/\";>  > src=\"site_images/$image \"  width=\"160\"
>> height=\"180\" alt=\"image \" class=\"float-left\"
>> />\n";
> 
> Perl is just a bit differnt. Either, use ${image} instead of $image or use 
> sprintf.

You can use both of those, but you don't really need to. The above should work
just fine. But don't all those escapes of the double quotes give you a headache?
There are so many better ways of doing that:

print qq|http://www.mysite.net/";>
  
  
|;

Having said that, when working with HTML you should really be using templates. I
like Template Toolkit (http://search.cpan.org/perldoc?Template) and also use
HTML::Template (http://search.cpan.org/perldoc?HTML::Template) but if you're
coming from PHP then Mason might be more up your alley
(http://search.cpan.org/perldoc?HTML::Mason)

-- 
Michael Peters
Developer
Plus Three, LP



Re: Configuring Mod_perl and Apache web Server

2007-08-21 Thread Perrin Harkins
On 8/21/07, usha rani <[EMAIL PROTECTED]> wrote:
> We would like to have information regarding configuration of MOD_PERL
> 2.0.3 with Apache Server -2.2.4
> version in cygwin.
>
>  I need some information regarding configuration of httpd.conf  file,
> what are the changes we have to make
>  in httpd.conf file for MOD_PERL.

The documentation is here:
http://perl.apache.org/docs/2.0/user/index.html

- Perrin


Re: compiled mp2 handler?

2007-08-21 Thread Perrin Harkins
On 8/21/07, Jen mlists <[EMAIL PROTECTED]> wrote:
> does this mean mp1 handler need to be parsed and compiled each time
> when requests came and called that handler?

No, it means that the dispatch code like "MyModule->handler" is parsed
and compiled each time.

- Perrin


Re: How to display images ?-Not Working

2007-08-21 Thread RGKärcher
Hi guys , 

Thanks Michael and Georg but none of the examples
works   for me ...

I'm using Apache::Asp .

What could be the problem ?

Thanks in Advance 

Rick  

--- Michael Peters <[EMAIL PROTECTED]> escribió:

> Georg Grabler wrote:
> > On Tuesday 21 August 2007 15:48:23 RGKärcher
> wrote:
> >> print " http://www.mysite.net/\";> 
>  >> src=\"site_images/$image \"  width=\"160\"
> >> height=\"180\" alt=\"image \"
> class=\"float-left\"
> >> />\n";
> > 
> > Perl is just a bit differnt. Either, use ${image}
> instead of $image or use 
> > sprintf.
> 
> You can use both of those, but you don't really need
> to. The above should work
> just fine. But don't all those escapes of the double
> quotes give you a headache?
> There are so many better ways of doing that:
> 
> print qq|http://www.mysite.net/";>
>height="180" alt="image"
> class="float-left" />
>   
> |;
> 
> Having said that, when working with HTML you should
> really be using templates. I
> like Template Toolkit
> (http://search.cpan.org/perldoc?Template) and also
> use
> HTML::Template
> (http://search.cpan.org/perldoc?HTML::Template) but
> if you're
> coming from PHP then Mason might be more up your
> alley
> (http://search.cpan.org/perldoc?HTML::Mason)
> 
> -- 
> Michael Peters
> Developer
> Plus Three, LP
> 
> 


Ricardo german Kärcher

[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]


  

¡Sé un mejor fotógrafo!
Perfeccioná tu técnica y encontrá las mejores fotos. Visitá 
http://ar.yahoo.com/promos/mejorfotografo.html


Re: How to display images ?-Not Working

2007-08-21 Thread Clinton Gormley
On Tue, 2007-08-21 at 14:40 -0300, RGKärcher wrote:
> Hi guys , 
> 
> Thanks Michael and Georg but none of the examples
> works   for me ...
> 
> I'm using Apache::Asp .
> 
> What could be the problem ?
> 
> Thanks in Advance 
> 

What error are you seeing?  What does the HTML being sent to your
browser look like?  What do you see in the apache logs?

The snippet of code that you sent looked correct, so check your
assumptions.  Check that the HTML has the same URL that you are
expecting.  Can you access the image by typing that URL into your
address bar in your browser? Does it produce an error in your apache
log?

If the HTML being produced is correct, then the problem lies outside
Perl.  The image is served by Apache - probably doesn't come near the
Perl (unless you have some authorisation or authentication handlers on
that URL)

Either way, more information would help :)

Clint



Re: How to display images ?-Not Working

2007-08-21 Thread Manoj Bist
Hi Rick,

Please use Text::Template for generating the html you send to the client.
As long as you keep appending the html string to $OUT, it should work
under mod_perl2.0.


http://search.cpan.org/~mjd/Text-Template-1.44/lib/Text/Template.pm

Thanks,

Manoj.

On 8/21/07, RGKärcher <[EMAIL PROTECTED]> wrote:
> Hi guys ,
>
> Thanks Michael and Georg but none of the examples
> works   for me ...
>
> I'm using Apache::Asp .
>
> What could be the problem ?
>
> Thanks in Advance
>
> Rick
>
> --- Michael Peters <[EMAIL PROTECTED]> escribió:
>
> > Georg Grabler wrote:
> > > On Tuesday 21 August 2007 15:48:23 RGKärcher
> > wrote:
> > >> print " http://www.mysite.net/\";>
> >  > >> src=\"site_images/$image \"  width=\"160\"
> > >> height=\"180\" alt=\"image \"
> > class=\"float-left\"
> > >> />\n";
> > >
> > > Perl is just a bit differnt. Either, use ${image}
> > instead of $image or use
> > > sprintf.
> >
> > You can use both of those, but you don't really need
> > to. The above should work
> > just fine. But don't all those escapes of the double
> > quotes give you a headache?
> > There are so many better ways of doing that:
> >
> > print qq|http://www.mysite.net/";>
> >> height="180" alt="image"
> > class="float-left" />
> >   
> > |;
> >
> > Having said that, when working with HTML you should
> > really be using templates. I
> > like Template Toolkit
> > (http://search.cpan.org/perldoc?Template) and also
> > use
> > HTML::Template
> > (http://search.cpan.org/perldoc?HTML::Template) but
> > if you're
> > coming from PHP then Mason might be more up your
> > alley
> > (http://search.cpan.org/perldoc?HTML::Mason)
> >
> > --
> > Michael Peters
> > Developer
> > Plus Three, LP
> >
> >
>
>
> Ricardo german Kärcher
>
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
>
>
>   
> 
> ¡Sé un mejor fotógrafo!
> Perfeccioná tu técnica y encontrá las mejores fotos. Visitá 
> http://ar.yahoo.com/promos/mejorfotografo.html
>


Special characters

2007-08-21 Thread Dan King
I am having issues running a web application, called OTRS, that uses DBI and 
DBD::Oracle. When I insert special characters, such as é or â they show up as 
question marks in the database when looking at them from sqlplus or through the 
web application. I am running the web app on Apache v1 with an Oracle 10g 
backend both on Solaris 9. The reason I am asking the question here is I am 
wondering if mod perl does any conversion of text that is typed into a text 
box. 

 

I have been able to successfully insert and read the special characters using 
sqlplus from the command line of the server running the web app, apache and 
Oracle as well as creating a small perl test script that looks as follows:

 

 

 

#!/usr/local/bin/perl

 

use warnings;

 

use strict;

 

use Data::Dumper;

 

use DBI;

 

use DBD::Oracle;

 

 

 

my $dbh = DBI->connect("dbi:Oracle:host=localhost;sid=QAT", "rm_ticket", 
"rm_ticket");

 

my $sql = qq{ UPDATE signature SET text='çè' WHERE id=1 };

 

my $sth = $dbh->prepare($sql);

 

$sth->execute();

 

$sth->finish();

 

$dbh->disconnect;

 

 

 

The reading script looks as follows:

 

 

 

#!/usr/local/bin/perl

 

use warnings;

 

use strict;

 

use Data::Dumper;

 

use DBI;

 

use DBD::Oracle;

 

 

 

my $dbh = DBI->connect("dbi:Oracle:host=localhost;sid=QAT", "rm_ticket", 
"rm_ticket");

 

my $sql = qq{ SELECT text from signature };

 

my $sth = $dbh->prepare($sql);

 

$sth->execute();

 

my($text);

 

$sth->bind_columns(undef, \$text);

 

print "Text of signature:\n\n";

 

while( $sth->fetch() ) {

 

print "Object: $text\n";

 

}

 

$sth->finish();

 

$dbh->disconnect;

 

 

 

Does anyone know why I can successfully write and read from the database when I 
am not using the web application but when I use the web application the special 
characters fail to work properly?

 

 

Dan King
Software Developer
Canadian Resident Matching Service
613.237.0075  ext. 241
(Toll free) 877.CARMS.42
171 Nepean Street, Suite 300
Ottawa, ON, CANK2P 0B4
www.carms.ca  



This e-mail message, including any attachments, is for the sole use of the 
intended recipients and may contain confidential and or privileged information. 
 If you are not the intended recipient or this information has been forwarded 
in error, please contact the sender by reply e-mail and destroy copies of the 
original message.  Ce message (incluant toute pièce jointe) s'adresse 
uniquement au(x) destinataire(s) prévu(s) ou à une personne autorisée à le 
recevoir en son (leur) nom. Il pourrait contenir des renseignements 
confidentiels ou protégés.  Si vous l'avez reçu par erreur, nous vous prions 
d'en informer l'auteur dans les meilleurs délais, de ne pas divulguer son 
contenu et de le supprimer de votre système. Merci.

 



Re: How to display images ?-Logs

2007-08-21 Thread RGKärcher
Hi guys ,

The apache log show me this :


[Tue Aug 21 13:57:21 2007] [error] Unrecognized
character \\xFF at
/var/www/html/mgnosis/gnosisweb/site_images/buda.jpg
line 1.\n

When I do this :

http://www.moderngnosis.com.ar/gnosisweb/site_images/buda.jpg

And with others .jpgs .gifs etc . 

What Could be The problem ? 

Thanks

Rick 



Ricardo german Kärcher

[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]


  

¡Sé un mejor fotógrafo!
Perfeccioná tu técnica y encontrá las mejores fotos. Visitá 
http://ar.yahoo.com/promos/mejorfotografo.html


Re: Special characters

2007-08-21 Thread Clinton Gormley
On Tue, 2007-08-21 at 14:21 -0400, Dan King wrote:
> I am having issues running a web application, called OTRS, that uses
> DBI and DBD::Oracle. When I insert special characters, such as é or â
> they show up as question marks in the database when looking at them
> from sqlplus or through the web application. I am running the web app
> on Apache v1 with an Oracle 10g backend both on Solaris 9. The reason
> I am asking the question here is I am wondering if mod perl does any
> conversion of text that is typed into a text box. 
> 


It's not that mod_perl is converting the text.  It's that your program
is NOT converting it.

You are using conflicting character sets.  For instance, maybe data in
your database is stored in UTF8, but on your website you're using
ISO-8859-15.

You need to decode all text coming into your Perl program, and encode it
again on the way out.

Have a look at this tutorial I wrote about using UTF8 with MySQL - may
help.

http://www.perlmonks.org/index.pl?node_id=620803

Clint




Re: How to display images ?-Logs

2007-08-21 Thread Clinton Gormley
I wonder if for some reason apache is trying to execute your images like
a CGI script.  (First time I've heard of this, so may be wrong)

Searching on that error message, I found a thread with the same problem.
Have you added the PerlRequestHandler outside a File or Location
directive?

http://lists.nluug.nl/pipermail/wurlug/2005-August/001206.html

Clint

On Tue, 2007-08-21 at 15:44 -0300, RGKärcher wrote:
> Hi guys ,
> 
> The apache log show me this :
> 
> 
> [Tue Aug 21 13:57:21 2007] [error] Unrecognized
> character \\xFF at
> /var/www/html/mgnosis/gnosisweb/site_images/buda.jpg
> line 1.\n
> 
> When I do this :
> 
> http://www.moderngnosis.com.ar/gnosisweb/site_images/buda.jpg
> 
> And with others .jpgs .gifs etc . 
> 
> What Could be The problem ? 
> 
> Thanks
> 
> Rick 
> 
> 
> 
> Ricardo german Kärcher
> 
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> 
> 
>   
> 
> ¡Sé un mejor fotógrafo!
> Perfeccioná tu técnica y encontrá las mejores fotos. Visitá 
> http://ar.yahoo.com/promos/mejorfotografo.html



RE: Special characters

2007-08-21 Thread Adam Prime x443
You've said that you've verified that the data is in the DB correctly from the 
shell, but it's possible that it's trying to convert to another charset it when 
you pull it out for some reason.  There seems to be some stuff in the 
DBD::Oracle documentation talking about charsets and unicode, i'd start by 
looking there.

http://search.cpan.org/~pythian/DBD-Oracle-1.19/Oracle.pm#DBD::Oracle_and_Unicode

HTH,
Adam



From: Dan King [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 21, 2007 2:22 PM
To: modperl@perl.apache.org
Subject: Special characters



I am having issues running a web application, called OTRS, that uses DBI and 
DBD::Oracle. When I insert special characters, such as é or â they show up as 
question marks in the database when looking at them from sqlplus or through the 
web application. I am running the web app on Apache v1 with an Oracle 10g 
backend both on Solaris 9. The reason I am asking the question here is I am 
wondering if mod perl does any conversion of text that is typed into a text 
box. 

 

I have been able to successfully insert and read the special characters using 
sqlplus from the command line of the server running the web app, apache and 
Oracle as well as creating a small perl test script that looks as follows:

 

 

 

#!/usr/local/bin/perl

 

use warnings;

 

use strict;

 

use Data::Dumper;

 

use DBI;

 

use DBD::Oracle;

 

 

 

my $dbh = DBI->connect("dbi:Oracle:host=localhost;sid=QAT", "rm_ticket", 
"rm_ticket");

 

my $sql = qq{ UPDATE signature SET text='çè' WHERE id=1 };

 

my $sth = $dbh->prepare($sql);

 

$sth->execute();

 

$sth->finish();

 

$dbh->disconnect;

 

 

 

The reading script looks as follows:

 

 

 

#!/usr/local/bin/perl

 

use warnings;

 

use strict;

 

use Data::Dumper;

 

use DBI;

 

use DBD::Oracle;

 

 

 

my $dbh = DBI->connect("dbi:Oracle:host=localhost;sid=QAT", "rm_ticket", 
"rm_ticket");

 

my $sql = qq{ SELECT text from signature };

 

my $sth = $dbh->prepare($sql);

 

$sth->execute();

 

my($text);

 

$sth->bind_columns(undef, \$text);

 

print "Text of signature:\n\n";

 

while( $sth->fetch() ) {

 

print "Object: $text\n";

 

}

 

$sth->finish();

 

$dbh->disconnect;

 

 

 

Does anyone know why I can successfully write and read from the database when I 
am not using the web application but when I use the web application the special 
characters fail to work properly?

 

 

Dan King
Software Developer
Canadian Resident Matching Service
613.237.0075  ext. 241
(Toll free) 877.CARMS.42
171 Nepean Street, Suite 300
Ottawa, ON, CANK2P 0B4
www.carms.ca  



This e-mail message, including any attachments, is for the sole use of the 
intended recipients and may contain confidential and or privileged information. 
 If you are not the intended recipient or this information has been forwarded 
in error, please contact the sender by reply e-mail and destroy copies of the 
original message.  Ce message (incluant toute pièce jointe) s'adresse 
uniquement au(x) destinataire(s) prévu(s) ou à une personne autorisée à le 
recevoir en son (leur) nom. Il pourrait contenir des renseignements 
confidentiels ou protégés.  Si vous l'avez reçu par erreur, nous vous prions 
d'en informer l'auteur dans les meilleurs délais, de ne pas divulguer son 
contenu et de le supprimer de votre système. Merci.

 



RE: Special characters

2007-08-21 Thread Dan King
I am using ISO-8859-1 in the database and the correct encoding is being used on 
the clients web browser. That is why I thought that it may be an apache or 
mod_perl issue.

Thank you for the recommendations though and I will look into and experiment 
with all of them.

Dan King
Software Developer
Canadian Resident Matching Service
613.237.0075  ext. 241
(Toll free) 877.CARMS.42
171 Nepean Street, Suite 300
Ottawa, ON, CANK2P 0B4
www.carms.ca



This e-mail message, including any attachments, is for the sole use of the 
intended recipients and may contain confidential and or privileged information. 
 If you are not the intended recipient or this information has been forwarded 
in error, please contact the sender by reply e-mail and destroy copies of the 
original message.  Ce message (incluant toute pièce jointe) s'adresse 
uniquement au(x) destinataire(s) prévu(s) ou à une personne autorisée à le 
recevoir en son (leur) nom. Il pourrait contenir des renseignements 
confidentiels ou protégés.  Si vous l'avez reçu par erreur, nous vous prions 
d'en informer l'auteur dans les meilleurs délais, de ne pas divulguer son 
contenu et de le supprimer de votre système. Merci.


-Original Message-
From: Clinton Gormley [mailto:[EMAIL PROTECTED] 
Sent: August 21, 2007 3:01 PM
To: Dan King
Cc: modperl@perl.apache.org
Subject: Re: Special characters

On Tue, 2007-08-21 at 14:21 -0400, Dan King wrote:
> I am having issues running a web application, called OTRS, that uses
> DBI and DBD::Oracle. When I insert special characters, such as é or â
> they show up as question marks in the database when looking at them
> from sqlplus or through the web application. I am running the web app
> on Apache v1 with an Oracle 10g backend both on Solaris 9. The reason
> I am asking the question here is I am wondering if mod perl does any
> conversion of text that is typed into a text box. 
> 


It's not that mod_perl is converting the text.  It's that your program
is NOT converting it.

You are using conflicting character sets.  For instance, maybe data in
your database is stored in UTF8, but on your website you're using
ISO-8859-15.

You need to decode all text coming into your Perl program, and encode it
again on the way out.

Have a look at this tutorial I wrote about using UTF8 with MySQL - may
help.

http://www.perlmonks.org/index.pl?node_id=620803

Clint






Re: Special characters

2007-08-21 Thread Manoj Bist
You need to know the encoding of the characters you are using in perl
and handle them accordingly.

The following link should have sufficient information to help you
trouble shoot this.

http://search.cpan.org/~jhi/perl-5.8.0/pod/perluniintro.pod

On 8/21/07, Dan King <[EMAIL PROTECTED]> wrote:
>
>
>
>
> I am having issues running a web application, called OTRS, that uses DBI and
> DBD::Oracle. When I insert special characters, such as é or â they show up
> as question marks in the database when looking at them from sqlplus or
> through the web application. I am running the web app on Apache v1 with an
> Oracle 10g backend both on Solaris 9. The reason I am asking the question
> here is I am wondering if mod perl does any conversion of text that is typed
> into a text box.
>
>
>
> I have been able to successfully insert and read the special characters
> using sqlplus from the command line of the server running the web app,
> apache and Oracle as well as creating a small perl test script that looks as
> follows:
>
>
>
>
>
>
>
> #!/usr/local/bin/perl
>
>
>
> use warnings;
>
>
>
> use strict;
>
>
>
> use Data::Dumper;
>
>
>
> use DBI;
>
>
>
> use DBD::Oracle;
>
>
>
>
>
>
>
> my $dbh = DBI->connect("dbi:Oracle:host=localhost;sid=QAT",
> "rm_ticket", "rm_ticket");
>
>
>
> my $sql = qq{ UPDATE signature SET text='çè' WHERE id=1 };
>
>
>
> my $sth = $dbh->prepare($sql);
>
>
>
> $sth->execute();
>
>
>
> $sth->finish();
>
>
>
> $dbh->disconnect;
>
>
>
>
>
>
>
> The reading script looks as follows:
>
>
>
>
>
>
>
> #!/usr/local/bin/perl
>
>
>
> use warnings;
>
>
>
> use strict;
>
>
>
> use Data::Dumper;
>
>
>
> use DBI;
>
>
>
> use DBD::Oracle;
>
>
>
>
>
>
>
> my $dbh = DBI->connect("dbi:Oracle:host=localhost;sid=QAT",
> "rm_ticket", "rm_ticket");
>
>
>
> my $sql = qq{ SELECT text from signature };
>
>
>
> my $sth = $dbh->prepare($sql);
>
>
>
> $sth->execute();
>
>
>
> my($text);
>
>
>
> $sth->bind_columns(undef, \$text);
>
>
>
> print "Text of signature:\n\n";
>
>
>
> while( $sth->fetch() ) {
>
>
>
> print "Object: $text\n";
>
>
>
> }
>
>
>
> $sth->finish();
>
>
>
> $dbh->disconnect;
>
>
>
>
>
>
>
> Does anyone know why I can successfully write and read from the database
> when I am not using the web application but when I use the web application
> the special characters fail to work properly?
>
>
>
>
>
> Dan King
>  Software Developer
>  Canadian Resident Matching Service
>  613.237.0075  ext. 241
>  (Toll free) 877.CARMS.42
>  171 Nepean Street, Suite 300
>  Ottawa, ON, CANK2P 0B4
>  www.carms.ca
>
> 
>
>  This e-mail message, including any attachments, is for the sole use of the
> intended recipients and may contain confidential and or privileged
> information.  If you are not the intended recipient or this information has
> been forwarded in error, please contact the sender by reply e-mail and
> destroy copies of the original message.  Ce message (incluant toute pièce
> jointe) s'adresse uniquement au(x) destinataire(s) prévu(s) ou à une
> personne autorisée à le recevoir en son (leur) nom. Il pourrait contenir des
> renseignements confidentiels ou protégés.  Si vous l'avez reçu par erreur,
> nous vous prions d'en informer l'auteur dans les meilleurs délais, de ne pas
> divulguer son contenu et de le supprimer de votre système. Merci.
>
>


Internal Server Error

2007-08-21 Thread Jordan McLain
Hello,

I have a module that will fail every once in a while with the error_log
message:

Can't call method "send_http_header" on an undefined value at
/path/to/module/Name.pm

The handler method starts out with:

sub handler ($$) {
my ($class, $r) = @_;

For some reason $r is not defined.  This only happens intermittently... Does
anyone have any ideas?
Apache/1.3.37 (Unix) mod_perl/1.29 mod_ssl/2.8.28 OpenSSL/0.9.7g

mode_per

Thanks,
Jordan Mclain


Re: Internal Server Error

2007-08-21 Thread Jeff Pang
Try change the codes to:sub handler {    my $r = shift;    ...-Original Message-
From: Jordan McLain <[EMAIL PROTECTED]>
Sent: Aug 22, 2007 9:26 AM
To: mod_perl 
Subject: Internal Server Error

Hello,I have a module that will fail every once in a while with the error_log message:Can't call method "send_http_header" on an undefined value at /path/to/module/Name.pmThe handler method starts out with:
sub handler ($$) {    my ($class, $r) = @_;


--
Jeff Pang - [EMAIL PROTECTED]
http://home.arcor.de/jeffpang/


Re: Internal Server Error

2007-08-21 Thread Perrin Harkins
On 8/21/07, Jordan McLain <[EMAIL PROTECTED]> wrote:
> sub handler ($$) {
> my ($class, $r) = @_;
>
> For some reason $r is not defined.  This only happens intermittently... Does
> anyone have any ideas?

Sounds like sometimes it doesn't get properly called as a method, so
$r ends up as the first arg.  Can you show us the relevant part of
your httpd.conf?

- Perrin


Re: Internal Server Error

2007-08-21 Thread Colin Wetherbee

Jeff Pang wrote:

Try change the codes to:

sub handler {

my $r = shift;
...


If his handler is called as a method, $class is an appropriate first 
variable to shift out of @_.  Using ($class, $r) = @_ is a perfectly 
legitimate way of taking care of that.


Colin


Re: 答复: Internal Server Error

2007-08-21 Thread Jordan McLain
Yes. The Apache server is normally running. It is serving requests perfectly
fine before this starts a few hours later, intermittently.

Jordan

On 8/21/07, Luke Lu <[EMAIL PROTECTED]> wrote:
>
>  Are you sure the mod_perl already being running?
>
>
>  --
>
> *发件人:* Jordan McLain [mailto:[EMAIL PROTECTED]
> *发送时间:* 2007年8月22日 9:26
> *收件人:* mod_perl
> *主题:* Internal Server Error
>
>
>
> Hello,
>
> I have a module that will fail every once in a while with the error_log
> message:
>
> Can't call method "send_http_header" on an undefined value at
> /path/to/module/Name.pm
>
> The handler method starts out with:
>
> sub handler ($$) {
> my ($class, $r) = @_;
>
> For some reason $r is not defined.  This only happens intermittently...
> Does anyone have any ideas?
> Apache/1.3.37 (Unix) mod_perl/1.29 mod_ssl/2.8.28 OpenSSL/0.9.7g
>
> mode_per
>
> Thanks,
> Jordan Mclain
>


Re: Configuring Mod_perl and Apache web Server

2007-08-21 Thread Foo JH

Read up on this document and other related ones:
http://perl.apache.org/docs/2.0/user/config/config.html

Read this also:
http://perl.apache.org/docs/2.0/os/win32/index.html

usha rani wrote:

hi,
 
We would like to have information regarding configuration of 
MOD_PERL 2.0.3 with Apache Server -2.2.4 

version in cygwin.
  
 I need some information regarding configuration of httpd.conf  
file, what are the changes we have to make

 in httpd.conf file for MOD_PERL.
 
 If any one knows the information please reply back to me.
 
with thanks®ards,

Usha.

--
www.g-billboards.com 




Re: Internal Server Error

2007-08-21 Thread Jordan McLain
I might have solved my own problem...
I was calling:

PerlHandler Package::Name

instead of:

PerlHandler Package::Name->handler

although I am still confused as to why the first was working...

Jordan

On 8/21/07, Colin Wetherbee <[EMAIL PROTECTED]> wrote:
>
> Jeff Pang wrote:
> > Try change the codes to:
> >
> > sub handler {
> >
> > my $r = shift;
> > ...
>
> If his handler is called as a method, $class is an appropriate first
> variable to shift out of @_.  Using ($class, $r) = @_ is a perfectly
> legitimate way of taking care of that.
>
> Colin
>


Re: Internal Server Error

2007-08-21 Thread Jeff Pang


-Original Message-
>From: Jordan McLain <[EMAIL PROTECTED]>
>Sent: Aug 22, 2007 10:52 AM
>To: modperl@perl.apache.org
>Subject: Re: Internal Server Error
>
>I might have solved my own problem...
>I was calling:
>
>PerlHandler Package::Name
>
>instead of:
>
>PerlHandler Package::Name->handler
>

So on the first case,we need to write the handler as 
sub handler { my $r = shift; ...}
because Apache may call the function directly as Package::Name::handler.

on the second case,we write handler as,
sub handler { my $class = shift; my $r = shift; ... }
because '->' is a method calling.

Am I right?
btw,I always used the first config.

--
Jeff Pang - [EMAIL PROTECTED]
http://home.arcor.de/jeffpang/


Re: Internal Server Error

2007-08-21 Thread Foo JH


So on the first case,we need to write the handler as 
sub handler { my $r = shift; ...}

because Apache may call the function directly as Package::Name::handler.

on the second case,we write handler as,
sub handler { my $class = shift; my $r = shift; ... }
because '->' is a method calling.

Am I right?
btw,I always used the first config.
Are there any technical advantages with either method, or is it a 
TIMTOWDI option given to the developers?


Re: Internal Server Error

2007-08-21 Thread Jeff Pang


-Original Message-
>From: Foo JH <[EMAIL PROTECTED]>
>Sent: Aug 22, 2007 11:15 AM
>To: Jeff Pang <[EMAIL PROTECTED]>
>Cc: Jordan McLain <[EMAIL PROTECTED]>, modperl@perl.apache.org
>Subject: Re: Internal Server Error
>
>
>> So on the first case,we need to write the handler as 
>> sub handler { my $r = shift; ...}
>> because Apache may call the function directly as Package::Name::handler.
>>
>> on the second case,we write handler as,
>> sub handler { my $class = shift; my $r = shift; ... }
>> because '->' is a method calling.
>>
>> Am I right?
>> btw,I always used the first config.
>Are there any technical advantages with either method, or is it a 
>TIMTOWDI option given to the developers?

I don't see anyone.Modperl's documents say both are fine.

--
Jeff Pang - [EMAIL PROTECTED]
http://home.arcor.de/jeffpang/