Special characters difference XAMPP and NGINX

Asked

Viewed 141 times

0

Well I am migrating a system that is running in the xampp to the Nginx,

only that the special characters in xampp works normal, but in error Nginx,

some hint to solve this problem, the php of xampp and 7.2.5, and the php of Nginx and 7.3.5

the default charset of the 2 servers is UTF-8

someone’s been through this trouble?

the error that appears in the api:

{
    "message": "Slim Application Error",
    "exception": [
        {
            "type": "RuntimeException",
            "code": 5,
            "message": "Malformed UTF-8 characters, possibly incorrectly encoded",
            "file": "\/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/Http\/Response.php",
            "line": 353,
            "trace": [
                "#0 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/index.php(693): Slim\\Http\\Response->withJson(Array, 300)",
                "#1 [internal function]: Closure->{closure}(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Array)",
                "#2 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/Handlers\/Strategies\/RequestResponse.php(41): call_user_func(Object(Closure), Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Array)",
                "#3 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/Route.php(335): Slim\\Handlers\\Strategies\\RequestResponse->__invoke(Object(Closure), Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Array)",
                "#4 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/classes\/gastroz.class.php(140): Slim\\Route->__invoke(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))",
                "#5 [internal function]: Auth->__invoke(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Object(Slim\\Route))",
                "#6 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/DeferredCallable.php(43): call_user_func_array(Object(Auth), Array)",
                "#7 [internal function]: Slim\\DeferredCallable->__invoke(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Object(Slim\\Route))",
                "#8 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\\DeferredCallable), Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Object(Slim\\Route))",
                "#9 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/MiddlewareAwareTrait.php(117): Slim\\Route->Slim\\{closure}(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))",
                "#10 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/Route.php(313): Slim\\Route->callMiddlewareStack(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))",
                "#11 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/App.php(513): Slim\\Route->run(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))",
                "#12 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/MiddlewareAwareTrait.php(117): Slim\\App->__invoke(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))",
                "#13 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/App.php(406): Slim\\App->callMiddlewareStack(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))",
                "#14 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/vendor\/slim\/slim\/Slim\/App.php(314): Slim\\App->process(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))",
                "#15 \/usr\/local\/nginx\/html\/pHpServer-ADm\/api\/index.php(4296): Slim\\App->run()",
                "#16 {main}"
            ]
        }
    ]
}
  • 1

    Information: XAMPP, is a commonly used tool for web development, which manages some useful components for practice, are: Perl, PHP, Mysql, and Apache (the latter being the WEB server). that is, the issue is related to Apache and Nginx.

  • @Viniciusdejesus I added to http and yet it didn’t work

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.