Page 3 of 7 FirstFirst 12345 ... LastLast
Results 31 to 45 of 94

Thread: [Case 46575] FastCGI Process Manager (FPM) SAPI (new in PHP 5.3.3)

  1. #31
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,307
    cPanel/WHM Access Level

    Root Administrator

    Default Re: [Case 46575] FastCGI Process Manager (FPM) SAPI (new in PHP 5.3.3)

    So far, this is still in the planning stages.

  2. #32
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Apr 2003
    Location
    Houston, TX
    Posts
    396
    cPanel/WHM Access Level

    Root Administrator

    Default Re: [Case 46575] FastCGI Process Manager (FPM) SAPI (new in PHP 5.3.3)

    Sorry to hear it David. Was very much looking into finding a solution for this last week for a dedicated server that really needs it.

  3. #33
    Member
    Join Date
    Jul 2011
    Posts
    8

    Default Re: [Case 46575] FastCGI Process Manager (FPM) SAPI (new in PHP 5.3.3)

    We've been needing to use apc with php when using fastcgi & it appears that using php-fpm is the only way apc can share cache between processes. We definitely need this feature in cpanel. Please give this feature the priority it deserves!

    More info on this:
    PECL :: Request #11988 :: share cache between FAST CGI processes

  4. #34
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: [Case 46575] FastCGI Process Manager (FPM) SAPI (new in PHP 5.3.3)

    I was able to get this working with the following steps:

    1. Add the yum repos to grab php-fpm

    Edit /etc/yum.conf to remove the php exclusion:

    Code:
    vi /etc/yum.conf
    In the file you'll see something like the following:

    exclude=apache* bind-chroot courier* dovecot* exim* httpd* mod_ssl* mysql* nsd* perl* php* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail*
    Remove php* so that it looks like the following (please do not copy and paste these lines from the forum as I'm using quotes rather than code tags to make it easier to see without scrolling, simply remove php* from the line in the file):

    exclude=apache* bind-chroot courier* dovecot* exim* httpd* mod_ssl* mysql* nsd* perl* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail*
    Save the file (:wq). At that point, you would then install CentALT repo and grab php-fpm:

    Code:
    yum --enablerepo=CentALT install php-fpm
    1. Add --with-fpm option

    Code:
    echo "--with-fpm" >> /var/cpanel/easy/apache/rawopts/all_php5
    2. Run EasyApache and select an MPM other than Prefork

    In root SSH, run /scripts/easyapache or, in WHM, go to Software > EasyApache (Apache Update)

    In Step 6 Exhaustive Options list, select MPM Worker

    Of note, you are selecting an MPM other than Prefork as MPM Worker and MPM Event will not allow apxs to be built for PHP due to the fact DSO (mod_php) is disabled when using any MPM other than Prefork. This is the only way I know to build PHP without apxs and apxs being used is what prevents the --with-fpm option from working in PHP 5.3

    Additionally, please note that you must be selecting PHP 5.3.3 or higher as your PHP 5 version. You cannot select anything lower and have the flag work.

    After selecting that option, recompile Apache using "Save and build"

    3. Copy the php-fpm.conf.default file so that you can load php-fpm

    Code:
    cd /usr/local/etc && cp php-fpm.conf.default php-fpm.conf
    In that file, uncomment the following lines (you are welcome to revise the values as needed):

    Code:
    pm.start_servers = 20
    pm.min_spare_servers = 5
    pm.max_spare_servers = 35
    pm.max_requests = 500
    4. Start php-fpm

    Code:
    php-fpm
    You will then see the processes running such as the following example:

    Code:
    root@host [/]# ps aux | grep php-fpm
    root 27795 0.0 0.1 96780 3824 ? Ss 16:29 0:00 php-fpm: master process (/usr/local/etc/php-fpm.conf)
    nobody 27796 0.0 0.1 96772 3672 ? S 16:29 0:00 php-fpm: pool www
    nobody 27797 0.0 0.1 96772 3672 ? S 16:29 0:00 php-fpm: pool www
    nobody 27798 0.0 0.1 96772 3672 ? S 16:29 0:00 php-fpm: pool www
    nobody 27799 0.0 0.1 96772 3672 ? S 16:29 0:00 php-fpm: pool www
    nobody 27800 0.0 0.1 96772 3672 ? S 16:29 0:00 php-fpm: pool www
    nobody 27801 0.0 0.1 96772 3672 ? S 16:29 0:00 php-fpm: pool www
    nobody 27802 0.0 0.1 96772 3672 ? S 16:29 0:00 php-fpm: pool www
    nobody 27803 0.0 0.1 96772 3672 ? S 16:29 0:00 php-fpm: pool www
    nobody 27804 0.0 0.1 96772 3672 ? S 16:29 0:00 php-fpm: pool www
    nobody 27805 0.0 0.1 96772 3672 ? S 16:29 0:00 php-fpm: pool www
    nobody 27806 0.0 0.1 96772 3672 ? S 16:29 0:00 php-fpm: pool www
    nobody 27807 0.0 0.1 96772 3672 ? S 16:29 0:00 php-fpm: pool www
    nobody 27808 0.0 0.1 96772 3672 ? S 16:29 0:00 php-fpm: pool www
    nobody 27809 0.0 0.1 96772 3672 ? S 16:29 0:00 php-fpm: pool www
    nobody 27810 0.0 0.1 96772 3672 ? S 16:29 0:00 php-fpm: pool www
    nobody 27811 0.0 0.1 96772 3672 ? S 16:29 0:00 php-fpm: pool www
    nobody 27812 0.0 0.1 96772 3672 ? S 16:29 0:00 php-fpm: pool www
    nobody 27813 0.0 0.1 96772 3676 ? S 16:29 0:00 php-fpm: pool www
    nobody 27814 0.0 0.1 96772 3676 ? S 16:29 0:00 php-fpm: pool www
    nobody 27815 0.0 0.1 96772 3676 ? S 16:29 0:00 php-fpm: pool www
    Any other configuration settings you would like to set will be in that same /usr/local/etc/php-fpm.conf file. After revising it, please do the following to stop and restart it:

    Code:
    /etc/init.d/php-fpm stop
    php-fpm
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  5. #35
    Member
    Join Date
    Dec 2007
    Posts
    5

    Default Re: [Case 46575] FastCGI Process Manager (FPM) SAPI (new in PHP 5.3.3)

    Not working for me give me these erros.

    Code:
    -- Begin opt 'MM' --
            'MM' requires the option 'MPM Worker' to be off or "skipped".
    
    
            !! Dependency failed for 'Cpanel::Easy::PHP5::MM' skipping option !!


    Code:
            -- Begin step 'setting LDFLAGS env' --
            -- End step 'setting LDFLAGS env' --
    
            -- Begin step 'checking for prefork apache MPM' --
            -- End step 'checking for prefork apache MPM' --
    
            -- Begin step 'configuring php for apache and cli' --
    !!
                    ./configure
                            --disable-cgi
                            --disable-fileinfo
                            --disable-phar
                            --enable-bcmath
                            --enable-calendar
                            --enable-exif
                            --enable-ftp
                            --enable-gd-native-ttf
                            --enable-libxml
                            --enable-magic-quotes
                            --enable-mbstring
                            --enable-pdo=shared
                            --enable-soap
                            --enable-sockets
                            --enable-wddx
                            --enable-zend-multibyte
                            --enable-zip
                            --prefix=/usr/local
                            --with-bz2
                            --with-curl=/opt/curlssl/
                            --with-curlwrappers
                            --with-fpm
                            --with-freetype-dir=/usr
                            --with-gd
                            --with-gettext
                            --with-imap=/opt/php_with_imap_client/
                            --with-imap-ssl=/usr
                            --with-jpeg-dir=/usr
                            --with-kerberos
                            --with-libexpat-dir=/usr
                            --with-libxml-dir=/opt/xml2
                            --with-libxml-dir=/opt/xml2/
                            --with-mcrypt=/opt/libmcrypt/
                            --with-mysql=/usr
                            --with-mysql-sock=/var/lib/mysql/mysql.sock
                            --with-mysqli=/usr/bin/mysql_config
                            --with-openssl=/usr
                            --with-openssl-dir=/usr
                            --with-pcre-regex=/opt/pcre
                            --with-pdo-mysql=shared
                            --with-pdo-sqlite=shared
                            --with-png-dir=/usr
                            --with-pspell
                            --with-sqlite=shared
                            --with-tidy=/opt/tidy/
                            --with-xmlrpc
                            --with-xpm-dir=/usr
                            --with-xsl=/opt/xslt/
                            --with-zlib
                            --with-zlib-dir=/usr

    Code:
    Thank you for using PHP.
    
    Notice: Following unknown configure options were used:
    
    --with-fpm
    
    Check './configure --help' for available options
    
            -- End step 'configuring php for apache and cli' --
    
            -- Begin step 'make php for apache and cli' --
    As you say i select MPM Worker in Exhaustive Options list also "--with-fpm" in rawopts, maybe is fpm-php?

  6. #36
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: [Case 46575] FastCGI Process Manager (FPM) SAPI (new in PHP 5.3.3)

    No, it hasn't anything to do with php-fpm at all. It's an option not allowing you to select MPM Worker in place of Prefork. First of all, you don't have MPM Prefork also checked or some other MPM, correct? You cannot run two MPMs at the same time.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  7. #37
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: [Case 46575] FastCGI Process Manager (FPM) SAPI (new in PHP 5.3.3)

    Actually, it appears to be this option in the PHP Exhaustive Options list:

    MM
    If you have MM selected there, you cannot select MPM Worker apparently. If you cannot select MPM Worker or MPM Event, you won't be able to get this to work. You have the choice either to deselect MM in PHP's Exhaustive Options list or to not use php-fpm
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  8. #38
    Member
    Join Date
    Dec 2007
    Posts
    5

    Default Re: [Case 46575] FastCGI Process Manager (FPM) SAPI (new in PHP 5.3.3)

    deleted this.
    Last edited by Kurogane; 08-17-2011 at 10:13 PM.

  9. #39
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: [Case 46575] FastCGI Process Manager (FPM) SAPI (new in PHP 5.3.3)

    The MM is in the PHP Exhaustive Options list rather than the Apache ones. You'll have to uncheck MM in the PHP Exhaustive Options list. You cannot have both MM and MPM Worker it appears.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  10. #40
    Member
    Join Date
    Dec 2007
    Posts
    5

    Default Re: [Case 46575] FastCGI Process Manager (FPM) SAPI (new in PHP 5.3.3)

    Yeah my bad, when i reply i notice that, read many times to understand that point now i can use MPM Worker but still give me this error

    PHP 5.3.6

    Code:
    Notice: Following unknown configure options were used:
    
    --with-fpm
    
    Check './configure --help' for available options
    
            -- End step 'configuring php for apache and cli' --
    
            -- Begin step 'make php for apache and cli' --

  11. #41
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: [Case 46575] FastCGI Process Manager (FPM) SAPI (new in PHP 5.3.3)

    Sorry I just noticed you posted PHP 5.3.6 as the version. I cannot tell you why you are getting that response when trying to use PHP 5.3.6 if you followed the guide. It did compile for me:

    http://tristanwallace.com/index.php

    It shows "with-fpm" on mine. I am off for the night, so I'll come back to this tomorrow to see if I can determine what isn't working out properly. I don't have time tonight to go further.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

  12. #42
    Member
    Join Date
    Dec 2007
    Posts
    5

    Default Re: [Case 46575] FastCGI Process Manager (FPM) SAPI (new in PHP 5.3.3)

    I'll check more deeper the issue so i compile manually


    Code:
    root@localhost [/home/cpeasyapache/src/php-5.3.6]# ./configure --with-fpm
    Thank you for using PHP.
    
    Notice: Following unknown configure options were used:
    
    --with-fpm
    
    Check './configure --help' for available options
    Lets see what --help give us.

    Code:
    root@localhost [/home/cpeasyapache/src/php-5.3.6]# ./configure --help | grep fpm
      --enable-fpm              EXPERIMENTAL: Enable building of the fpm SAPI executable
      --with-fpm-user[=USER]  Set the user for php-fpm to run as. (default: nobody)
      --with-fpm-group[=GRP]  Set the group for php-fpm to run as. For a system user, this
                      should usually be set to match the fpm username (default: nobody)
    Directive --with-fpm not exist only --enable-fpm.

    I have not tried yet with --enable-fpm but I will try tomorrow.
    Last edited by Kurogane; 08-18-2011 at 03:15 AM.

  13. #43
    Member boonjackmedia's Avatar
    Join Date
    Apr 2010
    Location
    Cincinnati, OH USA
    Posts
    35

    Default Re: [Case 46575] FastCGI Process Manager (FPM) SAPI (new in PHP 5.3.3)

    Tristan you rock! This is great stuff, a few months back I played around with php-fpm via EA3 with no-luck. If I can recall from memory without doing googles, got a question on opcode cache...

    We use Eaccelerator v0.961, but I remember that APC is needed for PHP-FPM for sharing of memory/procs?

    I'm going to give this a shot tonight with APC.
    Mike Sayre

    Blog | Portal

  14. #44
    Member boonjackmedia's Avatar
    Join Date
    Apr 2010
    Location
    Cincinnati, OH USA
    Posts
    35

    Default Re: [Case 46575] FastCGI Process Manager (FPM) SAPI (new in PHP 5.3.3)

    Well all went through fine in EA3, only problem was the php-fpm init.d and .conf files were built in
    /home/cpeasyapache/src/php-5.3.6/sapi/

    So I guess EA3 didn't initialize php-fpm in the /usr/local/etc or in /sbin?

    I copied the config over and had errors when trying to start fpm, after trying a few things... I kept getting sbin errors for line 57...
    $php_fpm_BIN $php_opts

    In the php-fpm.config should the pid line be set?
    It was commented out.

    Here's the init.d.php-fpm.config...

    prefix=/usr/local
    exec_prefix=${prefix}

    php_fpm_BIN=${exec_prefix}/sbin/php-fpm
    php_fpm_CONF=${prefix}/etc/php-fpm.conf
    php_fpm_PID=${prefix}/var/run/php-fpm.pid

    The above was ran with the rawopts --with-fpm
    Should I use --enable-fpm?

    Also is mod_fcgid ok to use with php-fpm?
    Or should I use mod_fastcgi and use a --enable-fastcgi config flag?
    Mike Sayre

    Blog | Portal

  15. #45
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: [Case 46575] FastCGI Process Manager (FPM) SAPI (new in PHP 5.3.3)

    Kurogane, the directive "--with-fpm" does exist and should work as it did for me and boonjackmedia when we tried to use it. We would need to see your entire module list for PHP for me to see if I can reproduce what is happening for you to be unable to use that directive:

    Code:
    php -m
    Additionally, please provide the output for the following:

    Code:
    /usr/local/cpanel/bin/rebuild_phpconf --current
    I'm going to wipe my test machine and redo a setup using my above commands to see if there's something else I had in my environment that made it go more smoothly for me. I am suspecting it might be because, while trying to get this to work, I had removed the /etc/yum.conf exclusion for php and did "yum install php-fpm" at one point. The issue with that was I could never get PHP to detect that php-fpm existed. Since that didn't work, I then recompiled EasyApache afterward using that "--with-fpm" flag and set MPM Worker due to knowing apxs wouldn't be compiled (I learnt that when I was trying to get MPM ITK to work, since it requires mod_php or DSO PHP and it wouldn't compile due to apxs turning off for any MPM selected other than Prefork).

    I'll post back once I've re-tested the steps on a clean setup.
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Page 3 of 7 FirstFirst 12345 ... LastLast

Similar Threads

  1. Anyone moved to PHP-FPM?
    By erick_paper in forum cPanel & WHM Discussions
    Replies: 2
    Last Post: 11-12-2011, 09:16 PM
  2. Replies: 2
    Last Post: 05-29-2011, 11:46 AM
  3. FastCGI not kill process
    By cesarlwh in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 05-16-2011, 07:55 AM
  4. Replies: 10
    Last Post: 12-11-2010, 05:43 PM
  5. Php Sapi
    By areha in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 07-03-2003, 02:33 PM