sapplica / sentrifugo

Sentrifugo is a FREE and powerful Human Resource Management System (HRMS) that can be easily configured to meet your organizational needs.
http://www.sentrifugo.com/
GNU General Public License v3.0
484 stars 426 forks source link

Sentrifugo throwing a fatal error confirming Mail Server Settings #358

Open osdp2012 opened 3 years ago

osdp2012 commented 3 years ago

Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_runtime() in C:\xampp\htdocs\Sentrifugo\install\PHPMailer\class.phpmailer.php:2408 Stack trace: #0 C:\xampp\htdocs\Sentrifugo\install\PHPMailer\class.phpmailer.php(2378): PHPMailer->encodeFile('../public/media...', 'base64') #1 C:\xampp\htdocs\Sentrifugo\install\PHPMailer\class.phpmailer.php(2030): PHPMailer->attachAll('inline', 'b2_77d31d48a75c...') #2 C:\xampp\htdocs\Sentrifugo\install\PHPMailer\class.phpmailer.php(1097): PHPMailer->createBody() #3 C:\xampp\htdocs\Sentrifugo\install\PHPMailer\class.phpmailer.php(1056): PHPMailer->preSend() #4 C:\xampp\htdocs\Sentrifugo\install\step4.php(196): PHPMailer->send() thrown in C:\xampp\htdocs\Sentrifugo\install\PHPMailer\class.phpmailer.php on line 2408

uglygodII commented 3 years ago

Can someone help us with this? Iā€™m also experiencing same issues

blackarck commented 2 years ago

Can you elaborate replication steps as to which step you are at and the error you are seeing at front end.

ogbeiedward commented 2 years ago

Hi, I encountered this error on step 4.

mjxo commented 2 years ago

Hello guys,

For me it worked, when I commented out the parts related to magic quotes.

protected function encodeFile($path, $encoding = 'base64') { try { if (!is_readable($path)) { throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE); } /** $magic_quotes = get_magic_quotes_runtime(); if ($magic_quotes) { if (version_compare(PHP_VERSION, '5.3.0', '<')) { set_magic_quotes_runtime(0); } else { //Doesn't exist in PHP 5.4, but we don't need to check because //get_magic_quotes_runtime always returns false in 5.4+ //so it will never get here ini_set('magic_quotes_runtime', 0); } } / $file_buffer = file_get_contents($path); $file_buffer = $this->encodeString($file_buffer, $encoding); / if ($magic_quotes) { if (version_compare(PHP_VERSION, '5.3.0', '<')) { set_magic_quotes_runtime($magic_quotes); } else { ini_set('magic_quotes_runtime', $magic_quotes); } } /** return $file_buffer; } catch (Exception $exc) { $this->setError($exc->getMessage()); return ''; } }

mjxo commented 2 years ago

But now I have 2 other issues, one is related to pdf download after installation and other to actually access Sentrifugo after installationšŸ˜… Can't find solution anywhere :(

sainuupuujee commented 2 years ago

Did anybody resolve this issue?

akuardit commented 2 years ago

But now I have 2 other issues, one is related to pdf download after installation and other to actually access Sentrifugo after installationšŸ˜… Can't find solution anywhere :(

http://localhost/sentrifugo/index.php/

akuardit commented 2 years ago

Did anybody resolve this issue?

basically, the installation, do the step by step, like in folder /sentrifugo/install/step(1-5).php for smtp, you can bypass it...

  1. do the mjxo above (mark the magic_quotes)

or/and

  1. insert directly to database table mail_mail_settings "INSERT INTO main_mail_settings (tls,auth, port,username,password,server_name,createddate,modifieddate) VALUES ('".$tls."','".$auth." ',".$port.",'".$username."','".$password."','".$smtpserver."','".$date."','".$date."') "

  2. put the constant variable in /public/mail_settings_constants.php <?php defined('MAIL_SMTP') || define('MAIL_SMTP','".$smtpserver."'); defined('MAIL_USERNAME') || define('MAIL_USERNAME','".$username."'); defined('MAIL_PASSWORD') || define('MAIL_PASSWORD','".$password."'); defined('MAIL_PORT') || define('MAIL_PORT','".$port."'); defined('MAIL_AUTH') || define('MAIL_AUTH','".$auth."'); defined('MAIL_TLS') || define('MAIL_TLS','".$tls."'); ?>

Replace the variable with settings from your smtp servers ... than you will go to step 5 ... šŸ‘

Miki-66 commented 2 years ago

In the Sentrifugo database there is no Table like "mail_mail_settings" Do you mean we need to create a new Table ?

Jamesbao007 commented 2 years ago

chang just one line from $magic_quotes = get_magic_quotes_runtime(); to $magic_quotes = false; in file class.phpmailer.php line 2408. then it works

edwardsalatiel commented 5 months ago

Please can someone help me with this error please ? the attachment is there Sentrifugo Error