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.
Related
when I run the command
php artisan serve
it's run but it show to me this error
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_pdo_mysql.dll' - /usr/lib/php/20151012/php_pdo_mysql.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pdo_mysql.so' - /usr/lib/php/20151012/pdo_mysql.so: undefined symbol: pdo_parse_params in Unknown on line 0
This a PHP installation problem. I had this problem on my linux distro. Here's a few things you can do:
(Optional)
Uninstall PHP;
Reinstall PHP;
Edit php.ini . This is how you find path to edit php.ini on windows.
Now check if the above lines are uncomented:
extension=pdo.so
extension=pdo_mysql.so
If they are, its recommended to uninstall/reinstall PHP or manually install function on windows.
Remember to restart apache server after change php.ini file.
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) .
I tried to execute this command to install Symfony on my localhost
php -r "readfile('http://symfony.com/installer');" > symfony.phar
I got an error message in my Windows machine regarding this.
The error message is PHP Startup: Unable to load dynamic library 'D:\php\php\ext\intl.so' - The specified module could not found.
It is all about the php.ini file. On windows, the dynamic library files usually do not have the extesion .so (linux library) ... you have to have .dll there... and make sure the referenced file exists.
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?