I want to install Composer on my Ubuntu 14.04LTS. But during installation I got this:
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
Then in php.ini I remove semicolon';' in line ;extension=php_openssl.dll
After this I've got:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll' - /usr/local/lib/php/extensions/no-debug-non-zts-20131226/php_openssl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.6.2 (cli) (built: Oct 29 2014 06:55:23)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
Where can I get this library?
You use php.ini from windows machine. Use default from package manager. For Ubuntu apt-get.
Related
We have a requirement that needs to downgrade PHP from 8.1 to 7.1 in our Ubuntu 18 server.
sudo update-alternatives --set php /usr/bin/php7.1
After the downgrade, we're seeing PHP Startup error everytime we check php -v
Below is the exact error text:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/propro.so' - /usr/lib/php/20160303/propro.so: 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/20160303/raphf.so' - /usr/lib/php/20160303/raphf.so: 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/20160303/http.so' - /usr/lib/php/20160303/http.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 7.1.33-47+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Jun 27 2022 08:15:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.33-47+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
The missing libraries are really not found in the said directory as I checked.
/usr/lib/php/20160303
We have tried reinstalling as suggested from other forum with same error.
sudo apt-get install --reinstall `dpkg -l | grep 'ii php7.1' | awk '{ printf($2" "); next}'`
It works for them but not in ours.
I hope I can get help here. Thanks in advance.
By the way, I'm not a Linux and PHP developer. Just starting getting into it.
--reinstall will only reinstall the things that are installed, but it looks like you actually removed a number of modules. The propro, raphf, and http modules are not standard and are not installed by default. If you don't actually need/use them, you can just disable them so that they don't try to load:
phpdismod propro raphf http
However, if your app requires these modules, you'll need to explicitly add them:
apt install php7.1-propro php7.1-raphf php7.1-http
Yesterday I tried to install php-gd for php7.2.15 on Ubuntu 18.04 lts. Today when Ubuntu got updated it installed php5.6 php7.0 php7.1 php7.3 beside my php7.2. I think I did something wrong but now I just don't want these versions on my server It's a server holding website and app so can't play with it, php -v now shows:
PHP Warning: PHP Startup: Unable to load dynamic library
'pdo_mysql.so' (tried: /usr/lib/php/20180731/pdo_mysql.so
(/usr/lib/php/20180731/pdo_mysql.so: undefined symbol:
pdo_parse_params), /usr/lib/php/20180731/pdo_mysql.so.so
(/usr/lib/php/20180731/pdo_mysql.so.so: cannot open shared object
file: No such file or directory)) in Unknown on line 0 PHP
7.3.2-3+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Feb 8 2019 15:43:57) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine
v3.3.2, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.2-3+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
But phpinfo file is normal not mentioning anything irregular and everything is functioning like normal, but I'd like to keep my server clean so any advice?
Try to find the pdo_mysql.so file manually using find
Edit your php.ini file so it points to the right location of this file.
Most likely php mysql library got overwritten as a result of installation of multiple versions of php. Also make sure you are editing the right php.ini file.
I have High Sierra OS - Version 10.13.6
PHP Version: PHP 7.1.9
when I try to do command php -v always appear error like this:
PHP Startup: Unable to load dynamic library
'/usr/local/php5-7.1.9-20170914-100859/lib/php/extensions/no-debug-non-zts-20160303/imagick.so'
- dlopen(/usr/local/php5-7.1.9-20170914-100859/lib/php/extensions/no-debug-non-zts-20160303/imagick.so,
9): Library not loaded:
/usr/local/opt/imagemagick/lib/libMagickWand-7.Q16HDRI.5.dylib
Referenced from:
/usr/local/php5-7.1.9-20170914-100859/lib/php/extensions/no-debug-non-zts-20160303/imagick.so
Reason: image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library
'/usr/local/php5-7.1.9-20170914-100859/lib/php/extensions/no-debug-non-zts-20160303/imagick.so'
- dlopen(/usr/local/php5-7.1.9-20170914-100859/lib/php/extensions/no-debug-non-zts-20160303/imagick.so,
9): Library not loaded:
/usr/local/opt/imagemagick/lib/libMagickWand-7.Q16HDRI.5.dylib
Referenced from:
/usr/local/php5-7.1.9-20170914-100859/lib/php/extensions/no-debug-non-zts-20160303/imagick.so
Reason: image not found in Unknown on line 0 PHP 7.1.9 (cli) (built:
Sep 14 2017 10:05:35) ( NTS ) Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.1.9, Copyright (c) 1999-2017, by Zend Technologies
with Xdebug v2.5.3, Copyright (c) 2002-2017, by Derick Rethans
AFAIK, my php.ini failed to load imagick library.
I already install Imagick with brew,
there is a file imagick.so inside folder /usr/local/php5-7.1.9-20170914-100859/lib/php/extensions/no-debug-non-zts-20160303/.
I already search many sources for this issue, I found many similar issues too in StackOverflow, it seems similar to mine but still not fixed my issue.
I can still run PHP script obviously, but cannot do some manipulation image with Imagick.
Try:
sudo pecl uninstall imagick && sudo pecl install imagick
For debugging I suggest you move the dep to a folder easy to debug, such as in /User/<you>/Documents/. You can load it from the absolute path:
extention="/User/<you>/Documents/<project and check if it's a path issue.
I think that you are trying to install the dependency that is older than the current version of PHP, because you are loading the extention from php56 but you are using php71
https://stackoverflow.com/a/50529784/5893008
I recently upgraded my VPS PHP version to 7.0.3 and everything seems to work fine including php -v which shows:
(I know I'm getting some warnings but those shouldn't be anything serious)
Failed loading /usr/local/lib/ioncube/ioncube_loader_lin_5.3.so: /usr/local/lib/ioncube/ioncube_loader_lin_5.3.so: undefined symbol: execute
PHP Warning: PHP Startup: suhosin: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20151012
These options need to match
in Unknown on line 0
PHP 7.0.3 (cli) (built: Feb 14 2016 00:24:25) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
I'm using directadmin and so I created a file index.php in the public_html and this is its content:
<?php
error_reporting(E_ALL);
echo md5("sometext");
phpinfo();
?>
The output is only:
a29e90948f4eee52168fab5fa9cfbcf8
Why are md5 and echo working but not phpinfo???
I'm on Centos and using PHP 7.0.3 with Apache (httpd) 2.4.9
phpinfo() is disabled for free accounts on that particular hosting provider
if youhave access to php.ini
Go to the php.ini and remove phpinfo from
disable_functions =...,phpinfo,....
save and restart webserver
I used Homebrew to install PHP versions 5.4 and 5.5 on my system. However, it seems that even after installing and linking to php55 my computer is still trying to run the version initially used by the system.
php --version
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/php_openssl.dll' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/php_openssl.dll, 9): image not found in Unknown on line 0
PHP 5.3.26 (cli) (built: Jul 7 2013 19:05:08)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
I believe Homebrew sets up PHP under '/usr/local/lib' and not '/usr/lib/'.
What do I need to do to correctly have my system use the Homebrew version of PHP?
You have to put /usr/local/bin at the front of your $PATH. In your ~/.bashrc file, add something like
export PATH="$(brew --prefix)/bin:${PATH}"