snelg / cakephp-3-oracle Goto Github PK
View Code? Open in Web Editor NEWOracle datasource for CakePHP 3.x
License: Apache License 2.0
Oracle datasource for CakePHP 3.x
License: Apache License 2.0
I got this error from CakePHP 3.1 after adding a new (Postresql) database table. The problem was that I created the new table (in the database) with a different user than the one that has access from the web framework. So it is actually a table level permission issue in my case. Just posting this to try to save others (and future self) from spending hours trying to fix something in the framework when the issue is with the database.
Hi,
Not sure where else to post/ask about this but I have project that has Oracle backend.
In setting up I have
When I try to load the root page to see if it's connecting all that is returned is "Database driver Cake\Database\Driver\Oracle could not be found."
Anyone else have similar issues or know if I could have missed a step in installing?
Thank you
Hate to open another issue, but just noticed when implementing pagination in my app that the cakephp paginator sort does not seem to be passed into the Oracle SQL that's created from driver.
The initial query passed from model sorts correctly and adds the "Order By" in the inner select query as expected. But the Order By gets dropped when I try to sort by the cakePHP Paginator Sort option that's on one of the columns. Will try to trace back where it's getting dropped.
.
I have an issue using cakephp-3-oracle where the error shown is as per below:
Error: Unsupported operand types
File C:\xampp\htdocs\Cake3\sso\vendor\snelg\cakephp-3-oracle\src\Schema\OracleSchema.php
Line: 153
This fatal error suddenly showed up after I clone my working web apps inside another computer. I have debug the connection to the oracle database. The connection is alright. When I checked line 153, it falls under the function convertColumnDescription. I don't know where else I can find any information, thus I send this issue here for help.
Hi,
I have noticed that the cakephp paginate limit parameter does not seem to be working when using this plugin. Has anyone else experienced this?
have fairly basic paginate setup in my index action as show below. When I have my app pointed to mysql it paginates fine showing 5 entries on each page and Paginator returns this in view
"Page 1 of 20, showing 5 records out of 99"
However when I switch over to my oracle DB pagination is lost... that is all table entries are shown on first page. The Paginator has correct number of pages, however all entries are shown on page 1 and view renders Paginator as below:
"Page 1 of 7, showing 31 records out of 31"
Are there any special parameters/settings in order to get the limit option passed correctly?
public function index()
{
$this->paginate = [
'limit' => 5,
'order' => ['Articles.created' => 'desc']
];
$this->set('articles', $this->paginate($this->Articles));
$this->set('_serialize', ['articles']);
}
Your driver work with synonyms?
Hi, I am trying to do an UPDATE and I got this error
Warning (2): oci_fetch_assoc(): ORA-24374: define not done before fetch or execute and fetch [ROOT/vendor/yajra/laravel-pdo-via-oci8/src/yajra/Pdo/Oci8/Statement.php, line 231]
Warning (2): oci_error() expects parameter 1 to be resource, null given [ROOT/vendor/yajra/laravel-pdo-via-oci8/src/yajra/Pdo/Oci8/Statement.php, line 610]
Notice (8): Undefined variable: _SESSION [CORE/src/Network/Session.php, line 440]
i'm using cake 3.8.6 and driver 1.2.0 i have this erros:
Deprecated Error: ValuesExpression::values() is deprecated. Use ValuesExpression::setValues()/getValues() instead. - ROOT\vendor\snelg\ cakephp-3-oracle\src\Dialect\OracleDialectTrait.php, line: 61
Hi
I have a CakePHP REST API setup with this Oracle driver plugin and it's been working fine for months. That is records are inserted, and retrieved without issue.
However there is one minor issue when performing a POST request (add action). The JSON returned never returns the newly created ID from Oracle. I'm setup on Oracle 11g and have necessary sequence/triggers setup to create new IDs upon insert but all I ever receive is the response below w/ ID = 0:
{ "success": true, "data": { "id": 0 } }
With same code using MySQL the ID is always returned.
I'm using Crud Add action for the REST post request to insert new record.
Just wondering if anyone else has experienced this and if there's a solution (and if it is from oracle side or not).
Thanks in advance.
One moment while associations are detected.
Exception: Cannot describe s_u_s_e_r_s. It has 0 columns. in [/var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Database/Schema/Collection.php, line 98]
2016-01-21 12:12:27 Error: [Cake\Database\Exception] Cannot describe s_u_s_e_r_s. It has 0 columns.
Stack Trace:
#0 /var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Database/Schema/CachedCollection.php(64): Cake\Database\Schema\Collection->describe('s_u_s_e_r_s', Array)
#1 /var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/ORM/Table.php(423): Cake\Database\Schema\CachedCollection->describe('s_u_s_e_r_s')
#2 /var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/ORM/Table.php(499): Cake\ORM\Table->schema()
#3 /var/www/html/3.0/app-master/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(194): Cake\ORM\Table->primaryKey()
#4 /var/www/html/3.0/app-master/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(110): Bake\Shell\Task\ModelTask->getAssociations(Object(Cake\ORM\Table))
#5 /var/www/html/3.0/app-master/vendor/cakephp/bake/src/Shell/Task/ModelTask.php(96): Bake\Shell\Task\ModelTask->bake('SUSERS')
#6 /var/www/html/3.0/app-master/vendor/cakephp/bake/src/Shell/BakeShell.php(250): Bake\Shell\Task\ModelTask->main('SUSERS')
#7 /var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Collection/CollectionTrait.php(51): Bake\Shell\BakeShell->Bake\Shell{closure}('SUSERS', 0)
#8 /var/www/html/3.0/app-master/vendor/cakephp/bake/src/Shell/BakeShell.php(253): Cake\Collection\Collection->each(Object(Closure))
#9 [internal function]: Bake\Shell\BakeShell->all('SUSERS')
#10 /var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Console/Shell.php(443): call_user_func_array(Array, Array)
#11 /var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(212): Cake\Console\Shell->runCommand(Array, true, Array)
#12 /var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(179): Cake\Console\ShellDispatcher->_dispatch(Array)
#13 /var/www/html/3.0/app-master/vendor/cakephp/cakephp/src/Console/ShellDispatcher.php(126): Cake\Console\ShellDispatcher->dispatch(Array)
#14 /var/www/html/3.0/app-master/bin/cake.php(33): Cake\Console\ShellDispatcher::run(Array)
#15 {main}
Just run into infamous Oracle ORA-00972: identifier is too long issue.
CakePHP forms queries with convention select tableName.field_name as "tableName__field_name" which generates ORA-00972 error in 11g database. Did not test 12c yet.
With this request;
$dbResults = ConnectionManager::get('webconsult')
->newQuery()
->select([
'field1',
'field2',
'field3'
])
->from('DB.TABLE')
->where([
'field1 IN' => [
'a',
'b'
]
])
->execute()
->fetchAll('assoc');
This request generate this sql request:
SELECT field1, field2, field3 FROM DB.TABLE WHERE field1 in ('a','b')
But I only get the result for a and not for b
And if I do this;
$dbResults = ConnectionManager::get('webconsult')
->execute("SELECT field1, field2, field3 FROM DB.TABLE WHERE field1 in ('a','b')")
->fetchAll('assoc');
I get the 2 resutls.
I try the same with a other table on mysql and the first syntax work
I missing something?
I using Cakephp 3.2.0-RC1 and this work on prev version
Strict (2048): Cake\Database\Driver and Cake\Database\Driver\PDODriverTrait define the same property ($_connection) in the composition of Cake\Oracle\Driver\Oracle. This might be incompatible, to improve maintainability consider using accessor methods in traits instead. Class was composed [ROOT\vendor\snelg\cakephp-3-oracle\src\Driver\Oracle.php, line 237]
Code Context
Cake\Core\BasePlugin::{closure}() - ROOT\vendor\cakephp\debug_kit\config\bootstrap.php, line 42
include - ROOT\vendor\snelg\cakephp-3-oracle\src\Driver\Oracle.php, line 237
Composer\Autoload\includeFile - ROOT\vendor\composer\ClassLoader.php, line 444
Composer\Autoload\ClassLoader::loadClass() - ROOT\vendor\composer\ClassLoader.php, line 322
spl_autoload_call - [internal], line ??
class_exists - [internal], line ??
Cake\Database\Connection::setDriver() - CORE\src\Database\Connection.php, line 172
Cake\Database\Connection::__construct() - CORE\src\Database\Connection.php, line 119
Cake\Datasource\ConnectionRegistry::_create() - CORE\src\Datasource\ConnectionRegistry.php, line 88
Cake\Core\ObjectRegistry::load() - CORE\src\Core\ObjectRegistry.php, line 96
Cake\Datasource\ConnectionManager::get() - CORE\src\Datasource\ConnectionManager.php, line 204
DebugKit\Panel\SqlLogPanel::initialize() - ROOT\vendor\cakephp\debug_kit\src\Panel\SqlLogPanel.php, line 50
DebugKit\ToolbarService::initializePanels() - ROOT\vendor\cakephp\debug_kit\src\ToolbarService.php, line 196
DebugKit\Middleware\DebugKitMiddleware::__invoke() - ROOT\vendor\cakephp\debug_kit\src\Middleware\DebugKitMiddleware.php, line 52
Cake\Http\Runner::__invoke() - CORE\src\Http\Runner.php, line 65
Cake\Http\Runner::run() - CORE\src\Http\Runner.php, line 51
Cake\Http\Server::run() - CORE\src\Http\Server.php, line 97
Hi, I was not able to find other means to contact you.
I am very interested in Oracle driver for CakePHP3. Will you continue to develop it to add full functionality? Would you be able to share expected release timelines?
I can offer to help you, although I am not an expert in PHP. I do know Oracle DB failrly well.
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.