PHP Warning: PHP Startup: Unable to load dynamic library 'openssl.so' #1565
-
problem I have been unable to resolve for two daysAnyone know how to fix the openssl.so not found error?
summary - what i triedafter macOS update to Big Sur 11.7.3, brew uninstall --ignore-dependencies openssl
brew uninstall --ignore-dependencies openssl
brew install openssl
# put openssl first in the path
brew tap shivammathur/php
brew install shivammathur/php/php@7.4
# edit php.ini, httpd.conf, and verify ~/.bashrc
# tested
brew unlink php && brew link --overwrite --force php@7.4
brew services restart php@7.4
# check http://localhost:8080/info.php
brew install shivammathur/php/php@8.1
# edit php.ini, httpd.conf, and verify ~/.bashrc
brew unlink php && brew link --overwrite --force php@8.1
# tested by brew services restart httpd and php@8.1
# check http://localhost:8080/info.php
# installed [PHP switcher script](https://gist.github.com/rhukster/f4c04f1bf59e0b74e335ee5d186a98e2)
# check with
sphp 7.4
sphp 8.1 Install 8.2brew install shivammathur/php/php@8.2
brew unlink php && brew link --overwrite --force php@8.2
# edit php.imi, httpd.conf and varify .bashrc
brew services restart shivammathur/php/php
# brew services only shows php@7.4 and php@8.1 but
# php@8.1 started <username> ~/Library/LaunchAgents/homebrew.mxcl.php@8.1.plist
#
brew reinstall $(brew deps shivammathur/php/php@8.1) shivammathur/php/php@8.1
sphp 8.2
# still starting 8.1
sphp 8.1
# check info.php in localhost -seems fimne Attempt update Xdebugpecl uninstall -r xdebug
pecl install xdebug
brew info php@8.1
php --ini
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The file Please run the following command to check this grep -r extension.*=.*openssl $(brew --prefix)/etc/php/8.1 Then comment out any lines with |
Beta Was this translation helpful? Give feedback.
@kjon-life
The file
openssl.so
is not there as the openssl extension is compiled statically into php.You have an ini entry to load
openssl.so
, which should not be there.Please run the following command to check this
Then comment out any lines with
extension=openssl
in the ini files that are uncommented by prefixing the line with a;
.