Hi @tavares,
Sounds like PHP extension for MySQL is not active.. Check your php.ini file, it's called something like php_pdo_mysql... you probably just need to uncomment it.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi people,
I'm using os x and i have installed VM with sql server, so, i'm trying connect to database with mamp, php and freetds.
For install freetds and compile php to obtain mssql.so i was guided by this link: http://pt.stackoverflow.com/questions/529/como-utilizar-o-freetds-com-mamp-no-mac-os
After that i set up the virtual box port fowarding and run the command: tsql -H 127.0.0.1 -p 2222 -U admin -P admin and this made the connection so i think this is no freetds problem.
In respect about php i was the 5.6 version and i set the php.ini that was showed in mamp phpinfo() and also put php.ini file into $PATH.
In phpinfo() i have the extension mssql:
https://i.stack.imgur.com/xZSUj.png
In laravel project i have this connection
'dbname' => [ 'driver' => 'sqlsrv', 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '2222'), 'database' => env('DB_DATABASE', 'dbname'), 'username' => env('DB_USERNAME', 'admin'), 'password' => env('DB_PASSWORD', 'admin'), 'charset' => 'utf8', 'prefix' => '', ],
I also verified if mamp is using the correct php version.
I don't know what i have to do more, i'm in this for days and i can't understand why this not work.
Anyone can help me? There is something that i don't have done?
SOLUTION:
I have to install also the pdo_dblib extension and turn on the directive mssql.secure_connection on mssql extension and works.
Thank you.
Please or to participate in this conversation.