9

After reading this answer, I decided to change httpd's MPM on my server to worker. But while editing /etc/sysconfig/httpd, I noticed this comment:

# The default processing model (MPM) is the process-based # 'prefork' model. A thread-based model, 'worker', is also # available, but does not work with some modules (such as PHP). # The service must be stopped before changing this variable. # #HTTPD=/usr/sbin/httpd.worker 

I may be interpreting it wrong, but isn't it telling me that worker will not work with mod_php? Because that is what I am currently using.

The server runs CentOS 6.4 and Apache 2.2.

1
  • You can't use mod_php with worker Commented Sep 3, 2013 at 19:37

2 Answers 2

10

No - you can't - you'll have mysterious bugs and crashes as PHP isn't thread-safe.

But you can use worker-mpm for static files and something like php_fcgi or a reverse proxy to another httpd instance only for PHP.

I'm using the latter - it allows me to run multiple sites - all with different permissions and configs on CentOS 6.

0

As far as I know, mod_php is not thread-safe.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.