Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

rdiyto's avatar

PHP Warning: PHP Startup: Unable to load dynamic library 'php_pdo.dll'

When I run php artisan serve on my Laravel project, this error message appears:

PHP Warning:  PHP Startup: Unable to load dynamic library 'php_pdo.dll' (tried: ext\php_pdo.dll (The specified module could not be found), ext\php_php_pdo.dll.dll (The specified module could not be found)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'php_pdo.dll' (tried: ext\php_pdo.dll (The specified module could not be found), ext\php_php_pdo.dll.dll (The specified module could not be found)) in Unknown on line 0
Starting Laravel development server: http://127.0.0.1:8000
[Mon Nov 27 15:49:46 2023] PHP Warning:  PHP Startup: Unable to load dynamic library 'php_pdo.dll' (tried: ext\php_pdo.dll (The specified module could not be found), ext\php_php_pdo.dll.dll (The specified module could not be found)) in Unknown on line 0
[Mon Nov 27 15:49:46 2023] PHP 8.2.4 Development Server (http://127.0.0.1:8000) started

What do I have to do?

0 likes
10 replies
Thunderson's avatar

you have to check php.ini and remove comma before

// from
;extension=pdo_mysql
//to
extension=pdo_mysql

then restart apache server

rdiyto's avatar

@Thunderson Yes, I have removed the comma and restart apache server. It doesn't works.

Thunderson's avatar

if you are starting in web dev i think you should use Linux as your OS. do you work with xamp or something similar ?

JussiMannisto's avatar

What have you done up to this point to get that error? How did you install PHP?

I can see there's some confusion. You're trying to run PHP on Windows but also trying to run apt-get which is a Linux package manager.

1 like
JussiMannisto's avatar

@rdiyto I assume you mean a semicolon. If you remove the semicolon, PHP tries to load the PDO extension during startup. You get this error because the extension doesn't exist or you have misconfigured something in PHP, like the extension directory.

Laravel requires the PDO extension.

Please or to participate in this conversation.