Home / Tutorials / Fatal error: Undefined class constant ‘MYSQL_ATTR_INIT_COMMAND’

Fatal error: Undefined class constant ‘MYSQL_ATTR_INIT_COMMAND’

This error occurs when you are using PDO to connect with MySQL database server and pdo_mysql extension is not enabled/installed in your server.

Solution:

if you are working in localhost or dedicated server then you cab enable pdo_mysql extension yourself. You can enable this extension from php.ini file. Generally in linux system  php.ini file is path is : /etc/php5/apache2/php.ini.

To enable pdo_mysql extension in shared hosting serve you need to contact hosting server support.

About cmadmin

Web Developer & Designer | Android App Developer

Leave a Reply

Your email address will not be published. Required fields are marked *

Login


Username
Create an Account!
Password
Forgot Password? (close)

Sign Up


Username
Email
Password
Confirm Password
Want to Login? (close)

Forget Password?


Username or Email
(close)
%d bloggers like this:
SHARE
OR
SUBSCRIBE
To get latest new / tutorial / technology / development information subscribe with us.
ARE YOU READY? GET IT NOW!
Lets Get Updated with latest trends & tutorials!
Your Information will never be shared with any third party.
Ready for latest tutorials & tools !
OR SUBSCRIBE WITH