Unable to load dynamic library 'mysqli' #73
-
Hi there, I installed PHP 7.4 on my Mac using home brew using a tutorial: https://getgrav.org/blog/macos-bigsur-apache-multiple-php-versions and I enabled mysql in php.ini The problem is that if I type php in the command line I receive:
It's quite strange because I configured this particular version with apache2 in http.conf and I am able to use this mysql library.
If I run I'd appreciate you help. Thank you in advance. BR, Tomasz |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
To fix this run this command. php --ini It will print the path to loaded configuration file and additional .ini files. Configuration File (php.ini) Path: /usr/local/etc/php/7.4
Loaded Configuration File: /usr/local/etc/php/7.4/php.ini
Scan for additional .ini files in: /usr/local/etc/php/7.4/conf.d
Additional .ini files parsed: /usr/local/etc/php/7.4/conf.d/ext-opcache.ini check these files, if they have a line If you are not able to find any such line, remove the PHP 7.4 along with its configuration and install it again. brew remove [email protected]
sudo rm -rf $(brew --prefix)/etc/php/7.4
brew update
brew install shivammathur/php/[email protected]
brew link --force --overwrite [email protected] Restart your terminal, and test php version |
Beta Was this translation helpful? Give feedback.
-
Thank you.
It works perfectly.
BR,
Tomasz
… Wiadomość napisana przez Shivam Mathur ***@***.***> w dniu 21.12.2020, o godz. 16:53:
To fix this run this command.
php --ini
It will print the path to loaded configuration file and additional .ini files.
For example:
Configuration File (php.ini) Path: /usr/local/etc/php/7.4
Loaded Configuration File: /usr/local/etc/php/7.4/php.ini
Scan for additional .ini files in: /usr/local/etc/php/7.4/conf.d
Additional .ini files parsed: /usr/local/etc/php/7.4/conf.d/ext-opcache.ini
check these files, if they have a line extension=mysqli, please remove that as both mysqli and mysqlnd extensions are compiled statically into php binary and do not need to be loaded using a ini file.
If you are not able to find any such line, remove the PHP 7.4 along with its configuration and install it again.
brew remove ***@***.***
sudo rm -rf /usr/local/etc/php/7.4
brew update
brew install ***@***.***
brew link --force --overwrite ***@***.***
Restart your terminal, and test php version php -v
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#73 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ASHGQIQSYUL3GMGLUHYX55LSV5VQ3ANCNFSM4VEMROUA>.
|
Beta Was this translation helpful? Give feedback.
To fix this run this command.
It will print the path to loaded configuration file and additional .ini files.
For example:
Configuration File (php.ini) Path: /usr/local/etc/php/7.4 Loaded Configuration File: /usr/local/etc/php/7.4/php.ini Scan for additional .ini files in: /usr/local/etc/php/7.4/conf.d Additional .ini files parsed: /usr/local/etc/php/7.4/conf.d/ext-opcache.ini
check these files, if they have a line
extension=mysqli
, please remove that line as bothmysqli
andmysqlnd
extensions are compiled statically into php binary and do not need to be loaded using a ini file.If you are not able to find any such line, remove the PHP 7.4 along with its configuratio…