简体   繁体   English

PHP 启动:无法加载动态库“sqlsrv”

[英]PHP Startup: Unable to load dynamic library 'sqlsrv'

I keep getting this error when trying to use "php artisan migrate"尝试使用“php artisan migrate”时,我不断收到此错误

PHP Warning: PHP Startup: Unable to load dynamic library 'sqlsrv' (tried: E:\xampp\php\ext\sqlsrv (The specified module could not be found), E:\xampp\php\ext\php_sqlsrv.dll (The specified module could not be found)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'sqlsrv' (tried: E:\xampp\php\ext\sqlsrv (The specified module could not be found), E:\xampp\php\ext\php_sqlsrv.dll (找不到指定的模块))在第 0 行的未知中

I'm using laravel and trying to connect to SQL Server我正在使用 laravel 并尝试连接到 SQL 服务器

I'm using PHP 8.0 and using this https://pecl.php.net/package/sqlsrv/5.9.0beta2/windows for the sql driver.我正在使用 PHP 8.0 并使用此https://pecl.php.net/package/sqlsrv/5.9.0beta2/windows用于 ZAC5C74B64B4B8352EF2F181AFFB5AC

In particular I'm using "7.4 Thread Safe (TS) x64" dll file.特别是我正在使用“7.4 Thread Safe (TS) x64”dll 文件。

I looked at many other questions with similar problems and cant get anything to work.我查看了许多其他具有类似问题的问题,但无法解决任何问题。

If you need more information let me know!如果您需要更多信息,请告诉我!

Edit: this is my php.int:编辑:这是我的 php.int:

extension=php_sqlsrv.dll

For those who may have this problem as well.对于那些可能也有这个问题的人。

Make sure you download the right dll for your php version.确保为您的 php 版本下载正确的 dll。

Go here: Go 这里:

https://github.com/microsoft/msphpsql/releases https://github.com/microsoft/msphpsql/releases

On the latest release, click asset at the bottom and download the right dll for your php version在最新版本上,单击底部的资产并为您的 php 版本下载右侧的 dll

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM