0

when I run the command

php artisan serve

it's run but it show to me this error

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_pdo_mysql.dll' - /usr/lib/php/20151012/php_pdo_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pdo_mysql.so' - /usr/lib/php/20151012/pdo_mysql.so: undefined symbol: pdo_parse_params in Unknown on line 0

Community
  • 1
  • 1
Amor.o
  • 491
  • 8
  • 21
  • Doesn't seem related to Laravel or artisan, it's a php startup error so check your ini file and remove the erroneous libraries. You should never have a .dll line for linux. – Devon Bessemer Mar 26 '18 at 20:50
  • yes i think that because i use it from my php in windows -_- how can i change it ? – Amor.o Mar 26 '18 at 21:02
  • better install php using wamp (http://www.wampserver.com/en/) (P.S it installs apache and mysql along with php) if you are a beginner, it mostly installls all php extensions required for your laravel developlement – Anand Siddharth Mar 27 '18 at 06:10

1 Answers1

0

This a PHP installation problem. I had this problem on my linux distro. Here's a few things you can do:

(Optional) Uninstall PHP; Reinstall PHP;

Edit php.ini . This is how you find path to edit php.ini on windows.

Now check if the above lines are uncomented: extension=pdo.so extension=pdo_mysql.so

If they are, its recommended to uninstall/reinstall PHP or manually install function on windows.

Remember to restart apache server after change php.ini file.

Marcelo Agimóvel
  • 1,668
  • 2
  • 20
  • 25