-2

First, this is my first post & I have spent the last five hours trying to read all I can to solve this.

I am new to PHP/mySQL, on Windows, using MAMP, PHP version 7.4.1 and trying to access phpMyAdmin, which gave me the famous error "the mysqli extension is missing", that is why I started researching on this.

After trying every solution I found on the internet (uncommenting lines in php.ini, running a script to see if extensions were loading, downgrading to PHP version 7.3.7, uninstalling & reinstalling MAMP, etc) and running many tests I finally understood part of the problem I was having :

• every time I set php.ini to display errors (deleting the ";" before the two lines & setting display_errors on "On"), it mysteriously changes the extension_dir I can see in the php.info page to another directory. I can't change it back using php.ini (it doesn't work), thus the extension mysqli.dll won't load (I can check it doesn't with a script). I have tried putting it in a new directory I created to match the path it said, but it doesn't work either.

• when I revert the php.ini file to not displaying errors (that is, when I add the two ; back where they were before), the extension_dir changes back to the right repertory and it works! The extensions load and I can access phpMyAdmin.

It doesn't make any sense at all to me. Maybe deleting just one ";" in the php.ini causes the extension_dir to change to something else, but I don't get why, especially when every php tutorial I've read tells me that it's the way to displaying errors.

I would like to keep seeing my code errors AND access phpMyAdmin via MAMP, and at this point my brain feels like mashed potatoes, so if you have any idea of what is going on here...

  • Does this answer your question? [Extension mysqli is missing, phpmyadmin doesn't work](https://stackoverflow.com/questions/10769148/extension-mysqli-is-missing-phpmyadmin-doesnt-work) – nbk Sep 15 '20 at 18:47
  • No unfortunately it doesn't, and I forgot to mention it in the post but I'm on windows! – seobeginner78 Sep 15 '20 at 19:40
  • so use this one https://stackoverflow.com/questions/6617288/phpmyadmin-windows-xampp-missing-mysql-extension-issue – nbk Sep 15 '20 at 19:45

1 Answers1

0

Alright I found what caused the problem and it was text in the php.ini I forgot to remove!