Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

5.4 default_charset

Discussion in 'CloudLinux' started by ckh, Mar 3, 2014.

  1. ckh

    ckh Well-Known Member

    Joined:
    Dec 6, 2003
    Messages:
    358
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Phoenix, AZ
    cPanel Access Level:
    DataCenter Provider
    I have alt-php installed, 5.4 is the default/native version. Within WHM, php configuration, I have the default_charset set to utf-8

    On all the sites using the native php version, phpinfo() shows iso-8859-1 as the default_charset.

    It also shows that the loaded configuration file is /usr/local/lib/php.ini which has utf-8 set as the default_charset.

    There is no custom php.ini file being used.

    I can't figure out why it won't take utf-8 as the charset, not sure if it's related to alt-php or not.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. someB0dy

    someB0dy Member

    Joined:
    May 24, 2010
    Messages:
    22
    Likes Received:
    2
    Trophy Points:
    53
    cPanel Access Level:
    Root Administrator
    Just checked and default_cahrset is really applied and are shown in phpinfo() page. Where are you changing default_charset?

    Suppose in /usr/local/lib/php.ini , while doing this in /opt/alt/php54/etc/php.ini would make it working like supposed to be.
     
  3. ckh

    ckh Well-Known Member

    Joined:
    Dec 6, 2003
    Messages:
    358
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Phoenix, AZ
    cPanel Access Level:
    DataCenter Provider
    Well, I'd change it within whm and the /usr/local/lib/php.ini file is updated.

    I believe the options in the /opt/alt/php?? directory is if a version is selected other than native and the /usr/local/lib/php.ini file is used if the user is using the version compiled into apache or native. But, I had tried changing the one in the opt/alt/php54 directory and that didn't do any either.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,435
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. ckh

    ckh Well-Known Member

    Joined:
    Dec 6, 2003
    Messages:
    358
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Phoenix, AZ
    cPanel Access Level:
    DataCenter Provider
    It wasn't a custom php.ini option. It was using the native php, which is 5.4. For some reason it is showing utf-8 as the charset today with no changes made. There must be some caching or something going on. Normally the results are instantaneous.

    I have CL set up on about 5 or so servers this way and hadn't seen this before. The native changes had always been instantaneous when I made the modification in WHM. Actually, the custom changes had been instantaneous also.

    Seems good to go now, maybe when the upcp ran it updated everything.

    I had the primary drive fail on this server and reinstalled everything a couple days ago.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. vipoint

    vipoint Registered

    Joined:
    Mar 10, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    The alt-php versions encoding can be changed in /opt/alt/php54/etc/php.ini.

    You can change the default_charset for an user in /etc/cl.selector/php.conf.

    The directives can be added as follows.

    Directive = default_charset
    Default = iso-8859-1
    Range = utf-8,iso-8859-1
    Type = list

    The user can change this option via control panel in item PHP Settings. Also this can be changed via piniset utility through commandline as follows.

    /usr/bin/piniset --replace="default_charset:utf-8" --version=5.3 --user=username
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice