Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-03-28, 16:32:53

Author Topic: [REQUEST] custom config for kloxo-hiawatha and lxphp  (Read 3767 times)

0 Members and 1 Guest are viewing this topic.

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
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
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: [REQUEST] custom config for kloxo-hiawatha and lxphp
« Reply #1 on: 2014-08-04, 19:45:04 »
Open '/etc/rc.d/init.d/kloxo' and '/usr/local/lxlabs/kloxo/init/kloxo.init'. You can modified:
Code: [Select]
phpcgi_ini="/opt/${php_active}/custom/${php_active}.ini"to
Code: [Select]
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
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: [REQUEST] custom config for kloxo-hiawatha and lxphp
« Reply #2 on: 2014-08-05, 03:33:01 »
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?
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: [REQUEST] custom config for kloxo-hiawatha and lxphp
« Reply #3 on: 2014-08-05, 07:37:33 »
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
Code: [Select]
cp -rf ${INIT_DIR}/${base_name}/*.ini /opt/${base_name}/etc

ADD THIS after that line:
Code: [Select]
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.
« Last Edit: 2014-08-05, 07:39:29 by chrisf »
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: [REQUEST] custom config for kloxo-hiawatha and lxphp
« Reply #4 on: 2014-09-06, 17:17:39 »
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.
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: [REQUEST] custom config for kloxo-hiawatha and lxphp
« Reply #5 on: 2014-09-07, 04:30:09 »
Custom php.ini already use by kloxo.init if exists.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline chrisf

  • Senior Master
  • **
  • Posts: 883
  • Karma: +11/-1
  • Gender: Male
  • Be the change that you wish to see in the world.
    • View Profile
    • Conviction's Hosting
Re: [REQUEST] custom config for kloxo-hiawatha and lxphp
« Reply #6 on: 2014-09-07, 04:57:25 »
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
Christopher

Knowledge in: PHP, Perl, MySQL, Javascript, Actionscript, FLASH, HTML, CSS
Server Administrator / Developer: https://convictionshosting.com

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine

Page created in 0.031 seconds with 22 queries.

web stats analysis