Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPMailer on Laravel Forge server - openssl issue? #2934

Closed
BGFR opened this issue Jul 24, 2023 · 3 comments
Closed

PHPMailer on Laravel Forge server - openssl issue? #2934

BGFR opened this issue Jul 24, 2023 · 3 comments

Comments

@BGFR
Copy link

BGFR commented Jul 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?

@Synchro
Copy link
Member

Synchro commented Jul 24, 2023

This is definitely a PHP config issue and not a PHPMailer thing. Does the openssl extension binary exist in any the paths that it says it's looking for? If not, where is it?

@BGFR
Copy link
Author

BGFR commented Jul 24, 2023

Hi, there is nothing in the extension folder.
Here is
whereis openssl
openssl: /usr/bin/openssl /usr/include/openssl /usr/share/man/man1/openssl.1ssl.gz
root@mailer:~# which openssl
/usr/bin/openssl

@Synchro
Copy link
Member

Synchro commented Jul 24, 2023

That's the openssl command line client, not the library or extension used by PHP. Since openssl is a core extension, it may not exist as a separate extension package to install. I'd recommend reinstalling your PHP. If you have no luck there, you could try switching to Ondřej Surý's PPA and reinstalling from there, as it is often more reliable than the stock packages.

@Synchro Synchro closed this as completed Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants