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
Related
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
I've recompiled PHP sources to enable zts but now PDO no longer works, when I try to execute a script with a pdo instantiation i get this error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-zts-20131226/pdo_mysql.so' - /usr/lib/php/extensions/no-debug-zts-20131226/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
and when I try php -i i get the same error.
I think that maybe my extension dir is no longer what it used to be before I recompiled php sources.
So i tried to do ln -s /usr/lib/php5/20131226/pdo_mysql.so /usr/lib/php/extensions/no-debug-zts-20131226/ but it also failed
I was getting similar errors with Codeigniter 3 and Ubuntu 14.04.
Check if your PDO extension is installed.
Or try comment out line of that extension in php.ini file (this is how I'm get rid of this error) .
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.
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.
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?