Cara menggunakan enable pdo_mysql ubuntu

How to enable PDO in WHM/cPanel

This guide shows you how to enable the PDO module within cPanel/WHM using Easy Apache.

1. Log in to WHM ( https://yourIPaddress:2087)

2. Go to WHM »Software »EasyApache (Apache Update)

3. Select "Previously Saved Config (** DEFAULT **)" and click "Start customizing based on profile"

4. On the "Apache Version" page click "Next"

5. On the "PHP Version" page click "Next"

6. On the "Short Options List" page click"Exhaustive Options List"

7. On the "Exhaustive Options List" ensure that PDO, PDO sqlite and PDO MySQL are selected.

8. Then Click save & Build on the bottom of the page.

If your using cPanel to run your server, then it’s very simple to enable PDO & PDO_MYSQL within the WHM.

Access your WHM and navigate to your EasyApache.
Home >> Software >> EasyApache (Apache Update).

First, begin by selecting a profile to load.
Previously Saved Config (**DEFAULT**)
! This option loads the last saved configuration. If the configuration is missing, then default values will be provided.
Continue through the build process, until you reach the Exhaustive Options List section. When you reach the Exhaustive Options List, rebuild with PDO & PDO_MYSQL enabled. With PHP 5.3, PDO & PDO_MYSQL options are available, however by default they are disabled.

Prior to using cPanel, I attempted to install PDO & PDO_MYSQL via command and have spent a considerable amount of time installing with no prevail.. Using cPanel, it took me 2 minutes with EasyApache rebuilding in the background for about 12 minutes.

If your not using cPanel and have SSH access, then use command lines to install PDO & PDO_MYSQL.

Bellow, are a couple of suggested methods..

First,
Use PUTTY look up PHP version in order to determine suggested install.

[~]# php -v
PHP 5.3.17 (cli) (built: Oct 15 2012 22:06:55)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

According to source: http://www.webhostingtalk.com/showthread.php?t=1119422
Run the following command:

[~]# yum install php-pdo
This command resolved the forum post above, however I was unable to install.

Then I came across a blog ‘ForLinux’, offering instructions on how to install PDO & PDO_MYSQL using PECL: http://www.forlinux.co.uk/expertise/blog/2012/07/30/installing-pdo-and-pdo_mysql-extensions-on-cpanel-server/

I opened my PUTTY and followed instructions to no prevail.

As suggested by website ehow.com, I used the command# –enable-pdo
No prevail..

Conclusion,
Using cPanel saved me tremendous amount of time, as I would be on an expedition looking to resolve a simple task..


Resources:

cPanel Documentation: The Apache Web Server with cPanel & WHM.

how to enable or install pdo extansion for php , i cant use easyapache and i cant find php.ini in WHM

after install script on host i get this error:

 Fatal error: Class 'PDO' not found in /home/jafar/public_html/model/db.cls.php on line 29 

script dont have any problem and work correctly on localhost.i think if i can install or enable it can successfull run and install script.

asked Jul 1, 2013 at 12:14

You can enable PDO in cPanel if you have cloudlinux installed. In cPanel search for PHP Version and on the resulting screen select and enable PDO and finally select save. * http://docs.cloudlinux.com/index.html?using_php_selector.html

If you do not have CloudLinux and PhpSelector installed you will need an administrator account to install PDO through easyapache. In WHM follow this guide:

Enabling PDO in Easyapache

  1. Log in to WHM ( http://domain.com/whm )
  2. Goto WHM »Software »EasyApache (Apache Update)
  3. Select "Previously Saved Config (** DEFAULT **)" and click "Start customizing based on profile"
  4. On the "Apache Version" page click "Next"
  5. On the "PHP Version" page click "Next"
  6. On the "Short Options List" page click"Exhaustive Options List"
  7. On the "Exhaustive Options List" ensure that PDO, PDO sqlite and PDO MySQL are selected.
  8. Then Click save & Build on the bottom of the page.

answered Oct 7, 2013 at 2:33

Follow the rebuild answer, and if it runs on browser calls and not in cli calls, run php-cli --ini and it points to /usr/local/bin/php.ini. Edit the file with nano /usr/local/bin/php.ini or vim /usr/local/bin/php.ini and add the following:

extension=pdo.so
extension=pdo_sqlite.so
extension=pdo_mysql.so

Applicable to Centos.

Cara menggunakan enable pdo_mysql ubuntu

Excellll

12.5k11 gold badges50 silver badges78 bronze badges

answered Dec 15, 2015 at 13:47

How can I tell if MySQL PDO is installed?

Generally you can just do phpinfo(); to find out what modules are installed. Additionally you could use: class_exists('PDO') to find out whether the PDO class indeed is accessible.

What do you mean by PDO?

PDO is an acronym for PHP Data Objects. PDO is a lean, consistent way to access databases. This means developers can write portable code much easier. PDO is not an abstraction layer like PearDB. PDO is a more like a data access layer which uses a unified API (Application Programming Interface).