0

I'm using windows 10 with XAMPP.

When I run php artisan migrate I get this error: enter image description here

I have looked this problem up and most say to change the php.ini file, but that has not really helped. For example

Artisan migrate could not find driver

says to "simply uncomment the extension:

;extension=php_pdo_mysql.dll" I can't do that though since it simply does not exist in my php.ini file and if I just try to add it, nothing happens.

Another

php artisan migrate command error : could not find driver

claims that uncommenting the ";extension=pdo_mysql" to "extension=pdo_mysql" worked, but that was always uncommented for me.

Also in my database.php file i changed

enter image description here

to

enter image description here

(https://www.reddit.com/r/laravel/comments/6i0sak/i_get_errors_when_i_try_to_run_a_migration/) but that didn't do anything either (although I didnt mess with the unix_socket thing since I dont think that applies to me).

Any ideas? This is really annoying lol.

LTM
  • 527
  • 1
  • 9
  • 18
  • Are you sure you are looking at the right `php.ini` file? What folder are you looking in – RiggsFolly Nov 22 '18 at 00:00
  • 2
    Try `>php --ini` and look at the `Loaded Configuration File` line in the output to see where PHP is getting its ini file from – RiggsFolly Nov 22 '18 at 00:02
  • Haha. Turns out that I have 2 versions of php. One in my c drive and one inside XAMMP. Uncommented the pdo thing in the php.ini of the php in my c drive. Works now. Thanks! – LTM Nov 22 '18 at 00:15
  • No, thats wrong. Take the PHP on C out of your PATH and replace it with the XAMPP folder – RiggsFolly Nov 22 '18 at 00:20

0 Answers0