MRatWork Forum by Mustafa Ramadhan
Sawo Project - Kloxo-MR Discussions => Kloxo-MR Development => Topic started by: chrisf on 2014-08-04, 04:11:41
-
Mustafa,
Please add a check for custom configuration files for php5{x}s and for kloxo-hiawatha. This makes sense for numerous reasons.
Allowing the setting of timezone for lxphp. Turning display errors off in production servers. Etc.
Kloxo-Hiawatha I would like to tweak for our servers, I have become very familiar with it and want to change standard settings.
It makes no sense to have to do this every update. Please add this.
Thank you
-
Open '/etc/rc.d/init.d/kloxo' and '/usr/local/lxlabs/kloxo/init/kloxo.init'. You can modified:
phpcgi_ini="/opt/${php_active}/custom/${php_active}.ini"
to
if [ -f /opt/${php_active}/custom/custom.${php_active}.ini ] ; then
phpcgi_ini="/opt/${php_active}/custom/custom.${php_active}.ini"
else
phpcgi_ini="/opt/${php_active}/custom/${php_active}.ini"
fi
-
Done :) please add that to the repo so it doesn't get overwritten. Now lxphp set for my timezone ;)
Can you do something similar for kloxo-hiawatha?
-
Mustafa,
After testing I realized your fix doesn't work completely. The reason is lphp.exe and lxphp.exe are linked to php5{x}s-cli.sh and the starting of lxphp for kloxoMR uses php5{x}s-fpm.sh. php_rc is hardcoded in these files to php5{x}s.ini
After much investigation found easy way to implement the custom.php5{x}s.ini
PLEASE ADD THIS TO THE REPO/RPM as it is simple, and works perfectly.
File: fixlxphpexe
Find
cp -rf ${INIT_DIR}/${base_name}/*.ini /opt/${base_name}/etc
ADD THIS after that line:
if [ -f /opt/${base_name}/custom/custom.${base_name}.ini ] ; then
cp -f /opt/${base_name}/custom/custom.${base_name}.ini /opt/${base_name}/custom/${base_name}.ini
fi
VERY simple, yet works perfect. If custom file exist, we just copy it overtop php5{x}s.ini so lxphp.exe lphp.exe and kloxo-cgi ALL use custom config.
Please confirm adding to repo. THANK YOU.
-
Mustafa, please add my code to fixlxphpexe as it works perfectly, and is best solution to make sure all php for kloxoMR uses custom file if exist.
-
Custom php.ini already use by kloxo.init if exists.
-
Yes, however it only works for the panel. I saw in kloxo.init, but lxphp.exe does not. Any command line use of lxphp ot lphp exe does not use the custom file.
My solution is tested and works perfectly, just like all of your webserver configs, if custom file found, overwrite the conf file. Please add my solution, it is only a few lines and works on ALL lxphp, lphp, anf kloxo cgi as well.
Thank you