Jump to content

PHPMailer on Laravel Forge server - openssl issue?


Recommended Posts

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?

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).

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.