Javier Ruiz escribió:
Hi,
I'm using pdo-oci on php-5.2.2 against an oracle-10g server, using
oracle-instantclient (compiled oracle with
'--with-oci8=instantclient,/usr/lib/oracle/10.2.0.3/client/lib').
The problem...:
I make a simple php script that makes a select from a table. The table
contains spanish characters so I set the enviroment variable NLS_LANG to
SPANISH_SPAIN.AL32UTF8 before running apache (also tried other values
that
use iso8859-1...). If I run the script in console (using the CLI
version of
php) the returned data is in the desired collation, so I can see the
spanish
special characters like "ñ", "ó" and so on... The problem is that running
exactly the same script via HTTP (apache2) I always get question marks
replacing the special characters...
I tried many things... I export the enviroment variable as root and as
the
user running the apache daemon, I modified the apache init script to
export
the variables just before starting apache, I tried using the putenv
function
in php code and no luck at all...
I realized about something that maybe is related... a php script
running in
CLI can access any environmental variable, but no any env-var running in
apache... for example the following code: <?php echo getenv("LC_ALL"); ?>
will return my locale setting in CLI but returns nothing via http...
is it
normal?
TIA!
Maybe you have the AddDefaultCharset directive from Apache2 set to
ISO-8859-15 instead of UTF-8 (or even off)? I have worked with php-oci8
and php5.2 without any collation problem this far (using ñ € ans so on...)
--
Miguel J. Jiménez
Programador Senior
Área de Internet/XSL/PHP
migueljose.jimenez@xxxxxxxxxxx
----------------------------------------------------
ISOTROL
Edificio BLUENET, Avda. Isaac Newton nº3, 4ª planta.
Parque Tecnológico Cartuja '93, 41092 Sevilla (ESP).
Teléfono: +34 955 036 800 - Fax: +34 955 036 849
http://www.isotrol.com
"You let a political fight come between you and your best friend you have in all the world. Do you realize how foolish that is? How ominous? How can this country survive if friends can't rise above the quarrel".
Constance Hazard, North & South (book I)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php