Installing PDO_MYSQL - PDO drivers not loading

CharlesRock

Registered
Mar 13, 2011
2
0
51
I ran easyApache with PDO and PDO mysql enabled.

When I view PHPINFO, configure command includes

Code:
'--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-sqlite=shared'
it shows one table for PDO which shows PDO Drivers under the heading PDO Support, and 'no value' under the heading Enabled

When I check PHP.INI I see the folllowing:


Code:
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613"
..
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so
and in the above directory I have the following files:
Code:
-rwxr-xr-x 1 root root  136008 Mar 13 19:30 pdo_mysql.so*
-rwxr-xr-x 1 root root  304656 Mar 13 19:30 pdo.so*
-rwxr-xr-x 1 root root 1703444 Mar 13 19:30 pdo_sqlite.so*
-rwxr-xr-x 1 root root 1307195 Mar 13 19:30 sqlite.so*
I'm not sure why the PDO drivers are not enabled?
 

CharlesRock

Registered
Mar 13, 2011
2
0
51
Well I added the extension section of the php.ini to the local php.ini for the account in question, and it is working now. Strange?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
If you have a local php.ini file, you must copy the full php.ini to that local account copy, then revise any select settings you want changed. If you do not copy the full php.ini file, several options will not be included in the account's php.ini at all (including IonCube Loader, Zend Optimizer, and so on).
 

luigidelgado

Well-Known Member
Nov 6, 2010
119
5
68
Mexico
cPanel Access Level
Root Administrator
Twitter
I'm having the same problem. I have register globals off for main php.ini for security reasons. Im unable to make PDO module work. I have some clients using Magento and its mandatory for them to make it work. Unable to make local php.ini's work... even using suphp on htaccess will fail...

any ideas how to solve this? HELP!!

Edit: forgot to say I have copied the whole php.ini in user folder, double checked extensions were there, checked the server and PDO is there (in fact at first it wasnt so I compiled again with PDO) but no luck...

I have CSF installed and I think I may have disabled something for security reasons that is blocking this.
 
Last edited: