As stated in the title, I would like to connect to DB2(v9.5) from PHP 5.6, but an error occurred and I cannot connect.
Error Contents
[IBM] [CLI Driver] SQL0332N Character conversion from the source code page "819" to the target code page "UNKNOWN" is not supported.SQLSTATE=57017SQLCODE=-332
Connected From Information
Connecting Information
The code set of the target DB is IBM-943, and I was able to access other DBs that were built with Unicode, so I think it's okay with the source environment.
I thought it would work if I could set the UNKNOWN part of the error, but when I set DB2 CODEPAGE in the Windows environment variable and hit the following command, the display didn't change.
db2set DB2CODEPAGE=943
If you know how to solve this problem, please cooperate.
php database
Self-resolved.
The problem was that the environment variables were not included when running PHP, so I was able to connect successfully by adding DB2CODEPAGE=943 to /etc/sysconfig/httpd.
Thank you for your cooperation.
© 2024 OneMinuteCode. All rights reserved.