D
D
darkrain2013-09-24 11:01:49
PHP
darkrain, 2013-09-24 11:01:49

Pdo oci, process crashes when charset=utf8 is specified?

In general, without specifying the encoding, I get such warnings, plus the answer comes in the wrong encoding, respectively, it is not clear what the default is.

PDOStatement::fetchAll(): column 3 data was too large for buffer and was truncated to fit it in

Specified encoding:
$conn = new PDO('oci:dbname=//[host]/orcldb;charset=UTF8',$db_username,$db_password);

php just started crashing, no errors at all, just no response and the process crashes.
I set the oci extension according to this article
Where to dig then? And I would like to understand how to debug such things

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
darkrain, 2013-09-24
@darkrain

In general, I prevented the crash, thanks to AloneCoder for the tip, I set up the environment by adding the following to php-fpm.conf:

env[ORACLE_HOME]=/opt/oracle/instantclient
env[LD_LIBRARY_PATH]=/opt/oracle/instantclient/lib
env[NLS_LANG]="RUSSIAN_RUSSIA.AL32UTF8"
env[NLS_DATE_FORMAT]="YYYY-MM-DD HH24:MI:SS"
env[NLS_LENGTH_SEMANTICS]=CHAR
env[NLS_NUMERIC_CHARACTERS]=".,"

Plus , the advice here is good.

M
Max, 2013-09-24
@AloneCoder

There is a good comment in the article , have you tried it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question