7

I found it from http://www.php.net/manual/en/configure.about.php

These are the configure options of PHP compilation

--with-apache[=DIR]
    Build a static Apache module. DIR is the top-level Apache build directory, defaults to /usr/local/apache.

--with-apxs2[=FILE]
    Build shared Apache 2.0 module. FILE is the optional pathname to the Apache apxs tool; defaults to apxs.

What is meaning of static and shared?

1 Answer 1

14

static: The PHP module will be compiled into the Apache binary itself and will be loaded everytime Apache is started.

dynamic: The PHP module will be compiled as dynamic shared library and you can choose whether you want to load it or not.

Apache may be faster with static modules but in order to remove or update an module you have to recompile the whole code.

Sign up to request clarification or add additional context in comments.

2 Comments

Ummm, mat, are you aware of the fact that PHP is an interpreted language, therefore it cannot be compiled?
The PHP interpreter itself has to be compiled. I was talking about mod_php for Apache, not the PHP code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.