How do i enable PDO in CPanel using Easy Apache
Asked Answered
K

6

6

I have connected to CPanel and tried to enable PDO for PHP in it.I have checked Many posts which says to find easyApache to enable PDO.But i am not able to find it in my CPanel Home.All i can find are the below functions

enter image description here

Please provide suggestions regarding this issue.Thanks in advance

Kazue answered 20/7, 2013 at 4:22 Comment(3)
It's not possible from cPanel, you will find easyApache in WHM Panel, or you can contact hosting support for thisRecipient
In short, you cannot enable PDO if its not installed and you're not the server owner. PDO is installed by recompiling the PHP with EasyApache setup which is either accessible on the WHM panel or with root access to the server.Elysian
@hemanthkumar have you actually used a php file with <?php if (class_exists('PDO')) { echo "installed"; } else { echo "not installed"; } to make sure it is really not installed ? Or if you use <?php phpinfo(); and search for pdo_mysql or PDO driversElysian
D
4

Goto PHP PEAR Package and Find a PHP Extensions and Applications Package

enter image description here

enter image description here

then install the PDO

if you did not get this option you have to contact your hosting provider

Devitalize answered 20/7, 2013 at 6:24 Comment(1)
On your image it does not list any PDO only libraries derived from it.Elysian
E
4

It is not possible from cPanel

it is possible from WHM, You will find Easy Apache in WHM to configure PHP settings

If you are on shared hosting contact your hosting provider, they will enable it for u

Epic answered 20/7, 2013 at 6:9 Comment(1)
E.g. with SiteGround: cPanel account >> 1H software >> PHP Variables ManagerDevilry
D
4

Goto PHP PEAR Package and Find a PHP Extensions and Applications Package

enter image description here

enter image description here

then install the PDO

if you did not get this option you have to contact your hosting provider

Devitalize answered 20/7, 2013 at 6:24 Comment(1)
On your image it does not list any PDO only libraries derived from it.Elysian
E
2

As mentioned by ManojGeek, PDO can only be enabled in WHM (usually provided/installed by default by the hosting company if you use for example a VPS). If you used shared hosting, simply contact them to enable it.

However once you have access to WHM, follow these steps:

Step One: In WHM search for "EasyApache (Apache Update)".

Step Two: Leave Profile "Default" and scroll to the bottom and click "Build Profile".

Step Three: Select Apache version (best to leave on default) -> Click next.

Step Four: Select a version PHP 5.X (5.5 recommended) -> Click next.

Step Five: Scroll to the bottom and click "Exhaustive Options List".

Step Six: Find PDO and PDO_mySQL and tick checkboxes ->Click "Save and Build".

Important: Do NOT close browser while config running. (takes about 2-5 minutes)

Extract answered 14/6, 2015 at 13:13 Comment(0)
D
0

I am doing this way to enable PDO via cpanel you could use this step. it require suPHP enabled on your cpanel to follow this step.

First, put this code in your .htaccess, edit with what you need.

suPHP_ConfigPath /home/your_cpanel_user/public_html

Then create php.ini in your public_html directory, then add following lines:

extension=php_pdo.dll
extension=php_pdo_firebird.dll
extension=php_pdo_informix.dll
extension=php_pdo_mssql.dll
extension=php_pdo_mysql.dll
extension=php_pdo_oci.dll
extension=php_pdo_oci8.dll
extension=php_pdo_odbc.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll  

This is works for me.

Decolonize answered 7/7, 2014 at 13:57 Comment(0)
P
0

Follow these steps to enable PDO

Open WHM and go to Home » Software » Easy Apache (Apache Update)

Scroll to the bottom and select "Start customizing based on profile"

Click "Next step" twice

Scroll to the bottom and select "Exhaustive Options List"

Select checkboxes for PDO and PDO MySQL, and rebuild Apache

This might be a good time to restart Apache using terminal (# service httpd restart). Hope that helps!

Peterec answered 18/12, 2014 at 5:12 Comment(0)
C
0

I was trying to find a solution and this post is kinda old, here is the solution updated for cpanel:

1 - Log in to cPanel: Log in to your cPanel dashboard using your username and password.

2 - Navigate to "Select PHP Version": Look for the "Software" or "Software/Services" section in your cPanel dashboard and click on "Select PHP Version". If you cannot find this option, you may need to contact your hosting provider for assistance.

3 - choose extentions, and select the ones you want.

Corazoncorban answered 2/4, 2023 at 3:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.