Please describe your server stack in details.
I see bitnami, but I’m not aware of it. What is the webserver, PHP version and how it’s installed? Were you installing the plugin from WP.org repo?
I see that you are NOT on the latest version of WP Mail SMTP. Please update to 1.2.2. This likely won’t fix your particular error, but at least line numbers in error_log will be correct and make sense. Also, you cut the output, it should be much longer.
Can you confirm with the host (or if you are aware of it) that PHP ReflectionClass is available for you and works fine?
Google VM, Debian GNU/Linux 8\n\1, Apache 2.4.23, PHP 7.0.12, WP 4.9.1, WP Mail SMTP 1.2.2
[Thu Dec 28 15:32:13.256718 2017] [proxy_fcgi:error] [pid 29162:tid 140562451552000] [client 172.56.7.48:56888] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined method Composer\\Autoload\\ClassLoader::setClassMapAuthoritative() in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wp-mail-smtp/vendor/composer/autoload_real.php:38\nStack trace:\n#0 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wp-mail-smtp/vendor/autoload.php(7): ComposerAutoloaderInitbd625bfb904527ebcdc364a59295e538::getLoader()\n#1 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wp-mail-smtp/src/Providers/Gmail/Mailer.php(53): require(‘/opt/bitnami/ap…’)\n#2 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wp-mail-smtp/src/Providers/Loader.php(170): WPMailSMTP\\Providers\\Gmail\\Mailer->__construct(Object(WPMailSMTP\\MailCatcher))\n#3 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wp-mail-smtp/src/Providers/Loader.php(127): WPMailSMTP\\Providers\\Loader->get_entity(‘gmail’, ‘Mailer’)\n#4 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wp-mail-smtp/src/MailCatcher.php(51): WPMailSMTP\\Providers\\Loader->get_mail…\n’, referer: http://bak.rickharris.com/wp-admin/options-general.php?page=wp-mail-smtp&tab=test
The error log in still cut, but it seems that you just don’t have a full stack trace there.
Do you have composer.json and /vendor directory at the top level of the site? Somewhere at the same level as wp-config.php or wp-load.php.
Sorry, I do not have a composer.json or a /vendor directory.
Also, not sure how the error log is still cut? It was the last line in the log file and it looks like a full stack trace to me.
Remember, 1.0.2 still works fine and luckily that is what I am using on my production site.
It’s not the full stack trace, as the method name in Loader class is cut. It is get_mailer(), and not get_mail.... And I think there is something after that. It may be cut because of the length of the allowed string saved into an error log. Here is a documentation: https://secure.php.net/manual/en/errorfunc.configuration.php#ini.log-errors-max-len
You just need to increase the length (double it or put 0 instead of 1024, for example).
—
Do you have any kind of PHP cache on a server? Varnish? Opcache? APC? You may need to clear it after upgrading the plugin so the new changes will be caught by the server. That might explain the reason why downgrading to 1.0.x works.
Hi, I changed the log_errors_max_len to 0 and it still seems to truncate individual function calls but looks like the entire stack trace is here. I am not aware of any PHP caches; however, I restarted the php-fpm which is supposed to clear the Opcache and it did not help.
[Wed Jan 03 15:33:27.442116 2018] [proxy_fcgi:error] [pid 22902:tid 140454913464064] [client 172.56.6.193:65335] AH01071: Got error ‘PHP message: PHP Fatal error: Uncaught Error: Call to undefined method Composer\\Autoload\\ClassLoader::setClassMapAuthoritative() in /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wp-mail-smtp/vendor/composer/autoload_real.php:38\nStack trace:\n#0 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wp-mail-smtp/vendor/autoload.php(7): ComposerAutoloaderInitbd625bfb904527ebcdc364a59295e538::getLoader()\n#1 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wp-mail-smtp/src/Providers/Gmail/Mailer.php(53): require(‘/opt/bitnami/ap…’)\n#2 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wp-mail-smtp/src/Providers/Loader.php(170): WPMailSMTP\\Providers\\Gmail\\Mailer->__construct(Object(WPMailSMTP\\MailCatcher))\n#3 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wp-mail-smtp/src/Providers/Loader.php(127): WPMailSMTP\\Providers\\Loader->get_entity(‘gmail’, ‘Mailer’)\n#4 /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/wp-mail-smtp/src/MailCatcher.php(51): WPMailSMTP\\Providers\\Loader->get_mail…\n’, referer: http://bak.rickharris.com/wp-admin/options-general.php?page=wp-mail-smtp&tab=test
It looks to me like you are calling a method “ClassLoader::setClassMapAuthoritative()” that simply does not exist in my version of PHP. What version of PHP are you working with?
I’m not calling it manually. I use Composer autoloader. I’ve tested the plugin on all major PHP versions from 5.2 (where there is no composer and old version of the plugin is loaded), 5.3 (composer + its autoloader) and to the PHP 7.1.
ClassLoader::setClassMapAuthoritative() is defined in /wp-mail-smtp/vendor/composer/ClassLoader.php::260.
Thanks for all your efforts. I just switched to Easy WP SMTP and it gets the job done. I still prefer your Oauth authentication over smtp TLS, so please let me know when you have a new version to try.
I found same problem – turned out to work after disabling simple calendar plugin which was also authenticating with google.
Not sure how to have both running at the same time….
This issue will be fixed in WP Mail SMTP 1.3 which is planned to be released in May.
After that you will be able to run these plugins together.
Hi,
I still have problem with WP Mail SMTP running aside Simple Calendar !!!
Running WP 4.9.8, WP Mail SMTP 1.3.3 and Simple Calendar 3.1.19 … all this running on PHP 7.1
Thanks for your support