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

Call to undefined function oci_connect() #3

Closed
NShvetsov93 opened this issue Jun 17, 2016 · 3 comments
Closed

Call to undefined function oci_connect() #3

NShvetsov93 opened this issue Jun 17, 2016 · 3 comments

Comments

@NShvetsov93
Copy link

in C:\OpenServer\domains\sitename\vendor\apaoww\yii2-oci8\pdo\Oci8PDO.php at line 80.
server: Apache-PHP7-nginx 1.9
php.ini : all lines with 'oci' commented out.
help who knows.

@apaoww
Copy link
Owner

apaoww commented Jun 17, 2016

Hi,

I been try to use this extension on php7 but never success. for now I just stick to php 5.6.

@apaoww
Copy link
Owner

apaoww commented Jan 24, 2017

I have tried this extension with PHP 7 and I successfully connect to Oracle database with:
environment : ubuntu 14.04
php: PHP 7.0.15-1+deb.sury.org~trusty+1 (cli) (built: Jan 20 2017 09:16:11) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
oci8 : version 2.1.3
oracle : 11g
This is example code configuration for main-local.php
`<?php

$dsn = "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=yoursid)))";

return [
'components' => [
'log' => [
'targets' => [
[
'class' => 'yii\log\DbTarget',
'enabled' => false,
],
[
'class' => 'yii\log\FileTarget',
'enabled' => false,
],
[
'class' => 'yii\log\SyslogTarget',
'enabled' => false,
]
],
],
'db' => [
'class' => 'apaoww\oci8\Oci8DbConnection',
'dsn' => 'oci8:dbname=' . $dsn . ';', // Oracle
'username' => 'database_username',//
'password' => 'database_password',//
'attributes' => [
],
],
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail',
// send all mails to a file by default. You have to set
// 'useFileTransport' to false and configure a transport
// for the mailer to send real emails.
'useFileTransport' => true,
],
],
];`

@apaoww apaoww closed this as completed Jan 24, 2017
@apaoww
Copy link
Owner

apaoww commented Sep 15, 2022

in C:\OpenServer\domains\sitename\vendor\apaoww\yii2-oci8\pdo\Oci8PDO.php at line 80. server: Apache-PHP7-nginx 1.9 php.ini : all lines with 'oci' commented out. help who knows.

Did you manage to solve this issue. To use this extension you must have oci8 install and before that make sure you download oracle instant client 12c and above. Make sure to set path of the instant client in you system environment. For new version already support php 8.1 just to let you know.

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

No branches or pull requests

2 participants