Announcement

Collapse
No announcement yet.

CL + Apache2.4 + PHP-FPM + Patch via EasyApache module

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CL + Apache2.4 + PHP-FPM + Patch via EasyApache module

    php-fpm easyapache apache2.4

  • #2
    Hello CloudLinux team,
    Im currently evaluating CloudLinux using a trial account, and Im having trouble adapting my PHP setup (inside cPanel) to CloudLinux.
    The symtpoms are that lve seems not to be working.

    cPanel version: CLOUDLINUX 6.5 x86_64 vmware - WHM 11.44.0 (build 14)
    PHP version: 5.4.29

    Im using a custom PHP setup using PHP-FPM daemon, per-user PHP on-demand pool and custom apache per virtual host includes to pass PHP requests to PHP-FPM via mod_proxy_fcgi via unix sockets.

    Initially, I tested and lvetop it showed nothing despite running ab against the server and seeing huge loads, so I checked here: http://docs.cloudlinux.com/index.htm...ty_matrix.html and found that I needed to patch PHP.

    So I wrote this EasyApache module to apply the patch (with the cloudlinux php-5.4 patch):
    MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.


    I can see the patch applies successfully in EasyApache build log and php-fpm starts but still lvetop is empty even with hundreds of requests.

    EasyApache Log:
    MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.


    lve and iolimits both show up in lsmod
    uname -r gives: 2.6.32-531.17.1.lve1.2.57.el6.x86_64
    hostinglimits_module (shared) is in Apache module list

    Anything else I can check to fix this issue ?

    Comment


    • #3
      1. PHP-FPM doesn work with PHP Selector
      2. PHP-FPM needs to be patched "The DirectAdmin and CloudLinux PHP provide patched version. For other PHP distributions, please, use patches available here: http://repo.cloudlinux.com/cloudlinu...patches.tar.gz"

      Comment


      • #4
        Hello,
        Thank you for your response. I want to make it clear that I understand this after checking documentation from the start. Thats why I disable PHP handler of cPanel (I set it to None) and configure Apache manually using mod_proxy_fcgi.

        My problem is that even after patching with fpm-lve-php5.4.patch during PHP compile with EasyApache, it is not working.
        Requests that are handled are not limited by LVE and don appear in lvetop or LVE Manager in cPanel.

        Is there anything I can do to check if PHP-FPM is compiled with LVE support correctly ?

        Comment


        • #5
          Hello,
          We need to be sure patch has been applied properly, could you please check php-fpm binary if it contains any *lve* words inside? Like:

          strings /path/to/php-fpm | grep lve -i

          and you should get something similar to:

          > liblve.so.0
          > lve_exit
          > init_lve
          > lve_jail_uid
          > destroy_lve
          > lve_enter_flags

          Yes, I saw your first post where you told that patch was applies successfully.

          Comment


          • #6
            Thank you for your hint! I discovered that the patch wasn working because easyapache wasn adding --enable-fpm to the PHP configure line.
            I altered the easyapache module to add the line via another method and it now works.
            Thanks again!

            Comment

            Working...
            X