mail failure after PHP 7.2 upgrade SOLVED (my fault)

Discussion forum about Anuko Time Tracker
Post Reply
dalescott
Posts: 60
Joined: Fri Apr 21, 2017 2:53 pm
Location: Calgary, Alberta, Canada
Contact:

mail failure after PHP 7.2 upgrade SOLVED (my fault)

Post by dalescott » Fri Oct 26, 2018 10:06 pm

Hi, I recently upgraded from PHP 5 to PHP7.2 and all seemed ok (enter and editing time entries, renerating reports, etc.), but I found yesterday that emailing a report shows "Error sending email" in the upper left below the menu.

My Apache error log shows:

Code: Select all

[Fri Oct 26 11:15:22.629452 2018] [php7:warn] [pid 15780] [client 162.223.103.50:56704] PHP Warning:  count(): Parameter must be an array or an object that implements Countable in /usr/local/www/timetracker/WEB-INF/lib/pear/MDB2.php on line 826, referer: http://timetracker.dalescott.net/report_send.php
I wasn't sure if PHP 7.2 is "officially" supported, but I was forced into upgrading by dependencies from other apps I'm using. Should I enter this as a bug?

The PHP modules installed are:

Code: Select all

dale@whizzer:/usr/local/www/timetracker % pkg info | grep php
mod_php72-7.2.10               PHP Scripting Language
php72-7.2.10                   PHP Scripting Language
php72-bcmath-7.2.10            The bcmath shared extension for php
php72-bz2-7.2.10               The bz2 shared extension for php
php72-ctype-7.2.10             The ctype shared extension for php
php72-curl-7.2.10              The curl shared extension for php
php72-dom-7.2.10               The dom shared extension for php
php72-fileinfo-7.2.10          The fileinfo shared extension for php
php72-filter-7.2.10            The filter shared extension for php
php72-gd-7.2.10                The gd shared extension for php
php72-gettext-7.2.10           The gettext shared extension for php
php72-hash-7.2.10              The hash shared extension for php
php72-iconv-7.2.10             The iconv shared extension for php
php72-imap-7.2.10              The imap shared extension for php
php72-json-7.2.10              The json shared extension for php
php72-mbstring-7.2.10          The mbstring shared extension for php
php72-mysqli-7.2.10            The mysqli shared extension for php
php72-openssl-7.2.10           The openssl shared extension for php
php72-pdo-7.2.10               The pdo shared extension for php
php72-pdo_mysql-7.2.10         The pdo_mysql shared extension for php
php72-pecl-mcrypt-1.0.1        PHP extension for mcrypt, removed in PHP 7.2
php72-posix-7.2.10             The posix shared extension for php
php72-readline-7.2.10          The readline shared extension for php
php72-session-7.2.10           The session shared extension for php
php72-simplexml-7.2.10         The simplexml shared extension for php
php72-soap-7.2.10              The soap shared extension for php
php72-xml-7.2.10               The xml shared extension for php
php72-xmlreader-7.2.10         The xmlreader shared extension for php
php72-xmlwriter-7.2.10         The xmlwriter shared extension for php
php72-zip-7.2.10               The zip shared extension for php
php72-zlib-7.2.10              The zlib shared extension for php
dale@whizzer:/usr/local/www/timetracker %

Cheers,
Dale
Last edited by dalescott on Sat Oct 27, 2018 6:34 pm, edited 2 times in total.

wrc
Posts: 255
Joined: Tue May 25, 2010 8:30 pm

Re: mail failure after PHP 7.2 upgrade

Post by wrc » Sat Oct 27, 2018 12:18 pm

Did you try using MAIL_SMTP_DEBUG in config.php? If so, what exactly does the page show when you send an email?

Code: Select all

define('MAIL_SMTP_DEBUG', true);

dalescott
Posts: 60
Joined: Fri Apr 21, 2017 2:53 pm
Location: Calgary, Alberta, Canada
Contact:

Re: mail failure after PHP 7.2 upgrade (SOLVED)

Post by dalescott » Sat Oct 27, 2018 6:31 pm

Hi @wrc, thanks for your help. I had forgotten I had accidently blown away my TimeTracker install around the same time as I upgraded to PHP7. I cloned the project repo for a new install, but forgot to configure mail in config.php. Doh!

Post Reply