-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[php7/oci] Showcase of 💥 #18425
Comments
So is it a related to doctrine and php7 - or php7 only? |
@DeepDiver1975 Propose this as test case to doctrine? 🙈 |
No - because the values are fine until doctrine passes them to oci .... looks like a bug to be reported to php ... |
Upstream report: https://bugs.php.net/bug.php?id=70302 |
pure oci script shows it's a doctrine error - sweet shit <?php
function e($e) {
if (!$e) {
$e = oci_error();
var_dump($e);
exit;
}
}
$conn = oci_connect('autotest', 'owncloud', '172.17.0.1/XE');
e($conn);
// drop table
$stid = oci_parse($conn, 'DROP TABLE TEST');
e($stid);
$r = oci_execute($stid);
e($r);
// create
$stid = oci_parse($conn, 'CREATE TABLE TEST(A VARCHAR2(4000) NOT NULL, B VARCHAR2(4000) NOT NULL, C VARCHAR2(4000) NOT NULL)');
e($stid);
$r = oci_execute($stid);
e($r);
// insert
$stid = oci_parse($conn, 'INSERT INTO TEST (A, B, C) VALUES(:a, :b, :c)');
e($stid);
$a = 1;
$b = 2;
$c = 3;
oci_bind_by_name($stid, ':a', $a);
oci_bind_by_name($stid, ':b', $b);
oci_bind_by_name($stid, ':c', $c);
$r = oci_execute($stid); // executes and commits
e($r);
// select
$stid = oci_parse($conn, 'SELECT * FROM TEST');
e($stid);
$r = oci_execute($stid); // executes and commits
e($r);
$data = oci_fetch_array($stid, OCI_ASSOC+OCI_RETURN_NULLS);
var_dump($data); |
Issue as reported in the doctrine issue tracker - http://www.doctrine-project.org/jira/browse/DBAL-1283 |
I'm out of this game ... I don't get it |
Looks like the issue got nailed down a bit more - https://bugs.php.net/bug.php?id=71148 |
Considered not a bug by PHP:
|
Any workarounds? |
This has to be fixed upstream - doctrine/dbal#2262 |
@DeepDiver1975 just tried out your example with Doctrine master: <?php
namespace Doctrine\Tests\DBAL\Functional\Driver\OCI8;
use Doctrine\DBAL\Driver\OCI8\Driver;
use Doctrine\Tests\DbalFunctionalTestCase;
class StatementTest extends DbalFunctionalTestCase
{
protected function setUp()
{
if (! extension_loaded('oci8')) {
$this->markTestSkipped('oci8 is not installed.');
}
parent::setUp();
if (! $this->_conn->getDriver() instanceof Driver) {
$this->markTestSkipped('oci8 only test.');
}
}
public function testPhp7()
{
try {
$this->_conn->executeUpdate('DROP TABLE TEST');
} catch (\Exception $e) {}
$this->_conn->executeUpdate('CREATE TABLE TEST(A VARCHAR2(4000) NOT NULL, B VARCHAR2(4000) NOT NULL, C VARCHAR2(4000) NOT NULL)');
$this->_conn->insert('TEST', [
'A' => '1',
'B' => '2',
'C' => '3']);
$all = $this->_conn->fetchAll('select * from TEST');
var_dump($all);
}
}
Weird I don't get an error... |
@DeepDiver1975 ah nevermind I thought this was about |
@DeepDiver1975 we are working hard on this and I think we are close to a solution. As soon as we got this fixed I will tag a new DBAL release. |
Thanks a lot @deeky666 - we are on 2.5.4 at the moment - can we discuss to backport this fix to the 2.5 branch? Happy to help out. Cheers |
@DeepDiver1975 yes we will backport this to 2.5. |
@DeepDiver1975 Any update ? Still an issue ? |
Still waiting for dbal 2.6 being released - up to now there have been no backports of the necessary fixes to 2.5.x |
fixed with #26946 |
@DeepDiver1975 this should have been fixed with |
If I remember correctly we still had issues with 2.5.5 .. but I don't remember ... |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The text was updated successfully, but these errors were encountered: