Reputation: 7428
I'm following the tutorial on the link below to compile PDO's DBLIB driver in my Mac Os Mojave.
https://github.com/BellevueCollege/public-docs/blob/master/PHP/configure-mssql-pdodblib-mac.md
Problem is, when i run the code below :
$ cd php-7.2.9/ext/pdo_dblib
$ phpize
$ ./configure --with-php-config=/usr/bin/php-config --with-pdo-dblib=/usr/local/
$ make
$ sudo cp modules/pdo_dblib.so /usr/lib/php/extensions/no-debug-non-zts-20121212
Specifically on this command :
$ ./configure --with-php-config=/usr/bin/php-config --with-pdo-dblib=/usr/local/
I get this error :
configure: error: Cannot find php_pdo_driver.h.
Any ideas please ? I've been trying for the last 2 hours : /
Thanks
Upvotes: 3
Views: 2391
Reputation: 7428
After 3 days struggling with this issue, i could find what was wrong.
Because i installed another PHP version in my machine (7.2.9), is was installed not in the default MacOS Mojave folder /usr/bin/php, but instead on /usr/local/php5-7.2.9-20180821-074958
. Because of this, on the command below i'd need to change from :
./configure --with-php-config=/usr/bin/php-config --with-pdo-dblib=/usr/local/
To
./configure --with-php-config=/usr/local/php5-7.2.9-20180821-074958/bin/php-config --with-mssql=/usr/local/
After that i could compile the extesion properly.
Upvotes: 2
Reputation: 1246
actually PDO is included on PHP core. You must install the PHP and MySQL bundled packages.
And follow the following steps to install dblib
PDO DBLIB Driver for MS SQL Server : Cannot find php_pdo_driver.h
Check out this solution also: error: cannot find php_pdo_driver.h while installing pdo_mysql
Upvotes: 3