MRatWork Forum by Mustafa Ramadhan

Sawo Project - Kloxo-MR Discussions => Kloxo-MR Technical Helps => Topic started by: crossing on 2013-08-29, 04:41:57

Title: 'sh /script/cleanup' resets 'etc/php.ini' to Default..
Post by: crossing on 2013-08-29, 04:41:57
'sh /script/cleanup' resets 'etc/php.ini' to Default. Its killing me because my wordpress sites eats alot of php memory and reseting to default after 'sh /script/cleanup' its a big problem. Can this be fixed somehow ? I have my own server and I need somehow to be sure I have 2Gb of memory_limit for all sites whenever cleanup is done.
Title: Re: 'sh /script/cleanup' resets 'etc/php.ini' to Default..
Post by: MRatWork on 2013-08-29, 12:00:33
You can use custom file for /home/phpin/tpl/php.ini.tpl to prevent overwrite php.ini.

That it.
Title: Re: 'sh /script/cleanup' resets 'etc/php.ini' to Default..
Post by: crossing on 2013-08-29, 14:42:56
You mean for example to convert this line :

Code: [Select]
memory_limit = <?php echo $memory_limit_flag?>
in

Code: [Select]
memory_limit = 2048
Title: Re: 'sh /script/cleanup' resets 'etc/php.ini' to Default..
Post by: zenkul on 2013-08-29, 15:02:43
that mean copy file  php.ini.tpl  at /home/phpini/tpl  and rename - paste to be "custom.php.ini.tpl"

"custom" file is customize zone for your config, ... read viewtopic.php?f=15&t=245&p=3449&hilit=rule+custom#p3449 (http://forum.mratwork.com/viewtopic.php?f=15&t=245&p=3449&hilit=rule+custom#p3449)
Title: Re: 'sh /script/cleanup' resets 'etc/php.ini' to Default..
Post by: crossing on 2013-08-29, 18:28:55
Thank you. So all I have to do is to copy php.ini.tpl from  '/home/phpini/tpl' to the same folder but with name 'custom.php.ini.tpl' and 'custom.php.ini.tpl' will be used instead of 'etc/php.ini' when I you run 'sh /script/fixphp'.
Title: Re: 'sh /script/cleanup' resets 'etc/php.ini' to Default..
Post by: crossing on 2013-08-29, 18:28:55
Thank you. So all I have to do is to copy 'php.ini.tpl' from  '/home/phpini/tpl' to the same folder but with name 'custom.php.ini.tpl' and this new file' will be used instead of 'etc/php.ini' when I you run 'sh /script/fixphp'.
Title: Re: 'sh /script/cleanup' resets 'etc/php.ini' to Default..
Post by: crossing on 2013-08-29, 23:35:55
Any way to bypass custom 'home/kloxo/httpd/cp' and 'home/kloxo/httpd/default' default changes when SSH 'sh /script/cleanup'  ?
Title: Re: 'sh /script/cleanup' resets 'etc/php.ini' to Default..
Post by: MRatWork on 2013-08-30, 00:26:20
All index.php inside login, cp, disable, default and webmail taken from /usr/local/lxlabs/kloxo/file/default_index.php.

So, you can learn to defaut_index.php for how to use your custom page. When running cleanup, all this index.php will be overwrite by default_index.php.
Title: Re: 'sh /script/cleanup' resets 'etc/php.ini' to Default..
Post by: crossing on 2013-08-30, 02:11:45
Nice, thank you Mustafa.