简体   繁体   中英

Enabling PDO_OCI in PHP

I have been using oci_ in PHP but I would like to start using PDO.

I have read http://www.php.net/manual/en/ref.pdo-oci.php but I'm not sure how to enable PDO_OCI. I see the command listed on the page but I installed PHP using sudo apt-get install php5 and not via the source.

<?php
print_r(PDO::getAvailableDrivers());
?>

shows

Array
(
    [0] => mysql
)

Can someone help as the PHP website does not have much information other than that single command? I understand it is experimental but I would like to try it, I just can't find much information on it.

Install the PDO_OCI drivers using pecl. This tutorial may help: Installing PHP & Oracle PDO Drivers on Ubuntu

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM