Why doesn't PHP see MAMP's MySQL PDO driver?

倖福魔咒の 提交于 2019-12-11 04:12:52

问题


Out of the box I only see sqlite under PDO drivers from phpinfo().

I saw the extensions folder is correct which has pdo_mysql.so.

My php.ini has: extension=pdo_mysql.so

Not sure why PHP is only registering the one driver.

Meanwhile I know the MySQL server is running fine via MAMP by connecting in workbench.

This is all in PHP 5.6.2.

EDIT

So I have PHP installed from default on my Mac. I also have MAMP which puts PHP in a different location. For example php -v will give me 5.4, for the default location. MAMPs php is elsewhere and on the more recent version.

/Applications/MAMP/bin/php/php5.6.2/bin/php -v gives 5.6.2 /Applications/MAMP/bin/php/php5.6.2/bin/php -m | grep pdo gives:

pdo_mysql
pdo_pgsql
pdo_sqlite

Here is a screenshot of my phpinfo just for sanity's sake

EDIT 2

Seems related to “pdo_mysql” is disabled and I can't get it enabled. I have MAMP v. 3.0.4 installed on my iMac 7.1 OSX 10.6.8 but I can't find the duplicate folder this user talks about

EDIT 3

This dialog wasn't lying. Using the trial for Pro fixed this "issue". However deleting Pro and launching MAMP still failed. Clearly an issue with MAMP. Opened a support ticket with them and I'll write here when I get an answer of sorts

来源:https://stackoverflow.com/questions/27792878/why-doesnt-php-see-mamps-mysql-pdo-driver

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!