John Davidson

linux - "PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/http.so'" after downgraded PHP from 8.1 to 7.1

0 comments
Message:


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.



My Answer:
Linux is a free and open-source operating system that is based on the Unix operating system. It is widely used in servers, desktops, and embedded systems. Linux is known for its stability, security, and flexibility, and it is popular among developers and system administrators. There are many different distributions of Linux, such as Ubuntu, Fedora, and CentOS, each with its own unique features and package management systems.

Rate this post

5 of 5 based on 6234 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us