I am using XAMPP on windows and i am using PDO to connect to my database. However, i am having a could not find driver error on my webpage. I have seen many questions based on this error. But most of the solutions was to enable the PDO_mysql. As seen in the image below, my pdo_mysql is already enabled and i have already put the proper extensions and dir configuration on my php.ini. Nothing seem to work. Here is the error msg:
object(PDOException)[2]
protected 'message' => string 'could not find driver' (length=21)
private 'string' (Exception) => string '' (length=0)
protected 'code' => int 0
protected 'file' => string 'C:\xampp\htdocs\phpTest\index.php' (length=33)
protected 'line' => int 56
private 'trace' (Exception) =>
array (size=1)
0 =>
array (size=6)
'file' => string 'C:\xampp\htdocs\phpTest\index.php' (length=33)
'line' => int 56
'function' => string '__construct' (length=11)
'class' => string 'PDO' (length=3)
'type' => string '->' (length=2)
'args' =>
array (size=3)
...
private 'previous' (Exception) => null
public 'errorInfo' => null
public 'xdebug_message' => string '<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> PDOException: could not find driver in C:\xampp\htdocs\phpTest\index.php on line <i>56</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='le'... (length=1171)