Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
5be16133
Commit
5be16133
authored
Oct 30, 2011
by
Benjamin Eberlei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add warning on pdo_oracle usage and implemented DBAL-141
parent
08e6c483
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
8 deletions
+18
-8
Driver.php
lib/Doctrine/DBAL/Driver/OCI8/Driver.php
+5
-5
Driver.php
lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php
+13
-3
No files found.
lib/Doctrine/DBAL/Driver/OCI8/Driver.php
View file @
5be16133
...
@@ -25,7 +25,7 @@ use Doctrine\DBAL\Platforms;
...
@@ -25,7 +25,7 @@ use Doctrine\DBAL\Platforms;
/**
/**
* A Doctrine DBAL driver for the Oracle OCI8 PHP extensions.
* A Doctrine DBAL driver for the Oracle OCI8 PHP extensions.
*
*
* @author Roman Borschel <roman@code-factory.org>
* @author Roman Borschel <roman@code-factory.org>
* @since 2.0
* @since 2.0
*/
*/
...
@@ -60,11 +60,11 @@ class Driver implements \Doctrine\DBAL\Driver
...
@@ -60,11 +60,11 @@ class Driver implements \Doctrine\DBAL\Driver
$dsn
.=
'(PORT=1521)'
;
$dsn
.=
'(PORT=1521)'
;
}
}
$dsn
.=
'))'
;
if
(
isset
(
$params
[
'service'
])
&&
$params
[
'service'
]
==
true
)
{
if
(
isset
(
$params
[
'dbname'
]))
{
$dsn
.=
'))(CONNECT_DATA=(SERVICE_NAME='
.
$params
[
'dbname'
]
.
')))'
;
$dsn
.=
'(CONNECT_DATA=(SID='
.
$params
[
'dbname'
]
.
')'
;
}
else
{
$dsn
.=
'))(CONNECT_DATA=(SID='
.
$params
[
'dbname'
]
.
')))'
;
}
}
$dsn
.=
'))'
;
}
else
{
}
else
{
$dsn
.=
$params
[
'dbname'
];
$dsn
.=
$params
[
'dbname'
];
}
}
...
...
lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php
View file @
5be16133
<?php
<?php
/*
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
...
@@ -23,6 +21,14 @@ namespace Doctrine\DBAL\Driver\PDOOracle;
...
@@ -23,6 +21,14 @@ namespace Doctrine\DBAL\Driver\PDOOracle;
use
Doctrine\DBAL\Platforms
;
use
Doctrine\DBAL\Platforms
;
/**
* PDO Oracle driver
*
* WARNING: This driver gives us segfauls in our testsuites on CLOB and other
* stuff. PDO Oracle is not maintained by Oracle or anyone in the PHP community,
* which leads us to the recommendation to use the "oci8" driver to connect
* to Oracle instead.
*/
class
Driver
implements
\Doctrine\DBAL\Driver
class
Driver
implements
\Doctrine\DBAL\Driver
{
{
public
function
connect
(
array
$params
,
$username
=
null
,
$password
=
null
,
array
$driverOptions
=
array
())
public
function
connect
(
array
$params
,
$username
=
null
,
$password
=
null
,
array
$driverOptions
=
array
())
...
@@ -53,7 +59,11 @@ class Driver implements \Doctrine\DBAL\Driver
...
@@ -53,7 +59,11 @@ class Driver implements \Doctrine\DBAL\Driver
$dsn
.=
'(PORT=1521)'
;
$dsn
.=
'(PORT=1521)'
;
}
}
$dsn
.=
'))(CONNECT_DATA=(SID='
.
$params
[
'dbname'
]
.
')))'
;
if
(
isset
(
$params
[
'service'
])
&&
$params
[
'service'
]
==
true
)
{
$dsn
.=
'))(CONNECT_DATA=(SERVICE_NAME='
.
$params
[
'dbname'
]
.
')))'
;
}
else
{
$dsn
.=
'))(CONNECT_DATA=(SID='
.
$params
[
'dbname'
]
.
')))'
;
}
}
else
{
}
else
{
$dsn
.=
'dbname='
.
$params
[
'dbname'
];
$dsn
.=
'dbname='
.
$params
[
'dbname'
];
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment