0

I want to use imap_append command in my PHP code. But, when I enabled extension=php_imap.dll in the /etc/php.ini file on my Mac, I am seeing following warning when I fire any PHP command:

Example:

php --version

gives output:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20160303/php_imap.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20160303/php_imap.dll, 0x0009): dlopen(): file not found: /usr/lib/php/extensions/no-debug-non-zts-20160303/php_imap.dll in Unknown on line 0

I have already tried installing following but no use:

brew tap kabel/php-ext
brew install php-imap
brew install php@7.1-imap

Any clue?

Lelio Faieta
  • 6,457
  • 7
  • 40
  • 74
Akshay Lokur
  • 6,680
  • 13
  • 43
  • 62
  • A dll is a windows dynamic link library, on a mac this would be a .so (Shared Object) library, doesn't look like you have the proper library for the OS. Take a look here: https://www.php.net/manual/en/install.macosx.php – SPlatten Sep 04 '19 at 06:50
  • @SPlatten ok. What exactly I need to do now? – Akshay Lokur Sep 04 '19 at 07:03
  • I would suggest looking at the link I posted. Also as an alternative you could try wine? I have wine running on my macOS Mojave and use it to run HeidiSQL and other Windows apps. works great. – SPlatten Sep 04 '19 at 07:11
  • I’d suggest you to uninstall php and install it again from home brew. Your .ini has windows formats. It will be a better and easy approach – weegee Sep 04 '19 at 07:25

0 Answers0