Announcement

Collapse
No announcement yet.

worker MPM vs prefork MPM

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

  • [Suite] worker MPM vs prefork MPM

    According to http://www.php.net/manual/en/install.unix.apache2.php, there are two ways for Apache to do MPM (worker vs prefork). The instructions given in the link indicates that worker MPM may not be safe? Which one should I use for vBulletin? If I use prefork MPM, does that mean I'm not running multhreaded? I have 2 cores I can assign to the server so I want to build Apache right. Thanks.

  • #2
    You're sort of stuck using prefork if you're using PHP. PHP (and subsequent modules) are not entirely threadsafe, so using the worker MPM is not advisable.

    Worker does scale better on > 2 CPU machines, but you'll do just fine with prefork.
    Kyle Christensen
    PbNation.com - one of the biggest and busiest vbulletin forums on the net!

    Comment


    • #3
      Thanks. BTW, while following instructions here and adding the following lines to the httpd.conf caused a problem.
      Code:
      LoadModule php5_module modules/libphp5.so
      <FilesMatch \.php$>
          SetHandler application/x-httpd-php
      </FilesMatch>
      When I tried to start it, it gave me the following. Any idea what might have happened? And what does this libphp5.so module do?
      Code:
      [[email protected] /]# /sbin/service httpd start
      Starting httpd: httpd: Syntax error on line 150 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/libphp5.so into server: /etc/httpd/modules/libphp5.so: cannot open shared object file: No such file or directory
      [FAILED]

      Comment


      • #4
        This could be a few things, do make sure the httpd-devel package is installed.

        Run the following cmd's:
        updatedb
        find / -name libphp5.so -print

        What does it return?
        Gentoo Geek

        Comment


        • #5
          Actually the instructions on PHP.net can't be followed to the letter. I had to do the following:
          1) yum install libxml2-devel
          2) Download devel RPM from MySQL (MySQL-devel-community-5.1.48-1.rhel5.x86_64.rpm)
          3) Execute "./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysqli=mysqlnd --with-libdir=lib64"
          4) make, make install
          5) cp php.ini-production /usr/local/lib/php.ini

          It's the "--with-libdir=lib64" option that I have to use when doing the "configure". No where on PHP.net was this explained. Really hated them for this as it took me ages to find out from someone posting on a forum.

          I'm sorry for bringing this up but the Linux/Unix world still have ages to go before we get to the point where Microsoft is in terms of hassle free installation.

          Comment


          • #6
            Unfortunately, you never stated that you was running a 64bit system, posting all relevant info helps. Glad you got it solved.
            Gentoo Geek

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...
            X