php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71928 Charset in DSN for Interbase/Firefox not working
Submitted: 2016-03-31 06:03 UTC Modified: 2016-04-04 12:30 UTC
From: b dot vonheesen at maprom dot de Assigned:
Status: Closed Package: PDO Firebird
PHP Version: 7.0.4 OS: Ubuntu 14.04 LTS 64-Bit
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: b dot vonheesen at maprom dot de
New email:
PHP Version: OS:

 

 [2016-03-31 06:03 UTC] b dot vonheesen at maprom dot de
Description:
------------
Description:
------------
Starting position:
Ubuntu 14.04 LTS 64-Bit, PHP 7.0.4
Interbase with dialect 1

If a charset is added at the end of the DSN other values will be returned by SELECT.

With old ibase_* commands it works as expected.

Test script:
---------------
$pdo1 = new PDO("firebird:dbname=......");
$stmt1 = $pdo1->query("SELECT COUNT(*) FROM mytable");
$res1 = $stmt->fetchAll();
$pdo2 = new PDO("firebird:dbname=......;charset=utf8");
$stmt2 = $pdo2->query("SELECT COUNT(*) FROM mytable");
$res2 = $stmt->fetchAll();
$pdo3 = new PDO("firebird:dbname=......;charset=UTF8");
$stmt3 = $pdo3->query("SELECT COUNT(*) FROM mytable");
$res3 = $stmt->fetchAll();
$pdo4 = new PDO("firebird:dbname=......;charset=UTF-8");
$stmt4 = $pdo3->query("SELECT COUNT(*) FROM mytable");
$res4 = $stmt->fetchAll();
$pdo5 = new PDO("firebird:dbname=......;charset=utf-8");
$stmt5 = $pdo5->query("SELECT COUNT(*) FROM mytable");
$res5 = $stmt->fetchAll();



Expected result:
----------------
$res1 = 40998
$res2 = 40998
$res3 = 40998
$res4 = 40998
$res5 = 40998

Actual result:
--------------
$res1 = 40998
$res2 = 650
$res3 = 5
$res4 = PDO-Exception "SQLSTATE[HY000] [335544325] bad parameters on attach or create database"
$res5 = PDO-Exception "SQLSTATE[HY000] [335544325] bad parameters on attach or create database"

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-04 12:30 UTC] b dot vonheesen at maprom dot de
-Status: Open +Status: Closed
 [2016-04-04 12:30 UTC] b dot vonheesen at maprom dot de
Sorry, our Interbase server was misconfigured, now it's working.

Topic can be closed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC