I'm running Mac Catalina and want to remove the php version to downgrade to php7.2 possibly use brew from now on.
At the moment I have this.
I don't care much about the error but want I want to achieve is removing completely remove 7.3.11 and then reinstall from brew. I can't find anything about replacing php that is not coming from brew. Please help.
$ php -v
PHP Warning: PHP Startup: Unable to load dynamic library 'php_imap.dll' (tried: /usr/lib/php/extensions/no-debug-non-zts-20180731/php_imap.dll (dlopen(/usr/lib/php/extensions/no-debug-non-zts-20180731/php_imap.dll, 0x0009): dlopen(): file not found: /usr/lib/php/extensions/no-debug-non-zts-20180731/php_imap.dll), /usr/lib/php/extensions/no-debug-non-zts-20180731/php_imap.dll.so (dlopen(/usr/lib/php/extensions/no-debug-non-zts-20180731/php_imap.dll.so, 0x0009): dlopen(): file not found: /usr/lib/php/extensions/no-debug-non-zts-20180731/php_imap.dll.so)) in Unknown on line 0
PHP 7.3.11 (cli) (built: Jun 5 2020 23:50:40) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
I found myself how to do it. I was looking at my user folder while the .profile file was in the root folder. Then I just put this inside:
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
If you want to change the php version see the versions you have in /usr/local/opt/ and change the .profile file. Just reboot after the change.
I hope it will help somebody.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With