PHP Startup: Unable to load dynamic library 'openssl'

Discussion in 'Installation/Configuration' started by Emerson Amaro de araujo, Nov 30, 2022.

Tags:
  1. yesterday I ran apt-get apt-update but I noticed that after this update when I run php -v the result is the following

    php -v
    PHP Warning: PHP Startup: Unable to load dynamic library 'openssl' (tried: /usr/lib/php/20190902/openssl (/usr/lib/php/20190902/openssl: cannot open shared object file: No such file or directory ), /usr/lib/php/20190902/openssl.so (/usr/lib/php/20190902/openssl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
    PHP Warning: Module 'sockets' already loaded in Unknown on line 0
    PHP 7.4.33 (cli) (built: Nov 8 2022 11:33:35) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

    can anyone help how i fix this difficulty??
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Do you know what operating system is running on that host?
    Are the necessary PHP modules installed? Find out which module provides openssl.
    Are all services running? I do not know your OS, on Debian GNU/Linux I would check with
    Code:
    systemctl --state=failed
     
  3.  
  4. michelangelo

    michelangelo Active Member

    How did you install this PHP version?
    It is missing the openssl library, according to the error message.
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Since you are running ISPConfig, you should start with this:
    https://forum.howtoforge.com/threads/please-read-before-posting.58408/
    Plus, you should have posted on ISPConfig forum.
    Anyway, like I wrote in #2 and @michelangelo in #4, check openssl module for the PHP version you are running is installed.
    That is not a valid command. What did you upgrade? Any error messages during upgrade?
     
  6. the command used was
    apt-get update
    apt-get upgrade

    I ran the tests
    https://forum.howtoforge.com/threads/please-read-before-posting.58408/

    As I said it was working until yesterday
    everything is still working correctly until the php sites that were working

    but if I install a new one, it already presents difficulties
     
  7. pyte

    pyte Well-Known Member HowtoForge Supporter

    Disable the openssl extension in your php.ini. I think it's in the path "/etc/php/7.4/cli/php.ini", yours might differ.
    There should be a line that states: "extension=openssl" comment that out with a ";" at the beginning, and rerun "php -v".
    It should still work after that. You can make sure with "php -i | grep -i openssl"
     

Share This Page