Notifications
Clear all

Php version issue

17 Posts
4 Users
3 Reactions
379 Views
Sofy
Posts: 5483
 Sofy
Admin
(@sofy)
Support Team
Joined: 8 years ago

Hi,

There are no issues with the latest version of PHP. The developers have tested it multiple times.

To better understand the issue on your website, please record a video showing the problem and also provide the error.log file so we can review the errors.

Reply
8 Replies
(@tarikbayar)
Joined: 3 years ago

Eminent Member
Posts: 30

@sofy 

 

I have followed your general troubleshooting advice, including activating the WordPress debug log, and I have identified a specific PHP Fatal Error in my debug.log file. This error consistently occurs when wpForo attempts to send an email notification, for instance, after a new topic is added.

Problem Description: When performing actions that trigger email notifications within wpForo (such as creating a new topic or replying to one), the page does not fully load, and I encounter a critical error that prevents the action from completing.

Steps to Reproduce:

  1. Log in to the WordPress admin panel.

  2. Navigate to the wpForo forum page (oyunda.org/forum/).

  3. Attempt to create a new topic or reply to an existing one.

  4. Upon submission, the page freezes with a loading spinner, and the action fails to complete.

Error Log Entry (from wp-content/debug.log):

[15-Jul-2025 15:32:53 UTC] PHP Fatal error: Uncaught Error: Call to undefined function PHPMailer\PHPMailer\mail() in /home/oyundaor/public_html/wp-includes/PHPMailer/PHPMailer.php:880
Stack trace:
#0 /home/oyundaor/public_html/wp-includes/PHPMailer/PHPMailer.php(1968): PHPMailer\PHPMailer\PHPMailer->mailPassthru()
#1 /home/oyundaor/public_html/wp-includes/PHPMailer/PHPMailer.php(1691): PHPMailer\PHPMailer\PHPMailer->mailSend()
#2 /home/oyundaor/public_html/wp-includes/PHPMailer/PHPMailer.php(1523): PHPMailer\PHPMailer\PHPMailer->postSend()
#3 /home/oyundaor/public_html/wp-includes/pluggable.php(547): PHPMailer\PHPMailer\PHPMailer->send()
#4 /home/oyundaor/public_html/wp-content/plugins/wpforo/includes/functions.php(3766): wp_mail()
#5 /home/oyundaor/public_html/wp-content/plugins/wpforo/modules/follows/classes/Actions.php(70): wpforo_send_email()
#6 /home/oyundaor/public_html/wp-includes/class-wp-hook.php(324): wpforo\modules\follows\classes\Actions->after_add_topic()
#7 /home/oyundaor/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#8 /home/oyundaor/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#9 /home/oyundaor/public_html/wp-content/plugins/wpforo/classes/Topics.php(436): do_action()
#10 /home/oyundaor/public_html/wp-content/plugins/wpforo/classes/Actions.php(726): wpforo\classes\Topics->add()
#11 /home/oyundaor/public_html/wp-includes/class-wp-hook.php(324): wpforo\classes\Actions->topic_add()
#12 /home/oyundaor/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#13 /home/oyundaor/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()
#14 /home/oyundaor/public_html/wp-content/plugins/wpforo/classes/Actions.php(192): do_action()
#15 /home/oyundaor/public_html/wp-includes/class-wp-hook.php(324): wpforo\classes\Actions->do_actions()
#16 /home/oyundaor/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#17 /home/oyundaor/public_html/wp-includes/plugin.php(517): do_action()
#18 /home/oyundaor/public_html/wp-content/plugins/wpforo/wpforo.php(545): do_action()
#19 /home/oyundaor/public_html/wp-includes/class-wp-hook.php(324): wpforo\wpforo->init()
#20 /home/oyundaor/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#21 /home/oyundaor/public_html/wp-includes/plugin.php(565): do_action_ref_array()
#22 /home/oyundaor/public_html/wp-includes/class-wp.php(835): do_action_ref_array()
#23 /home/oyundaor/public_html/wp-includes/functions.php(1342): WP->main()
#24 /home/oyundaor/public_html/wp-blog-header.php(16): wp()
#25 /home/oyundaor/public_html/index.php(17): require('/home/oyundaor/...')
#26 {main}
thrown in /home/oyundaor/public_html/wp-includes/PHPMailer/PHPMailer.php on line 880

Analysis of the Error: The error PHP Fatal error: Uncaught Error: Call to undefined function PHPMailer\PHPMailer\mail() indicates that WordPress's core PHPMailer library (which wpForo uses via wp_mail()) is unable to find or execute the fundamental mail() function provided by PHP. This suggests an issue with my server's PHP configuration regarding email sending capabilities, rather than a direct error in wpForo's code logic.

System Information:

USER AGENT Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36
Web Server LiteSpeed
PHP Version 8.3.22
MySQL Version 11.4.7-MariaDB
PHP Max Post Size 512M
PHP Max Upload Size 512M
PHP Memory Limit 2048M
PHP DateTime Class Mevcut

Hosting Environment: Shared Hosting (cPanel)

I understand this might be an environmental issue on my server. I am reaching out to my hosting provider regarding the mail() function. In the meantime, could you please provide any insights or recommendations from wpForo's side on how to best handle this, especially if the mail() function remains unavailable due to server-side restrictions?

Thank you for your time and assistance.

Best regards,

Tarık

 

 

"you can forward it this way."

Reply
Sofy
 Sofy
Admin
(@sofy)
Joined: 8 years ago

Support Team
Posts: 5483

@tarikbayar 

I've already sent this topic to the developers. I'll let you know as soon as I get a response from the team. 

Reply
(@tarikbayar)
Joined: 3 years ago

Eminent Member
Posts: 30

@sofy 

 

When I asked the hosting company about the situation and shared the same errors, they said that the mail feature on the shared server was disabled for security reasons. They said I could install an SMTP plugin. I installed a plugin to do what they said and shared it again. This application gave me an error code directly. I am sharing it with you as well.

 

Warning! The last email your site tried to send failed.

 

Email Source: wpForo

Mailer: Other SMTP

SMTP Error: Could not connect to SMTP host.

For more details, please try running an Email Test or reading the latest error event.

 

Now, to resolve this issue, I could change my SMTP server, which might solve the problem, but I don't think that's the issue we're facing here.

Did the wpForo developers not consider that this plugin could be used on shared servers? I already changed all the settings in the plugin settings under email settings to prevent emails from being sent. However, this is not working because, as seen above, wpForo still wants to send emails. Why?

 

If this plugin is not meant to be used on shared servers, this should have been specified.

If this plugin must be used with SMTP, I think WPforo should either provide its own internal plugin for this purpose or share information on how to do it.

Additionally, it's interesting that while there are no issues with PHP 7.4, there are issues with PHP 8, which requires SMTP to send emails.

 

That's all I have to say.

Reply
Sofy
 Sofy
Admin
(@sofy)
Joined: 8 years ago

Support Team
Posts: 5483

@tarikbayar 

The fatal error you see happens because your hosting server does not support the PHP mail() function properly in PHP 8.x.

WordPress and wpForo use wp_mail() to send emails, and this function depends on PHP’s internal mail() function.

The best solution is to install an SMTP plugin like WP Mail SMTP or Post SMTP, and configure your website to send emails through SMTP.

Or contact with your hosting provider.

Reply
(@tarikbayar)
Joined: 3 years ago

Eminent Member
Posts: 30

@sofy 

The hosting company doesn't allow the PHP mail feature in PHP 7.4 for security reasons. This requires a VPS/VDS. In short, the PHP mail feature is not available on shared hosting in any PHP version.

In this scenario, the question I'm wondering is why WPForo 8 and above, which doesn't give an error in PHP 7.4, still gives an error when the PHP mail feature isn't available.

I solved my problem by installing an SMTP plugin, yes; but it's disappointing that this is required and isn't mentioned anywhere.

I think the developers weren't aware of this issue or that it would be a problem, so why don't they allow this feature to be disabled? I don't want the WPForo plugin to send emails to anyone in any way, so why isn't it possible to disable it?

Reply
(@theq6699)
Joined: 1 month ago

Active Member
Posts: 8

@tarikbayar 99% of all hosting companies block smtp mail function for WP installs. I always install a smtp plugin, like sofy suggested. I use Fluentsmtp.

Reply
Sofy
 Sofy
Admin
(@sofy)
Joined: 8 years ago

Support Team
Posts: 5483

@tarikbayar 

If you want to block certain emails, there are many plugins and even hooks available for that. This is a general WordPress-related feature and not convenient to include in the settings of each individual plugin.
This question is not related to the wpForo plugin.

Reply
(@tarikbayar)
Joined: 3 years ago

Eminent Member
Posts: 30

@sofy 

 

How is this not related to wpforo?
I'm saying that the mail feature is disabled in every PHP version.
Why am I having problems with PHP 8 (trying to send emails) while there's no problem with PHP 7.4 (the mail feature is disabled)?
I solved this problem by installing an SMTP plugin, but I'm surprised that the plugin's response is different in different PHP versions, so why isn't it the plugin's problem?
Please consider this as feedback. I think you should fix the problem.
But you're the one who knows.

Reply
Posts: 10
(@lbdesign)
Active Member
Joined: 2 years ago

When I installed WPForo, I was already on PHP 8.2 and everything worked fine. 

 

Reply
Page 2 / 2