Welcome Guest, Not a member yet? Register   Sign In
PHP 8 - Mailhog and CI 4.1.3
#1

I've upgraded my CI4 to the latest version (4.1.3), no real problems there, and now want to use PHP 8 for future development work. So far nothing unreasonable.

However, my mailhog installation works fine with PHP 7.4.21, but the exact same code does NOT work with PHP 8.0.8.

This is perplexing. I don't know where the error is, it seems like the intercept part that mailhog performs is not happening. The mail appears to send from the mail command correctly, but nothing shows up anywhere. It's like it vanishes into the magic bitbucket.

Any thoughts would be appreciated.
Reply
#2

1) Check your server log
2) Check your php log
3) turn on display all for testing (make sure to turn it off when finished!)
4) echo in code is your friend.
5) use break points to monitor the code execution.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

Thanks.

Looking through the .ini files forced me to look at other things.

The following line was missing from the PHP 8.0 php.ini file:

sendmail_path = /usr/local/bin/mhsendmail

That was the cause of the problem.

Thanks @InsiteFX for the point in the right direction.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB