bgphf Posted July 24, 2023 Share Posted July 24, 2023 Hi, i ran out of ideas what could be the issue with PHPMailer. The website is deployed on Laravel Forge with php7.4 on ubuntu 20 The same repo works fine on a localhost with same php7.4, however as soon as deployed on the Forge Server it refuses to work. All required modules are installed and enabled. The only error in php error log is: Quote 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 1. /usr/lib/php/20190902/ is the correct php extension path. However there is no openssl folder there 2. openssl is enabled in CLI and FPM configuration like this: extension=openssl When disabled from configuration openssl still runs and error does not show up ( that is verified also via php.info) openssl version => OpenSSL 1.1.1f 31 Mar 2020 whereis openssl => openssl: /usr/bin/openssl /usr/include/openssl /usr/share/man/man1/openssl.1ssl.gz php -i | grep "OpenSSL support" => OpenSSL support => enabled; Native OpenSSL support => enabled Is the issue really in openssl or there is something else that breaks it? Quote Link to comment https://forums.phpfreaks.com/topic/317116-phpmailer-on-laravel-forge-server-openssl-issue/ Share on other sites More sharing options...
requinix Posted July 24, 2023 Share Posted July 24, 2023 If you're on Ubuntu then do not edit INI files yourself. As most other major distros do too, Ubuntu will set everything up automatically for you. Undo all of your manual changes, including where you added that extension=openssl line, then install the php-openssl package (using apt). Quote Link to comment https://forums.phpfreaks.com/topic/317116-phpmailer-on-laravel-forge-server-openssl-issue/#findComment-1610696 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.