Does updates automatically change php.ini files?
Announcement
Collapse
No announcement yet.
/opt/alt/phpXX/etc/php.ini changed (bug?)
Collapse
X
-
Hello,
As the description on this thread I have noticed on old servers that our settings are reversed.
We usally change some settings in these files:
/opt/alt/php53/etc/php.ini
/opt/alt/php54/etc/php.ini
/opt/alt/php55/etc/php.ini
/opt/alt/php56/etc/php.ini
/opt/alt/php70/etc/php.ini
Normally I only change these settings:
memory_limit = 384M;
post_max_size = 32M;
upload_max_filesize = 32M;
expose_php = Off
allow_url_fopen = On
date.timezone = "Europe/Berlin"
When checking some servers today I see that these are back to defaults.
Is this correct? Are you changing these files to defaults when doing yum update?
I saw the file is changed this night:
-rw-r--r-- 1 root linksafe 45K Oct 12 03:37 /opt/alt/php53/etc/php.ini
Could you please shed some light on this and give me a solution where the files are not changed or fix it if its a bug?
-
Hello,
We do change “error_log†and “date.timezone†in that files, recommend using /etc/cl.selector/global_php.ini to make them permanent. More: http://kb.cloudlinux.com/2015/09/why...t-php-updates/
Comment
-
Thanks for you reply.
So basically if I add these values in the global_php.ini file they will update in all the /opt/alt/phpXX/etc/php.ini files and will not be overwritten?
Like this:
; This file provides global settings for php.ini of all alt-php packages
; The structure of this file:
; option = value
; To confirm changes please run:
; /usr/sbin/cagefsctl --setup-cl-selector
[Global PHP Settings]
memory_limit = 384M;
post_max_size = 32M;
upload_max_filesize = 32M;
expose_php = Off
allow_url_fopen = On
date.timezone = "Europe/Berlin"
And then run cagefsctl --setup-cl-selector ?
Comment
-
I have tested this and got most of them working, but the only line I cannot get updated is the date.timezone.
Here is the content of my file:
; This file provides global settings for php.ini of all alt-php packages
; The structure of this file:
; option = value
; To confirm changes please run:
; /usr/sbin/cagefsctl --setup-cl-selector
[Global PHP Settings]
memory_limit = 384M
post_max_size = 32M
upload_max_filesize = 32M
expose_php = Off
allow_url_fopen = On
date.timezone = "Europe/Oslo"
max_input_vars = 6000
After running cagefsctl --setup-cl-selector date.timezone still shows as:
date.timezone = "UTC"
On all /opt/alt/phpXX/etc/php.ini files. Could you give me some tips or is it a bug?
Comment
-
You are right, date.timezone could not be changed with global_php.ini file, I was able to reproduce the issue on a test server. We have opened bugreport about this case, will rank it higher now. So far there is no nice solution for this, let wait when it will be fixed.
Comment
-
There are no ETA yet on when date.timezone will be fixed with global_php.ini .
About lines removed from global_php.ini - I checked a bunch of servers, CL6 and CL7 , with different lvemanager/cagefs versions and custom lines are in place. Must be something specific to your setup. Any actions were done to this servers? Please create support ticket so we can investigate in place.
Comment
-
Hello,
The current incarnation of PHP-Selector is that it will not overwrite alt-php ini files if values in them are different from defaults as that could break websites functionality. You have to run a command with a key to overwrite them.
Please read more at http://docs.cloudlinux.com/index.htm...p_ini_opt.html
Comment
Comment