You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Jean-Paul COGNET <je...@toutophone.com> on 2004/10/26 13:38:13 UTC

pb setting NLS_LANG with mod_perl 1.99_14et DBD::Oracle

A problem with mod_perl 1.99 et DBD::Oracle.

I cannot set the value of NLS_LANG

If I set it to any value different from '' then I cannot connect, having this log in Apache :
[Tue Oct 26 12:48:30 2004] [notice] Apache/2.0.47 (Fedora) configured -- resuming normal operations
DBI connect('TOPDEV5','automate',...) failed: ORA-00604: error occurred at recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin) at /var/www/perl/automate1.pl line 1119

If I don't set NLS_LANG it works fine, but of course I have no accent ("été" becomes "ete")

It works fine if I don't use mod_perl
I use $ENV{NLS_LANG}='french_france.WE8ISO8859P1' just before the connect and I have accent ("été" stays "été")

Any idea ?
Thanks you very much.


I use a startup.pl script to set ORACLE_HOME (and try to set NLS_LANG).
startup.pl is launched by httpd.conf
#==========
#httpd.conf
#==========
<IfModule mod_perl.c>
  Alias /perl/ /var/www/perl/
  PerlModule ModPerl::Registry
 PerlRequire "/var/www/perl/startup.pl"

  <Location /perl>
    SetHandler perl-script
        PerlResponseHandler ModPerl::Registry
        PerlOptions +ParseHeaders
    Options +ExecCGI
  </Location>
</IfModule>
 





#===========
#startup.pl
#===========


#!/usr/bin/perl
use ModPerl::Util; #for CORE::GLOBAL::exit

use Apache::RequestRec;
use Apache::RequestIO;
use Apache::RequestUtil ;

use Apache::Server ;
use Apache::ServerUtil ;
use Apache::Connection ;
use Apache::Log ;

use APR::Table ;

use ModPerl::Registry ;

use Apache::Const -compile => ':common';
use APR::Const -compile => ':common';
use DBI; # On va utiliser la base de donnees
use DBD::Oracle;

$ENV{ORACLE_HOME}='/opt/oracle/product/10g/OraDB10g';
#$ENV{NLS_LANG}='french_france.WE8ISO8859P1';
$ENV{'NLS_LANG'}='FRENCH_FRANCE.WE8MSWIN1252';
1;

Jean-Paul COGNET
Tout-O-Phone S.A.
e-mail : jean-paul.cognet@toutophone.com
mobile : 06 19 56 77 96

Re: pb setting NLS_LANG with mod_perl 1.99_14et DBD::Oracle

Posted by Stas Bekman <st...@stason.org>.
Jean-Paul COGNET wrote:
> Hi Stas,
> Good advice !!
> I've found that a user have a similar problem using PHP, and that the only
> avalaible value for NSL_LANG is this case was
> 'American_America.EE8ISO8859P2'
> I've tried this value and it works, but with bad accents.
> "ou entrer l'heure d'enlèvement passée ou à venir. Entrer étoile si
> l'enlèvement ne pourra pas se faire"
> becomes
> "ou entrer l'heure d'enl?vement passée ou ? venir. Entrer étoile si
> l'enl?vement ne pourra pas se faire"
> 
> BUT with this strange value
> 'American_America.WE8ISO8859P1'
> it seems to work fine.
> "ou entrer l'heure d'enlèvement passée ou à venir. Entrer étoile si
> l'enlèvement ne pourra pas se faire"
> stays
> "ou entrer l'heure d'enlèvement passée ou à venir. Entrer étoile si
> l'enlèvement ne pourra pas se faire"
> 
> Maybe, Oracle doesn't like France ;-)

:)

> Thank you a lot Stas.

You're welcome, Jean-Paul.

But it should work w/o Env::C, if you set this env var at startup like you 
did in first place. Env::C is not good for threaded environment, since 
it's not thread safe. so it's only OK to use it for prefork MPM.


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
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: pb setting NLS_LANG with mod_perl 1.99_14et DBD::Oracle

Posted by Jean-Paul COGNET <je...@toutophone.com>.
Hi Stas,
Good advice !!
I've found that a user have a similar problem using PHP, and that the only
avalaible value for NSL_LANG is this case was
'American_America.EE8ISO8859P2'
I've tried this value and it works, but with bad accents.
"ou entrer l'heure d'enlèvement passée ou à venir. Entrer étoile si
l'enlèvement ne pourra pas se faire"
becomes
"ou entrer l'heure d'enl?vement passée ou ? venir. Entrer étoile si
l'enl?vement ne pourra pas se faire"

BUT with this strange value
'American_America.WE8ISO8859P1'
it seems to work fine.
"ou entrer l'heure d'enlèvement passée ou à venir. Entrer étoile si
l'enlèvement ne pourra pas se faire"
stays
"ou entrer l'heure d'enlèvement passée ou à venir. Entrer étoile si
l'enlèvement ne pourra pas se faire"

Maybe, Oracle doesn't like France ;-)

Thank you a lot Stas.

So if you have the same problem you can try this value....
Now my script is :
============================================================================
===
use DBI;
use DBD::Oracle;
use CGI;
use Env::C;

#Env::C::setenv('NLS_LANG', 'french_france.WE8ISO8859P1',1);
# Doesnt'work with mod_perl
# ===> ERROR ? ORA-00604: error occurred at recursive SQL level 1 ORA-01756:
quoted string not properly terminated (DBD ERROR: OCISessionBegin)

#Env::C::setenv('NLS_LANG', 'American_America.EE8ISO8859P2',1);
#Works but, not really fine

Env::C::setenv('NLS_LANG', 'American_America.WE8ISO8859P1',1);
#Seems to work !!!

Env::C::setenv('ORACLE_HOME', '/opt/oracle/product/10g/OraDB10g',1);

$ENTETE_HTML=0;

$q = new CGI;                        # create new CGI object

&EnteteHTML();
 $dsn='DBI:Oracle:TOPDEV5';
 $user='user';
 $passwd='password';
 $dbh = DBI->connect($dsn, $user,$passwd);
print "dbh=$dbh<br>";
print "ERROR ? $DBI::errstr<br>";
$SQLOrder="select MESSAGE_TEXT from AUDIO";
 my $sel1 = $dbh->prepare($SQLOrder);
 $sel1->execute()|| die "Error : $DBI::errstr";
 my @cols;
 while (@cols = $sel1->fetchrow_array) {
  my $name=$cols[0];
print "$name<br>";
}
&EndHTML();
#===========================================================================
===
sub EnteteHTML
#===========================================================================
===
 {
 return if ($ENTETE_HTML);
 print $q->header('text/html');
  print "<HTML>\n";
  print "<BODY TEXT=#000000 LINK=#FFFFFF ALINK=#FFFFFF VLINK=#FFFFFF
onLoad=document.next_DIALOG_OUTPUT_ID.XX_INPUT_XX.focus();>";
 $ENTETE_HTML++;
 }
#===========================================================================
===
sub EndHTML
#===========================================================================
===
 {
 return unless ($ENTETE_HTML);
 print "</BODY></HTML>\n";
 }






----- Original Message ----- 
From: "Stas Bekman" <st...@stason.org>
To: "Jean-Paul COGNET" <je...@toutophone.com>
Cc: <mo...@perl.apache.org>
Sent: Wednesday, November 03, 2004 1:29 AM
Subject: Re: pb setting NLS_LANG with mod_perl 1.99_14et DBD::Oracle


> Jean-Paul COGNET wrote:
> > I have tried using Env::C (from CPAN), without using a startup.pl
script.
> > And it is the same behaviour.
> > Any idea ?
> > Thank you very much.
>
> I've never used Oracle, so I can't really tell what the problem is. If you
> could figure out how to reproduce it with something else I'd be more
helpful.
>
> Any luck with using google.com to find the solution? Feeding that error
> message to google shows quite a lot of hits. I'm not sure how relevant
> they are to our case.
>
> -- 
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
>
> -- 
> 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
>


-- 
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: pb setting NLS_LANG with mod_perl 1.99_14et DBD::Oracle

Posted by Stas Bekman <st...@stason.org>.
Jean-Paul COGNET wrote:
> I have tried using Env::C (from CPAN), without using a startup.pl script.
> And it is the same behaviour.
> Any idea ?
> Thank you very much.

I've never used Oracle, so I can't really tell what the problem is. If you 
could figure out how to reproduce it with something else I'd be more helpful.

Any luck with using google.com to find the solution? Feeding that error 
message to google shows quite a lot of hits. I'm not sure how relevant 
they are to our case.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
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: pb setting NLS_LANG with mod_perl 1.99_14et DBD::Oracle

Posted by Jean-Paul COGNET <je...@toutophone.com>.
I have tried using Env::C (from CPAN), without using a startup.pl script.
And it is the same behaviour.
Any idea ?
Thank you very much.


The script is now :
========================================================
use DBI;
use DBD::Oracle;
use CGI;
use Env::C;
Env::C::setenv('NLS_LANG', 'french_france.WE8ISO8859P1',1);
Env::C::setenv('ORACLE_HOME', '/opt/oracle/product/10g/OraDB10g',1);
$ENTETE_HTML=0;
$q = new CGI;                        # create new CGI object

&EnteteHTML();

my $ar_env = Env::C::getallenv();
        print join "<br>\n", @$ar_env;

print "<br>\n";

 $dsn='DBI:Oracle:TOPDEV5';
 $user='user';
 $passwd='password';
 $dbh = DBI->connect($dsn, $user,$passwd);
print "dbh=$dbh<br>";
print "ERROR ? $DBI::errstr<br>";
&EndHTML();
#................................
sub EnteteHTML
#................................
 {
 return if ($ENTETE_HTML);
 print $q->header('text/html');
  print "<HTML>\n";
  print "<BODY TEXT=#000000 LINK=#FFFFFF ALINK=#FFFFFF VLINK=#FFFFFF
onLoad=document.next_DIALOG_OUTPUT_ID.XX_INPUT_XX.focus();>";
 $ENTETE_HTML++;
 }
#................................
sub EndHTML
#................................
 {
 return unless ($ENTETE_HTML);
 print "</BODY></HTML>\n";
 }

========================================================
and gives this output :
========================================================
HOSTNAME=jupiter.toutophone.com
SHELL=/bin/bash
TERM=xterm
HISTSIZE=1000
SSH_CLIENT=192.168.2.101 4325 22
SSH_TTY=/dev/pts/1
USER=root
LD_LIBRARY_PATH=/usr/local/apache2/lib:
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;
33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=0
0;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:
*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;
31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.
gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
USERNAME=root
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/ActivePerl-5.8/bin/:/us
r/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/ro
ot/bin
MAIL=/var/spool/mail/root
PWD=/usr/local/apache2/bin
INPUTRC=/etc/inputrc
LANG=fr_FR.UTF-8
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
HOME=/root
SHLVL=2
BASH_ENV=/root/.bashrc
LOGNAME=root
SSH_CONNECTION=192.168.2.101 4325 192.168.2.120 22
LESSOPEN=|/usr/bin/lesspipe.sh %s
G_BROKEN_FILENAMES=1
_=/usr/local/apache2/bin/httpd
NLS_LANG=french_france.WE8ISO8859P1
ORACLE_HOME=/opt/oracle/product/10g/OraDB10g
dbh=
ERROR ? ORA-00604: error occurred at recursive SQL level 1 ORA-01756: quoted
string not properly terminated (DBD ERROR: OCISessionBegin)

========================================================


this script
=======================================================
use DBI;
use DBD::Oracle;
use CGI;
use Env::C;
#Env::C::setenv('NLS_LANG', 'french_france.WE8ISO8859P1',1);
Env::C::setenv('ORACLE_HOME', '/opt/oracle/product/10g/OraDB10g',1);
$ENTETE_HTML=0;
$q = new CGI;                        # create new CGI object
......
========================================================
produces
========================================================
HOSTNAME=jupiter.toutophone.com
SHELL=/bin/bash
TERM=xterm
HISTSIZE=1000
SSH_CLIENT=192.168.2.101 4325 22
SSH_TTY=/dev/pts/1
USER=root
LD_LIBRARY_PATH=/usr/local/apache2/lib:
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;
33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=0
0;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:
*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;
31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.
gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
USERNAME=root
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/ActivePerl-5.8/bin/:/us
r/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/ro
ot/bin
MAIL=/var/spool/mail/root
PWD=/usr/local/apache2/bin
INPUTRC=/etc/inputrc
LANG=fr_FR.UTF-8
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
HOME=/root
SHLVL=2
BASH_ENV=/root/.bashrc
LOGNAME=root
SSH_CONNECTION=192.168.2.101 4325 192.168.2.120 22
LESSOPEN=|/usr/bin/lesspipe.sh %s
G_BROKEN_FILENAMES=1
_=/usr/local/apache2/bin/httpd
ORACLE_HOME=/opt/oracle/product/10g/OraDB10g
dbh=DBI::db=HASH(0x96e9578)
ERROR ?
============================================================================












----- Original Message ----- 
From: "Stas Bekman" <st...@stason.org>
To: "Jean-Paul COGNET" <je...@toutophone.com>
Cc: <mo...@perl.apache.org>
Sent: Friday, October 29, 2004 5:21 PM
Subject: Re: pb setting NLS_LANG with mod_perl 1.99_14et DBD::Oracle


> Jean-Paul COGNET wrote:
> > I upgrade with the new version of Apache 2.0 (httpd-2.0.52) and mod_perl
> > 1.99_17 and the behaviour is exactly the same.
>
> OK
>
> > If  I set NLS_LANG I obtain this logs just before connect
> > ORACLE_HOME=/opt/oracle/product/10g/OraDB10g
> > NLS_LANG=french_france.WE8ISO8859P1
> > I cannot connect and have this log in Apache
> > DBI connect('TOPDEV5','automate',...) failed: ORA-00604: error occurred
at
> > recursive SQL level 1
> > ORA-01756: quoted string not properly terminated (DBD ERROR:
> > OCISessionBegin) at /var/www/perl/automate1.pl line 1126
> >
> > If  I do not set NLS_LANG I obtain this logs just before connect
> > ORACLE_HOME=/opt/oracle/product/10g/OraDB10g
> > NLS_LANG=
> > and then I can connect but "été" becomes "ete"
>
> Please reread my reply again, besides upgrading I've asked you:
>
>  > What do you get when you print that value from a modperl script? Does
it
>  > show the right setting?
>
> Is that what you mean by 'I obtain this logs'?
>
> And this:
>
>  > Any difference if you use Env::C (from CPAN) to set it (it doesn't do
any
>  > locking, but you shouldn't have a problem, if you are using a prefork
mpm.
>
> -- 
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
>
> -- 
> 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
>


-- 
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: pb setting NLS_LANG with mod_perl 1.99_14et DBD::Oracle

Posted by Stas Bekman <st...@stason.org>.
Jean-Paul COGNET wrote:
> I upgrade with the new version of Apache 2.0 (httpd-2.0.52) and mod_perl
> 1.99_17 and the behaviour is exactly the same.

OK

> If  I set NLS_LANG I obtain this logs just before connect
> ORACLE_HOME=/opt/oracle/product/10g/OraDB10g
> NLS_LANG=french_france.WE8ISO8859P1
> I cannot connect and have this log in Apache
> DBI connect('TOPDEV5','automate',...) failed: ORA-00604: error occurred at
> recursive SQL level 1
> ORA-01756: quoted string not properly terminated (DBD ERROR:
> OCISessionBegin) at /var/www/perl/automate1.pl line 1126
> 
> If  I do not set NLS_LANG I obtain this logs just before connect
> ORACLE_HOME=/opt/oracle/product/10g/OraDB10g
> NLS_LANG=
> and then I can connect but "été" becomes "ete"

Please reread my reply again, besides upgrading I've asked you:

 > What do you get when you print that value from a modperl script? Does it
 > show the right setting?

Is that what you mean by 'I obtain this logs'?

And this:

 > Any difference if you use Env::C (from CPAN) to set it (it doesn't do any
 > locking, but you shouldn't have a problem, if you are using a prefork mpm.

-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
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: pb setting NLS_LANG with mod_perl 1.99_14et DBD::Oracle

Posted by Jean-Paul COGNET <je...@toutophone.com>.
I upgrade with the new version of Apache 2.0 (httpd-2.0.52) and mod_perl
1.99_17 and the behaviour is exactly the same.

If  I set NLS_LANG I obtain this logs just before connect
ORACLE_HOME=/opt/oracle/product/10g/OraDB10g
NLS_LANG=french_france.WE8ISO8859P1
I cannot connect and have this log in Apache
DBI connect('TOPDEV5','automate',...) failed: ORA-00604: error occurred at
recursive SQL level 1
ORA-01756: quoted string not properly terminated (DBD ERROR:
OCISessionBegin) at /var/www/perl/automate1.pl line 1126

If  I do not set NLS_LANG I obtain this logs just before connect
ORACLE_HOME=/opt/oracle/product/10g/OraDB10g
NLS_LANG=
and then I can connect but "été" becomes "ete"

Many Thanks for yoyr help.

----- Original Message ----- 
From: "Stas Bekman" <st...@stason.org>
To: "Jean-Paul COGNET" <je...@toutophone.com>
Cc: <mo...@perl.apache.org>
Sent: Thursday, October 28, 2004 12:58 AM
Subject: Re: pb setting NLS_LANG with mod_perl 1.99_14et DBD::Oracle


> Jean-Paul COGNET wrote:
> > A problem with mod_perl 1.99 et DBD::Oracle.
> >
> > I cannot set the value of NLS_LANG
> >
> > If I set it to any value different from '' then I cannot connect, having
this log in Apache :
> > [Tue Oct 26 12:48:30 2004] [notice] Apache/2.0.47 (Fedora) configured -- 
resuming normal operations
> > DBI connect('TOPDEV5','automate',...) failed: ORA-00604: error occurred
at recursive SQL level 1
> > ORA-01756: quoted string not properly terminated (DBD ERROR:
OCISessionBegin) at /var/www/perl/automate1.pl line 1119
> >
> > If I don't set NLS_LANG it works fine, but of course I have no accent
("été" becomes "ete")
> >
> > It works fine if I don't use mod_perl
> > I use $ENV{NLS_LANG}='french_france.WE8ISO8859P1' just before the
connect and I have accent ("été" stays "été")
>
> What do you get when you print that value from a modperl script? Does it
> show the right setting?
>
> Any difference if you use Env::C (from CPAN) to set it (it doesn't do any
> locking, but you shouldn't have a problem, if you are using a prefork mpm.
>
> In any case, before you continue trying, please first upgrade to 1.99_17
> so we are on the same line.
>
>
> -- 
> __________________________________________________________________
> Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/     mod_perl Guide ---> http://perl.apache.org
> mailto:stas@stason.org http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org   http://ticketmaster.com
>
> -- 
> 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
>


-- 
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: pb setting NLS_LANG with mod_perl 1.99_14et DBD::Oracle

Posted by Stas Bekman <st...@stason.org>.
Jean-Paul COGNET wrote:
> A problem with mod_perl 1.99 et DBD::Oracle.
> 
> I cannot set the value of NLS_LANG
> 
> If I set it to any value different from '' then I cannot connect, having this log in Apache :
> [Tue Oct 26 12:48:30 2004] [notice] Apache/2.0.47 (Fedora) configured -- resuming normal operations
> DBI connect('TOPDEV5','automate',...) failed: ORA-00604: error occurred at recursive SQL level 1
> ORA-01756: quoted string not properly terminated (DBD ERROR: OCISessionBegin) at /var/www/perl/automate1.pl line 1119
> 
> If I don't set NLS_LANG it works fine, but of course I have no accent ("été" becomes "ete")
> 
> It works fine if I don't use mod_perl
> I use $ENV{NLS_LANG}='french_france.WE8ISO8859P1' just before the connect and I have accent ("été" stays "été")

What do you get when you print that value from a modperl script? Does it 
show the right setting?

Any difference if you use Env::C (from CPAN) to set it (it doesn't do any 
locking, but you shouldn't have a problem, if you are using a prefork mpm.

In any case, before you continue trying, please first upgrade to 1.99_17 
so we are on the same line.


-- 
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
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: pb setting NLS_LANG with mod_perl 1.99_14et DBD::Oracle

Posted by Jean-Paul COGNET <je...@toutophone.com>.
Yes. I've read this, and I use a startup.pl script to set ENV when Apache
starts, and it works fine for ORACLE_HOME.
It works if I don't try to set NLS_LANG.
The problem is that if NLS_LANG is set properly I can't connect with this
strange message in Apache's logs about 'quoted string not properly
terminated'


----- Original Message ----- 
From: "Arnaud Blancher" <Ar...@ungi.net>
To: "Jean-Paul COGNET" <je...@toutophone.com>
Cc: <mo...@perl.apache.org>
Sent: Tuesday, October 26, 2004 3:48 PM
Subject: Re: pb setting NLS_LANG with mod_perl 1.99_14et DBD::Oracle


> Jean-Paul COGNET wrote:
>
> > A problem with mod_perl 1.99 et DBD::Oracle.
> >
>
> do you read this ?
>
>
http://perl.apache.org/docs/2.0/user/troubleshooting/troubleshooting.html#C_Libraries_Don_t_See_C__ENV__Entries_Set_by_Perl_Code
>
> Arnaud
>
> > I cannot set the value of NLS_LANG
> >
> > If I set it to any value different from '' then I cannot connect,
> > having this log in Apache :
> > [Tue Oct 26 12:48:30 2004] [notice] Apache/2.0.47 (Fedora) configured
> > -- resuming normal operations
> > DBI connect('TOPDEV5','automate',...) failed: ORA-00604: error
> > occurred at recursive SQL level 1
> > ORA-01756: quoted string not properly terminated (DBD ERROR:
> > OCISessionBegin) at /var/www/perl/automate1.pl line 1119
> >
> > If I don't set NLS_LANG it works fine, but of course I have no accent
> > ("été" becomes "ete")
> >
> > It works fine if I don't use mod_perl
> > I use $ENV{NLS_LANG}='french_france.WE8ISO8859P1' just before the
> > connect and I have accent ("été" stays "été")
> >
> > Any idea ?
> > Thanks you very much.
> >
>
>


-- 
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: pb setting NLS_LANG with mod_perl 1.99_14et DBD::Oracle

Posted by Arnaud Blancher <Ar...@ungi.net>.
Jean-Paul COGNET wrote:

> A problem with mod_perl 1.99 et DBD::Oracle.
>  

do you read this ?

http://perl.apache.org/docs/2.0/user/troubleshooting/troubleshooting.html#C_Libraries_Don_t_See_C__ENV__Entries_Set_by_Perl_Code

Arnaud

> I cannot set the value of NLS_LANG
>  
> If I set it to any value different from '' then I cannot connect, 
> having this log in Apache :
> [Tue Oct 26 12:48:30 2004] [notice] Apache/2.0.47 (Fedora) configured 
> -- resuming normal operations
> DBI connect('TOPDEV5','automate',...) failed: ORA-00604: error 
> occurred at recursive SQL level 1
> ORA-01756: quoted string not properly terminated (DBD ERROR: 
> OCISessionBegin) at /var/www/perl/automate1.pl line 1119
>  
> If I don't set NLS_LANG it works fine, but of course I have no accent 
> ("été" becomes "ete")
>  
> It works fine if I don't use mod_perl
> I use $ENV{NLS_LANG}='french_france.WE8ISO8859P1' just before the 
> connect and I have accent ("été" stays "été")
>  
> Any idea ?
> Thanks you very much.
>  



-- 
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