A Wahab
A Wahab

Reputation: 41

missing mysql extension in MAMP

I'm just shifting from wamp to mamp on windows.

Through mamp every thing is working perfectly (WordPress or PHP Projects).

1) In cmd when I work with wp-cli.phar file, it's give me the following error

your php installation appears to be missing the mysql extension which is required by wordpress

I check the php.ini files, extension path is perfect, php_mysql.dll isn't here. then I change PHP version 5.6.13 here I have php_mysql.dll extension but problem is same.

2) Also set the environment variable C:\MAMP\bin\php\php7.0.0;

When I check PHP Variable Path with phpinfo(); path are

Why it show wamp and mamp both path ?

Both problem have relation with each other ?

Upvotes: 0

Views: 5763

Answers (1)

Shadow
Shadow

Reputation: 34231

The path variable holds the windows OS' path environment variable's contents. Apparently, you have multiple versions of php installed: v5.5 and v7.0 and MAMP uses v7.0.

If you check out mysql's documentation on mysql extension, you will see that:

This extension is deprecated as of PHP 5.5.0, and has been removed as of PHP 7.0.0. Instead, either the mysqli or PDO_MySQL extension should be used. See also the MySQL API Overview for further help while choosing a MySQL API.

So, if you want to keep using mysql extension, then you need to downgrade the php version you use.

The other option is to upgrade to at least wordpress v3.9 because it can use mysqli extension instead of mysql.

Upvotes: 2

Related Questions