Under Linux, PHP connects oracle through pdo to report 503 error.

1, oci and pdo_oci extensions all have

2. The database code is ZHS16GBK

.

3. The encoding is set to UTF-8, but the result is in Chinese.

new \PDO("oci:dbname=//192.168.1.168:1521/orcl;charset=UTF-8", "bi", "bi");

4. Set the code to ZHS16GBK to report 503 directly

new \PDO("oci:dbname=//192.168.1.168:1521/orcl;charset=ZHS16GBK ", "bi", "bi");
Mar.20,2021
Menu