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" <[EMAIL PROTECTED]> To: "Jean-Paul COGNET" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED] 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