5.4 default_charset
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.
-
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. 0 -
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. 0 -
Hello :) Please see the documentation for the PHP selector: [url=http://docs.cloudlinux.com/custom_php_ini_options.html]PHP Selector > Custom PHP.ini options Have you tried following these instructions to apply the custom values? Thank you. 0 -
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. 0 -
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 0
Please sign in to leave a comment.
Comments
5 comments