How can I connect to the oracle database in the kohana framework? thank you.

Source: Internet
Author: User
Tags kohana
Excuse me, how can I connect to the oracle database under the kohana framework? thank you! how can I use the pdo in the kohana framework to connect to the oracle database? thank you!
Use the original tns.


Reply to discussion (solution)

Done
; Extension = php_pdo_oci.dll
; Extension = php_pdo_oci8.dll
Both services must be enabled.
Sample code for connecting to Pdo_oci in the Kohana framework:
'Test' => array
(
'Type' => 'pdo ',
'Connection' => array (
/**
* The following options are available for MySQL:
*
* String hostname server hostname, or socket
* String database name
* String username database username
* String password database password
* Boolean persistent use persistent connections?
* Array variables system variables as "key => value" pairs
*
* Ports and sockets may be appended to the hostname.
*/
'Dsn '=> 'Oss: dbname = // xxx. xx ',
'Hostname' => 'hostname ',
'Database' => 'Database name ',
'Username' => 'username ',
'Password' => 'password ',
'Persistent' => FALSE,
),
'Table _ prefix' => '',
'Charset' => 'gb2312 ',
'Caching' => FALSE,
'Filing' => TRUE,
)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.