Recompile the PHP coming with ISPConfig

Discussion in 'Installation/Configuration' started by hmfireball, May 30, 2008.

  1. hmfireball

    hmfireball New Member


    I want to recompile the PHP coming with ISPConfig so that I can include mcrypt.
    (PhpMyAdmin claims about the mcrypt extension not loaded).
    What should I do?
    I don't want to reinstall ISPConfig as I'm afraid I might lose some configuration settings and changes I made in proFTPd config file after ISPConfig installation.
    Thanks for your help.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    To recompile php manually for ISPConfig, have a look at the configure options in the script install_ispconfig/compile_aps/compile
  3. hmfireball

    hmfireball New Member

    Thanks till, I'll look at this file.
  4. hmfireball

    hmfireball New Member

    What should I add to?

    ./configure --with-apxs=${INSTALL_ROOT}/httpd/bin/apxs --enable-track-vars --enable-sockets --enable-mbstring=all --with-config-file-path=${INSTALL_ROOT}/php --enable-ftp --prefix=${INSTALL_ROOT}/php ${WITH_OPENSSL} ${WITH_MYSQL} --disable-libxml --disable-dom --disable-xml ${WITH_ZLIB_DIR} --disable-xmlreader --disable-xmlwriter --disable-simplexml --without-pear
    And how/where to compile mcrypt lib?
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Download the latest php sources from
    2) Take this configure string, replace ${INSTALL_ROOT} with /root/ispconfig
    3) Add all additional options that you like to add, for details please see the php documentation or run configure --help
    4) Run the configure string in the php source directory and the run make and make install
  6. ethanlifka

    ethanlifka New Member

    Add mcrypt to ispconfig php

    I was able to add mcrypt without recompiling.

    My /etc/php.ini used "/usr/lib/php/modules" for its extension_dir. So I used it in the ispconfig dir. Your modules dir maybe different depending on your distro.

    edit php.ini in /root/ispconfig/php

    extension_dir = "/usr/lib/php/modules"


    restart ispconfig_server

    I have ispconfig 2.2.24 with Fedora9

    Worked great!

    You could also create a dir in /root/ispconfig/php

    mkdir /root/ispconfig/php/modules
    cp /usr/lib/php/modules/ /root/ispconfig/php/modules/
    vi /root/ispconfig/php/php.ini
    extension_dir = "/root/ispconfig/php/modules"
    /etc/init.d/ispconfig_server restart

    Recompiling may depend on you distro as well.
  7. truelights

    truelights New Member

    I was running command ./configure --with-apxs=/root/ispconfig /httpd/bin/apxs
    the results were:
    1. blabla
    2. blabla
    3. 'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs
    The output of /root/ispconfig follows
    ./configure: line 4491: /root/ispconfig: is a directory
    configure: error: Aborting

    anything went wrong?

    Thank you
  8. falko

    falko Super Moderator ISPConfig Developer

    It must be
    ./configure --with-apxs=/root/ispconfig/httpd/bin/apxs
    ./configure --with-apxs=/root/ispconfig /httpd/bin/apxs
    (you have a space in the path).
  9. truelights

    truelights New Member

    Two PHP Installations (Own PHP Instalation vs ISPConfig PHP autoinstalation)

    I have solved the php installation by uninstall the original CentOS 5.2's php (php 5.1.6) and rpm a new php. And now I have two php installations on my server as I told on the title, some of the features running as well, but I think it's not usual to run two same apps in one machine, any suggestion pls?
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPÜConfig has always its own php, thats absolutely normal and this php is for the ispconfig control panel only and shall not be used for your hosted webpages!
  11. ethanlifka

    ethanlifka New Member

    I too had the Error: "'apxs' is not in your path. Try to use --with-apxs=/path/to/apxs"

    when trying to recompile. I tried all types of configurations when recompiling and still had erros so that is why I tried other solutions.

    The above solution that I posted worked for me. I did NOT have to recompile php.

    hope this helps others.

Share This Page