1

I'm recently updated to php 7.1, however im getting this warning whenever i do php -v

I'm running mac Os El Captain

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php@7.1/7.1.18/lib/php/20160303/imagick.so' - dlopen(/usr/local/Cellar/php@7.1/7.1.18/lib/php/20160303/imagick.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php@7.1/7.1.18/lib/php/20160303/imagick.so' - dlopen(/usr/local/Cellar/php@7.1/7.1.18/lib/php/20160303/imagick.so, 9): image not found in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-imagick/imagick.so' - dlopen(/usr/local/opt/php71-imagick/imagick.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php71-imagick/imagick.so' - dlopen(/usr/local/opt/php71-imagick/imagick.so, 9): image not found in Unknown on line 0 PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0

Warning: Module 'mcrypt' already loaded in Unknown on line 0

I tried doing

brew reinstall -s php71-imagick

and i get this

No available formula with the name "php@7.1-imagick".

Any suggestions on how to fix this ?

BARNOWL
  • 3,326
  • 10
  • 44
  • 80

1 Answers1

2

Following this tutorial helped

https://jason.pureconcepts.net/2016/09/upgrade-php-mac-os-x/

i pretty much just removed php71

and did

curl -s http://php-osx.liip.ch/install.sh | bash -s 7.1

open the terminal and

open .bash_profile

and add the line

export PATH=/usr/local/php5/bin:$PATH

and now we have this

PHP 7.1.13 (cli) (built: Feb 1 2018 13:38:42) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.13, Copyright (c) 1999-2017, by Zend Technologies with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans Users-iMac-2:~ poweruser$ clear

Works fine NOW !

BARNOWL
  • 3,326
  • 10
  • 44
  • 80