i-MSCP - PHP >= 5.6 - Default charset

  • Hello,

    @Ninos @mrpink @flames @Cool AND any other ;)

    We see many users with charset problems since PHP-5.6. Generally speaking, problems arises when customers deploys old sites with a charset such as ISO-8859-1. Indeed, since PHP5.6, the default charset is set to UTF-8.

    Even if not recommended, we could set the default charset value to an empty string in the php.ini/pool conffiles (like in older PHP versions). What do you think about this?

    NOTE: Don't ask us to add a field in the PHP editor. That is already planned for the version 2.0.0. Here, we talk about serie 1.2.x.


    Related discussions


  • Hmm I would just add a listener-file. By updating to php5.6 admins should know about that problem (new default value)..

  • @Ninos

    You know the story about auto-proclamed `administrator` which are not in reality... From my point of view, any administrator should be able to configure PHP without having to ask here for a howto but this is not the case...

    Can you code a small listener file for inclusion in 1.2.12 faster or should I?


  • Atm I (still -.-) have no testing server. I can write one for fpm, but without testing, have already a similar listener-file (for max_children).

  • Ok ;)


  • Hello Guys,
    I support Ninos' way. UTF-8 is default, and since it is, there are less problems with charsets.
    After this change (in php) you just see those admins popping up, who do not really know what they do :D
    best practice is to update old php scripts, if not possible, admin has to decide (i.e. via listener file) which charset he wants to be default on his system. w/o this decision, utf-8 should be default.

  • @flames

    Exactly what I've answered here: PHP Settings - Default charset value

    Problem is that many people prefer ask us than learning/searching by themself... Thus, we loose our time answering those people.

    Well, ok, I'll code a listener which will allows to override default PHP values.


  • @Nuxwin for php-fpm I've created following listener-file (not tested, may only working on pool-level per_domain)..

  • In my opinion UTF-8 as default is fine and the future.
    Customers have to update their content or the admin could use a listener for a transitional period.

    Thanks for the listener file @Ninos

  • @mrpink @flames @Ninos @Cool

    Here, you can find a listener which allows to add or override any PHP configuration option. You can operate globally or on a per domain basis.

    Please lookt at it and test it. Be aware that at this moment, that listener is compatibile with Fcgid and PHP-FPM Apache2 httpd server implementations only.

    Thank you for your time.