Skip to content
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

Bake a model when you are connected to an oracle database #8

Closed
hanuka opened this issue May 10, 2016 · 5 comments
Closed

Bake a model when you are connected to an oracle database #8

hanuka opened this issue May 10, 2016 · 5 comments

Comments

@hanuka
Copy link

hanuka commented May 10, 2016

Is it possible to use bake tool to bake a model when you are connected to a oracle database?
I tried to use bake model and I get this
Exception: Database driver CakeDC\OracleDriver\Database\Driver\OracleOCI cannot be used due to a missing PHP extension or unmet dependency in [/var/www/html/test/vendor/cakephp/cakephp/src/Database/Connection.php, line 169]

@skie
Copy link
Member

skie commented May 20, 2016

There is something with oci extension for php for your installation.
Please check if php compiled correctly with this extension or if you using windows check if it is enabled.

@aconcetto
Copy link

aconcetto commented Aug 5, 2016

Exception: Database driver CakeDC\OracleDriver\Database\Driver\OracleOCI cannot be used due to a missing PHP extension or unmet dependency in [/var/www/html/sistemas/base/vendor/cakephp/cakephp/src/Database/Connection.php, line 170]
2016-08-05 14:41:14 Error: [Cake\Database\Exception\MissingExtensionException] Database driver CakeDC\OracleDriver\Database\Driver\OracleOCI cannot be used due to a missing PHP extension or unmet dependency
screenshot from 2016-08-05 10-49-44

I got this error trying to use cake bake, the oci library its running the main project says that its connected, even y have make some tests in pure php code and it connects to the database and i can make CRUD operations. what can i do?

@tn-info
Copy link

tn-info commented Oct 6, 2016

Same problem using cake bake with the plugin.
I use Windows 10, WampServer 3.0.6 (64bit) with Apache 2.4.23, PHP 5.6.27 and PHP 7.0.10. PHP 7 is activated.
I use CakePHP 3.3.5 and the master branch of the Oracle plugin (with case correction for foreign keys). Oci is activated.
Everything works fine from the browser, database connection and CRUD.
But I have exactly the same error as mentioned above.

@skie
Copy link
Member

skie commented Oct 7, 2016

The possible reason could be described here http://stackoverflow.com/a/22771081
In two works there are separate php.ini files for console and for web server.
If you on windows use command
php -i | findstr /R /C:"oci"
to check if you have oci8 added here.

In *nix systems use
php -i | grep oci
for same task.

@tn-info
Copy link

tn-info commented Oct 12, 2016

Indeed, the problem was related to WampServer 3.0.6 (64bit).
In the "\bin\php\php7.0.10\php.ini" file line "extension=php_oci8_12c.dll" was absent as she is present and uncommented in the "\bin\apache\apache2.4.23\bin\php.ini".
Problem solved for me. Thank you very much @skie .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants