Error in Student Application

Hi Admin and Sandra,

A parent want to register through Student Application. But it is error. When I try to log in php error, the message look like this:

==============================================================================[04-Mar-2022 15:48:24 Asia/Jakarta] PHP Fatal error: Uncaught Error: Call to undefined function PHPMailer\PHPMailer\escapeshellcmd() in /home/u1749322/public_html/sms-dev/vendor/phpmailer/phpmailer/src/PHPMailer.php:1784
Stack trace:
#0 /home/u1749322/public_html/sms-dev/vendor/phpmailer/phpmailer/src/PHPMailer.php(1877): PHPMailer\PHPMailer\PHPMailer::isShellSafe()
#1 /home/u1749322/public_html/sms-dev/vendor/phpmailer/phpmailer/src/PHPMailer.php(1640): PHPMailer\PHPMailer\PHPMailer->mailSend()
#2 /home/u1749322/public_html/sms-dev/vendor/phpmailer/phpmailer/src/PHPMailer.php(1471): PHPMailer\PHPMailer\PHPMailer->postSend()
#3 /home/u1749322/public_html/sms-dev/src/Comms/NotificationSender.php(152): PHPMailer\PHPMailer\PHPMailer->send()
#4 /home/u1749322/public_html/sms-dev/src/Comms/NotificationEvent.php(146): Gibbon\Comms\NotificationSender->sendNotifications()
#5 /home/u1749322/public_html/sms-dev/modules/Students/applicationFormProcess.php(367): Gibbon\Comms\NotificationEvent->sendNotifications()
#6 {main}
thrown in /home/u1749322/public_html/sms-dev/vendor/phpmailer/phpmailer/src/PHPMailer.php on line 1784

I am using v23.0.01. Thank you for your help.

Regards,
Imam Nursianto


Comments

  • That is unusual, and I haven't seen anything like this before. The escapeshellcmd should be a built-in function in PHP, so it shouldn't be undefined. Can you let us know which version of PHP you are using? It appears to be an issue in the PHPMailer library itself, rather than the Gibbon core, so I wonder if there is a compatibility version between the library and PHP.
  • Hi Sandra,

    I don't know it is solved the problem or not, but when I fill the "smtp setting" in Third Party Setting, there is no more error, and parent able to fill the application.

    FYI,

    [u1749322@srv155 ~]$ php -v
    PHP 8.0.15 (cli) (built: Jan 19 2022 06:07:43) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v4.0.15, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.15, Copyright (c), by Zend Technologies


    Thx

    regards,
    Imam Nursianto
  • Good to hear. I wonder if it was related to server setup for mailing. Generally, when SMTP is not setup, the system will fallback to using whatever local mailer is setup on the server, such as sendmail. I'll make a note to check this out, as the libraries may have changed in PHP 8.0 since the last time non-smtp mailing was tested.
Sign In or Register to comment.