apaoww / yii2-oci8

Yii2 Oracle Oci8 Driver
11 stars 12 forks source link

Call to undefined function oci_connect() #3

Closed NShvetsov93 closed 7 years ago

NShvetsov93 commented 8 years ago

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 commented 8 years ago

Hi,

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

apaoww commented 7 years ago

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 commented 2 years ago

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.