MyBB Community Forums

Full Version: mail() oddness
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm fairly certain that this is due to a PHP upgrade...

When sending some PM's and email inc/functions.php errors at 370, not with a safe mode error or sendmail not found error, but:

Fatal error: Call to undefined function mail() in /home/web/websiteFQDN/htdocs/forum/inc/functions.php on line 370


So as a quick investigation, I tried a sample PHP call on the CLI:

<?php
mail("[email protected]", "test", "test message", "X-Mailer: [email protected]");
?>

Which worked fine. Any insight as to why mail() is undefined when calling from inside functions.php?
Have you added any modifications to your forum that may be clashing in anyway to the mail() tag or within inc/functions.php ?
No mods at all. I'm running the base code for 1.2.3 and previously 1.2.2
Your version of PHP compiled for Apache/CGI may have mail support disabled in the php.ini file.

What I'd do is a <?php phpinfo(); ?> on the CLI and then via your web browser and compare the PHP ini paths each return & investigate the differences between them.
The PHP ini looks badly battered after the upgrade... Sad The general path well isn't defined, nor is the one for sendmail. I'll hassle the admin.

Thanks Chris & Dale!