Statically Compiling Apache and PHP

Discussion in 'Server Operation' started by gainesms, Sep 21, 2011.

  1. gainesms

    gainesms New Member

    I'd like to statically statically compile the PHP module into Apache, hoping this might speed up my web server.

    I have something like this:

    For Apache:

    ./configure \
    --enable-so \
    --enable-mods-static="list_of_static_modules" \
    --enable-mods-shared="list_of_dso_modules" \
    --with-module="/link/to/" \

    For PHP:

    ./configure \
    --with-apxs2=/usr/local/apache2/bin/apxs \

    The problem being that I obviously can't compile PHP with the Apache directive because Apache hasn't yet been compiled; and I can't compile Apache with the PHP module as PHP hasn't yet been compiled.

    Any idea on how to resolve ?
  2. Ben

    Ben ISPConfig Developer ISPConfig Developer

    Afaik it is not possible to do it that way as you need the DSO of php.

    But the other question is what you mean by "speed up". mod_php is the fasted way to implement php into apache, as it is loaded on apache's startup and not each time a script is called, e.g. in cgi mode. so how will you measure the "speed up" result in the end? If you think you have a bottleneck anywhere, how did you detect it?

Share This Page