• Resolved rebornhairppp

    (@rebornhairppp)


    Hello,

    I installed your plugin around 1/24/2018 and tested using my Gmail account and everything works fine.

    When I logged into my php error.log, I noticed a PHP Warning message: main() has been disabled for security reasons in /var/www/…/wp-mail-smtp/src/MailCatcher.php on line 7.

    I don’t have a main function disabled as part of the disable_functions in php.ini. After reading PHP manual (https://php.net/manual/en/function.main.php), it looks like your team is using a problematic syntax “require_once” on Line 7 of the MailCatcher.php file. Using this syntax will present this error message that points to the main().

    May you please confirm if my logic is correct? May you also confirm if this error will prevent me from fully utilizing all the features in your plugin or possibly cause other issues with my WordPress site?

    Thank you for all your support and contribution to make this plugin worthwhile.

    Your prompt response is always appreciated with many blessing from above!

    All my best,

    Joe

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Slava Abakumov

    (@slaffik)

    Hello @rebornhairppp,

    Your research is correct. Although I have no idea how that error is generated, the require_once usage is correct.

    Which PHP version are you using?
    What server is powering your site (*nix-based, or Windows? Apache/Nginx/something else)?

    Thread Starter rebornhairppp

    (@rebornhairppp)

    Hi Slava,

    Thanks for getting back to me so quick. I really appreciate your timeliness!

    I am running PHP 7.2 on Apache. I am on a dedicated VPS.

    All my best,

    Joe

    Plugin Author Slava Abakumov

    (@slaffik)

    @rebornhairppp

    According to the PHP documentation:

    If you discover such a reference, please file a bug report, indicating the PHP function caused the error that linked to main() and it will be fixed and properly documented.

    As I can’t replicate the issue, I won’t be able to help PHP language developers to replicate it to help them fix, so it’s better to file the bug by you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Main Function Error’ is closed to new replies.