Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: Call to undefined function _S() in include/class.mailer.php on line 573 #3890

Closed
3 of 4 tasks
lifeofguenter opened this issue Jul 10, 2017 · 4 comments
Closed
3 of 4 tasks

Comments

@lifeofguenter
Copy link

lifeofguenter commented Jul 10, 2017

Prerequisites

  • Can you reproduce the problem in a fresh installation of the "develop" branch?
  • Do you have any errors in the PHP error log, or javascript console?
  • Did you check the osTicket forums?
  • Did you perform a cursory search to see if your bug or enhancement is already reported?

For more information on how to write a good bug report

Description

On a fresh osticket installation:



Strict Standards: Non-static method Misc::currentURL() should not be called statically in /opt/osticket/public/bootstrap.php on line 345

Notice: Undefined index: HTTPS in /opt/osticket/public/include/class.misc.php on line 148

Strict Standards: Non-static method Bootstrap::loadConfig() should not be called statically in /opt/osticket/public/main.inc.php on line 24

Notice: Constant ROOT_PATH already defined in /opt/osticket/public/include/ost-config.php on line 39

Strict Standards: Non-static method Bootstrap::i18n_prep() should not be called statically in /opt/osticket/public/main.inc.php on line 26

Deprecated: iconv_set_encoding(): Use of iconv.internal_encoding is deprecated in /opt/osticket/public/bootstrap.php on line 289

Strict Standards: Non-static method Bootstrap::loadCode() should not be called statically in /opt/osticket/public/main.inc.php on line 27

Strict Standards: Non-static method Bootstrap::connect() should not be called statically in /opt/osticket/public/main.inc.php on line 28

Strict Standards: Non-static method Bootstrap::croak() should not be called statically in /opt/osticket/public/bootstrap.php on line 190

Strict Standards: Non-static method Mailer::sendmail() should not be called statically in /opt/osticket/public/bootstrap.php on line 295

Deprecated: Non-static method Misc::randCode() should not be called statically, assuming $this from incompatible context in /opt/osticket/public/include/class.mailer.php on line 144

Deprecated: Non-static method Crypto::random() should not be called statically, assuming $this from incompatible context in /opt/osticket/public/include/class.misc.php on line 30

Notice: Undefined index: reply-tag in /opt/osticket/public/include/class.mailer.php on line 441

Deprecated: Non-static method Format::html2text() should not be called statically, assuming $this from incompatible context in /opt/osticket/public/include/class.mailer.php on line 449

Strict Standards: Only variables should be passed by reference in /opt/osticket/public/include/html2text.php on line 64

Deprecated: Non-static method Mail::factory() should not be called statically, assuming $this from incompatible context in /opt/osticket/public/include/class.mailer.php on line 566

Fatal error: Call to undefined function _S() in /opt/osticket/public/include/class.mailer.php on line 573



Steps to Reproduce

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Versions

  • osTicket 1.10
  • PHP 5.6.30

Update: this seems to be happening when osTicket cannot connect to mysql, it seems it will try to send an email and that function uses _S(), however Internationlization::bootstrap only gets called during /setup/ ?

@shanept
Copy link

shanept commented May 29, 2018

Just in case anyone else is encountering this issue... I had this issue on CentOS 7 running Apache - with SELinux, however the database was on a separate system.
To test whether your issue is with SELinux: setenforce 0 and refresh the browser. osTicket should now work fine. If this is the case for you, here is the solution.

SELinux is disallowing apache to create network connections, so simply allow them.

setenforce 1 # We want SELinux to remain on!
setsebool -P httpd_can_network_connect_db 1

Easy

@anfrodriguezri
Copy link

In my case the error occurred due to the database engine being down.

@JediKev JediKev closed this as completed Jan 6, 2020
@sundbry
Copy link

sundbry commented Aug 18, 2020

Despite the database being down, the problem here is that the email notification that the db is down fails due to this compilation error.

The function _S seems to come from the il8n module, but it's a bit complicated to trace if/how this function is actually loaded.
https://github.com/osTicket/osTicket/blob/master/include/cli/modules/i18n.php#L628

@hinikunj
Copy link

There might be a problem with DB connection! make sure your user has the password. root with no password can cause this error too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants