Imagick not loading - php

So I just installed imagemagic using homebrew and then also linked to php.ini file.
However, if I run php command on terminal now, I get this error :-
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php71-imagick/3.4.3_4/imagick.so' - dlopen(/usr/local/Cellar/php71-imagick/3.4.3_4/imagick.so, 9): Library not loaded: /usr/local/opt/imagemagick/lib/libMagickWand-7.Q16HDRI.3.dylib
Referenced from: /usr/local/Cellar/php71-imagick/3.4.3_4/imagick.so
Reason: image not found in Unknown on line 0
I'm unable to understand it. What might be the reason for this error?

I have the save problem, and this solution helps me:
brew reinstall -s php71-imagick

Related

GRPC Installation - Unable to load dynamic library 'grpc.so'

After getting my problem solved on this brilliant ansewer on how to get Pear running with success on Mac OS, I'm in trouble with the below errors while I'm trying to install and configure GRPC according to this google instruction
I understand that the problem is that the system is "Unable to load dynamic library 'grpc.so'"
Please can anybody give me a path on how to solve those issues or maybe show me what I'm doing wrong?
I'm running my localhost with PHP 8 served by MAMP
Thank you very much!!
composer require "grpc/grpc:^1.38"
PHP Warning: PHP Startup: Unable to load dynamic library 'grpc.so' (tried: /usr/lib/php/extensions/no-debug-non-zts-20180731/grpc.so (dlopen(/usr/lib/php/extensions/no-debug-non-zts-20180731/grpc.so, 0x0009): dlopen(): file not found: /usr/lib/php/extensions/no-debug-non-zts-20180731/grpc.so), /usr/lib/php/extensions/no-debug-non-zts-20180731/grpc.so.so (dlopen(/usr/lib/php/extensions/no-debug-non-zts-20180731/grpc.so.so, 0x0009): dlopen(): file not found: /usr/lib/php/extensions/no-debug-non-zts-20180731/grpc.so.so)) in Unknown on line 0
My solution is just create directory by run command
"mkdir /usr/local/lib/php/pecl"
In my case, I am using PHP 7.4 in MacOS. When I ran the
pecl install grpc
... command; it installed the .../20190902/grpc.so inside the current PHP version folder, so, I just copy-paste the grpc.so in the right path mentioned in console:
php#7.4/7.426_1/pecl/20190902/grpc.so --> /usr/local/lib/php/pecl/20190902/grpc.so
I hope this can be helpful to anybody!

When I want to see my php version, use the command "php -v", there show some warnings. How to solve it?

When I want to see my php version, use the command php -v, there show some warnings. How to solve it?
PHP Warning: PHP Startup: Unable to load dynamic library
'/Applications/Server.app/Contents/ServerRoot/usr/lib/php/extensions/no-debug-non-zts-20121212/pdo_pgsql.so'
- dlopen(/Applications/Server.app/Contents/ServerRoot/usr/lib/php/extensions/no-debug-non-zts-20121212/pdo_pgsql.so,
9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library
'/Applications/Server.app/Contents/ServerRoot/usr/lib/php/extensions/no-debug-non-zts-20121212/pdo_pgsql.so'
- dlopen(/Applications/Server.app/Contents/ServerRoot/usr/lib/php/extensions/no-debug-non-zts-20121212/pdo_pgsql.so,
9): image not found in Unknown on line 0
You have a php configuration file that try to loads the pdo_pgsql.so library, but the library isn't installed correctly.
You can either disable the library loading by removing the configuration directive loading it (you should have something like this:extension=pdo_pgsql.so) or install the pdo for php correctly.

Unable to load dynamic library openssl.so

I just set up PHP and Apache on a Mac 10.8 localhost. So far it works fine.
I am now installing Symfony2. When I run the Composer install command, I get the following error :
$ curl -s http://getcomposer.org/installer | php
#!/usr/bin/env php
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The openssl extension is missing, which means that secure HTTPS transfers are impossible.
If possible you should enable it or recompile php with --with-openssl
I uncommented the following line in php.ini :
extension=php_openssl.dll
But I still get the same error, preceded by this message :
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll' - dlopen(/usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll' - dlopen(/usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll, 9): image not found in Unknown on line 0
There's no openssl.so file in my /usr/local/lib/php/extensions/no-debug-non-zts-20131226/ folder indeed.
I tried reinstalling php but it made no difference. I googled for hours yet I couldn't find a way to recompile php with --with-openssl. Any help would be of great value.

Change PHP extensions from version

I do not know how or why, but when I restarted my computer, my 'memcached' extension did not work anymore. After looking into it I saw that the extension.so-files of my PHP installation were installed into a o-debug...2012 folder. When I run php -i in terminal, it says this:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20100525/memcached.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20100525/memcached.so, 9): image not found in Unknown on line 0
So, I guess I have the wrong version of this extension installed. Is there a way to fix this?

PHP Startup: Unable to load dynamic library json.so wrong architecture

I'm using laravel and thus require the command line to run artisan commands.
When doing so, php gives me the following errors:
"Warning: PHP Startup: Unable to load dynamic library '/usr/local/zend/lib/php_extensions/json.so' - dlopen(/usr/local/zend/lib/php_extensions/json.so, 9): no suitable image found. Did find:
/usr/local/zend/lib/php_extensions/json.so: mach-o, but wrong architecture in Unknown on line 0"
When checking "which php" it points to the right version (of zend server) as I've added that to my path variable.
which php
/usr/local/zend/bin/php
Any idea what can be done to solve this?
Ok, what I did was the following:
edit /usr/local/zend/etc/conf.d/json.ini and comment out the line that loads the json.so file
PHP doesn't throw errors at that point.
JSON support still seems enabled as far as I can see.
php -i | grep "json support"
json support => enabled

Categories