[Solved]Running EasyApache without first switching to Apache?

Discussion in 'General' started by tina, Dec 1, 2010.

  1. tina

    tina Well-Known Member

    Is there a way to run EasyApache without first switching from LiteSpeed to Apache?

    If we leave LiteSpeed running when we run EasyApache, it results in an error at the very end of the process, saying Apache is not running, and keeps reverting back to the old version.
    Last edited by a moderator: Dec 14, 2010
  2. webizen

    webizen Well-Known Member

    We are aware of this. A plugin to circumvent this inconvenience is on its way and will be put together with 4.0.18 release.
  3. tina

    tina Well-Known Member

    Awesome! :)
  4. NiteWave

    NiteWave Administrator

    tina: 4.0.18 is there. please test.
  5. tina

    tina Well-Known Member

    OK, tested on 3 machines.

    2 machines ran the Apache restart tests correctly the 1st time.

    1 machine did not switch to Apache the 1st time (so EasyApache failed), due to this error:

    We ran EasyApache on that machine for the 2nd time, and it switched to Apache correctly for the restart tests.

    On all 3 machines, the matching PHP binaries for LiteSpeed could not be automatically built. The error message is as follows:

    We had to manually build the matching PHP binaries for all 3 machines.

    Overall, other than the small hiccups described above, things went quite well, and we did not have to manually switch to Apache before running EasyApache on all 3 machines. :)
  6. Lauren

    Lauren LiteSpeed Staff Staff Member

    Litespeed whm plugin will not work properly if exec is diabled, as many places require shell command execution. Please check

    and search for:
    disable_functions =
    remove exec from the list.
  7. tina

    tina Well-Known Member

    exec() is not disabled in /usr/local/cpanel/3rdparty/etc/php.ini and 'disable_functions =' is empty (no value set).

    If you check '/scripts/before_httpd_restart_tests' it is running '/usr/local/cpanel/whostmgr/docroot/cgi/lsws/whm_before_httpd_restart_tests.sh' which in turn runs '/usr/local/bin/php ./whm_buildPHP_hook.php $PHP_CSV' on line 20.

    As you can see, it is using '/usr/local/bin/php' which is the main php that is being used by shared hosting accounts (which has exec() disabled for security reasons). So the script is not actually using cpphp (perhaps this is the bug?).

    cpphp is located at '/var/cpanel/3rdparty/bin/php' but we are not sure if it is safe to change 'whm_before_httpd_restart_tests.sh' to use that instead. Would that fix the problem and is it safe to change it?
  8. Lauren

    Lauren LiteSpeed Staff Staff Member

    give a try, should work

    update /usr/local/cpanel/whostmgr/docroot/cgi/lsws/whm_before_httpd_restart_tests.sh
    replace /usr/local/bin/php with /usr/local/cpanel/3rdparty/bin/php

    we'll update package on our side.

  9. tina

    tina Well-Known Member

    We tried replacing it and it does seem to work. Thanks! :)
  10. mistwang

    mistwang LiteSpeed Staff

    Please try the updated 4.0.18 package.

Share This Page