Para obtener más información sobre cómo escribir un buen informe de errores
En una instalación nueva de osticket:
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
Comportamiento esperado: [lo que esperaba que sucediera]
Comportamiento real: [lo que realmente sucedió]
Actualización: esto parece estar sucediendo cuando osTicket no puede conectarse a mysql, parece que intentará enviar un correo electrónico y esa función usa _S (), sin embargo, Internationlization :: bootstrap solo se llama durante / setup /?
En caso de que alguien más tenga este problema ... Tuve este problema en CentOS 7 ejecutando Apache, con SELinux, sin embargo, la base de datos estaba en un sistema separado.
Para probar si su problema es con SELinux: setenforce 0
y actualice el navegador. osTicket ahora debería funcionar bien. Si este es tu caso, aquí tienes la solución.
SELinux no permite que apache cree conexiones de red, así que simplemente permítelas.
setenforce 1 # We want SELinux to remain on!
setsebool -P httpd_can_network_connect_db 1
Fácil
En mi caso, el error se produjo debido a que el motor de la base de datos estaba inactivo.
A pesar de que la base de datos está inactiva, el problema aquí es que la notificación por correo electrónico de que la base de datos está inactiva falla debido a este error de compilación.
La función _S
parece provenir del módulo il8n, pero es un poco complicado rastrear si esta función está realmente cargada y cómo.
https://github.com/osTicket/osTicket/blob/master/include/cli/modules/i18n.php#L628
¡Puede haber un problema con la conexión a la base de datos! asegúrese de que su usuario tenga la contraseña. root sin contraseña también puede causar este error.
Comentario más útil
En mi caso, el error se produjo debido a que el motor de la base de datos estaba inactivo.