Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    South East U.K.

    Apache worker MPM & PHP

    I've read that the Apache worker MPM is more resourse friendly but breaks PHP. Is there any way of getting the two to work together?

    Thanks for looking

  2. #2
    Join Date
    Apr 2003
    San Jose, CA.
    From the FAQ:

    Why shouldn't I use Apache2 with a threaded MPM in a production environment?

    PHP is glue. It is the glue used to build cool web applications by sticking dozens of 3rd-party libraries together and making it all appear as one coherent entity through an intuitive and easy to learn language interface. The flexibility and power of PHP relies on the stability and robustness of the underlying platform. It needs a working OS, a working web server and working 3rd-party libraries to glue together. When any of these stop working PHP needs ways to identify the problems and fix them quickly. When you make the underlying framework more complex by not having completely separate execution threads, completely separate memory segments and a strong sandbox for each request to play in, feet of clay are introduced into PHP's system.

    If you feel you have to use a threaded MPM, look at a FastCGI configuration where PHP is running in its own memory space.

    And finally, this warning against using a threaded MPM is not as strong for Windows systems because most libraries on that platform tend to be threadsafe.
    Daved @ Lightwave Networking, LLC.
    AS1426 https:/
    Primary Bandwidth: EGIHosting (NLayer, NTT, HE, Cogent)
    Xen PV VPS Hosting

  3. #3
    Join Date
    Oct 2003
    The Netherlands
    Yes, as said you should use mod_fastcgi and a fastcgi capable php.

    You check php by issuing: php -i | grep fastcgi
    of php-cgi -v

    mod_fastcgi is probably included in your install.
    You can learn more about setting this up on:

  4. #4
    Join Date
    Dec 2005
    I've never had any problems with worker mpm breaking php? Just make sure you use threaded modules.

    I tend to use mpm_prefork on smaller servers and mpm_worker on all larger servers, and the performance is excellent.

Similar Threads

  1. How to replace apache prefork to apache worker on Centos 5??
    By toy_boy in forum Hosting Security and Technology
    Replies: 5
    Last Post: 09-09-2009, 12:59 AM
  2. Apache MPM worker
    By ryan14 in forum Hosting Security and Technology
    Replies: 2
    Last Post: 09-04-2009, 03:35 AM
  3. Apache Worker: MaxSpareThreads etc...
    By XyPL in forum Hosting Security and Technology
    Replies: 0
    Last Post: 09-25-2008, 12:41 PM
  4. Apache 2.2.x and MPM Worker
    By Skylands in forum Hosting Security and Technology
    Replies: 4
    Last Post: 08-23-2008, 02:34 PM
  5. [QUESTION] Apache 2 - mpm worker or prefork ???
    By ASVJSC in forum Hosting Security and Technology
    Replies: 2
    Last Post: 05-18-2008, 05:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts