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 : [EMAIL PROTECTED]
mobile : 06 19 56 77 96

Reply via email to