Help - problem after config subversion

Discussion in 'Server Operation' started by satimis, Nov 7, 2006.

  1. satimis

    satimis New Member

    Hi folks,

    ubuntu-6.06.1-LAMP-server

    This is a test on building a server.

    I followed
    Setup Subversion with Apache2 on Ubuntu
    http://www.jessejcollins.com/blog/i...-Setup-Subversion-with-Apache2-on-Ubuntu.html


    encountering problem on running;
    $ sudo /etc/init.d/apache2 restart
    Code:
     * Forcing reload of apache 2.0 web server...
    [Mon Nov 06 11:50:49 2006] [crit] Apache is running a threaded MPM, but
    your PHP Module is not compiled to be threadsafe.  You need to recompile
    PHP.
    Pre-configuration failed                   [fail]
    Whether I need to re-install PHP and reconfig it thereafter? Please help. TIA


    B.R.
    satimis
     
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Which Apache MPM are you using? You must use the prefork MPM, otherwise you cannot use PHP as an Apache module.
     
  3. satimis

    satimis New Member

    Hi falko,

    Tks for your advice.

    $ sudo apt-cache search apache2 | grep mpm
    Code:
    apache2-mpm-perchild - experimental high speed perchild threaded model for Apache2
    apache2-mpm-prefork - traditional model for Apache2
    apache2-mpm-worker - high speed threaded model for Apache2
    $ which apache2-mpm
    No printout

    $ sudo find / -name apache2-mpm
    No printout

    I hesitate whether it has been installed?

    The small tool "equery" is not installed on the PC. Nor can I find the package offering this tool.

    $ sudo equery l apache2-mem
    Code:
    sudo: equery: command not found
    
    $ which equery
    no printout

    Tks


    Edit-1:- * * *

    $ ls /etc/apache2/mods-enabled/ | grep mpm
    $ ls /etc/apache2/mods-available/ | grep mpm
    both no printout

    $ ls /etc/apache2/mods-available/
    Code:
    actions.load      cgid.load              expires.load     mime_magic.load     ssl.conf
    asis.load         cgi.load               ext_filter.load  php5.conf           ssl.load
    auth_anon.load    dav_fs.conf            file_cache.load  php5.load           suexec.load
    auth_dbm.load     dav_fs.load            headers.load     proxy.conf          unique_id.load
    auth_digest.load  dav.load               imap.load        proxy_connect.load  userdir.conf
    auth_ldap.load    dav_svn.conf           include.load     proxy_ftp.load      userdir.load
    auth_mysql.load   dav_svn.conf.original  info.load        proxy_http.load     usertrack.load
    cache.load        dav_svn.load           ldap.load        proxy.load          vhost_alias.load
    cern_meta.load    deflate.load           mem_cache.load   rewrite.load
    cgid.conf         disk_cache.load        mime_magic.conf  speling.load
    $ ls /etc/apache2/mods-enabled/
    Code:
    cgid.conf  dav_fs.conf  dav.load      dav_svn.load  php5.load  ssl.load      userdir.load
    cgid.load  dav_fs.load  dav_svn.conf  php5.conf     ssl.conf   userdir.conf
    

    B.R.
    satimis
     
    Last edited: Nov 9, 2006
  4. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    You can find out about your MPM by running

    Code:
    apache2 -V
    A sample output looks like this:

    Code:
    Server version: Apache/2.0.54
    Server built:   Sep  5 2005 11:15:09
    Server's Module Magic Number: 20020903:9
    Architecture:   32-bit
    Server compiled with....
    [B][COLOR="Red"] -D APACHE_MPM_DIR="server/mpm/prefork"[/COLOR][/B]
     -D APR_HAS_SENDFILE
     -D APR_HAS_MMAP
     -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
     -D APR_USE_SYSVSEM_SERIALIZE
     -D APR_USE_PTHREAD_SERIALIZE
     -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
     -D APR_HAS_OTHER_CHILD
     -D AP_HAVE_RELIABLE_PIPED_LOGS
     -D HTTPD_ROOT=""
     -D SUEXEC_BIN="/usr/lib/apache2/suexec2"
     -D DEFAULT_PIDLOG="/var/run/httpd.pid"
     -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
     -D DEFAULT_LOCKFILE="/var/run/accept.lock"
     -D DEFAULT_ERRORLOG="logs/error_log"
     -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
     -D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"
     
  5. satimis

    satimis New Member

    Hi falko,

    $ apache2 -V
    Code:
    Server version: Apache/2.0.55
    Server built:   Jul 26 2006 18:01:22
    Server's Module Magic Number: 20020903:11
    Architecture:   64-bit
    Server compiled with....
     -D APACHE_MPM_DIR="server/mpm/prefork"
     -D APR_HAS_SENDFILE
     -D APR_HAS_MMAP
     -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
     -D APR_USE_SYSVSEM_SERIALIZE
     -D APR_USE_PTHREAD_SERIALIZE
     -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
     -D APR_HAS_OTHER_CHILD
     -D AP_HAVE_RELIABLE_PIPED_LOGS
     -D HTTPD_ROOT=""
     -D SUEXEC_BIN="/usr/lib/apache2/suexec2"
     -D DEFAULT_PIDLOG="/var/run/apache2.pid"
     -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
     -D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"
     -D DEFAULT_ERRORLOG="logs/error_log"
     -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
     -D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"
    
    Following line looks different from your sample;
    Code:
     -D DEFAULT_PIDLOG="/var/run/apache2.pid"
    
    " -D APACHE_MPM_DIR="server/mpm/prefork"" is there.

    Tks.

    B.R.
    satimis
     
  6. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    So your Apache is using the correct MPM...
    Can you post the part of /etc/apache2/apache2.conf that looks like this?

    Code:
    ##
    ## Server-Pool Size Regulation (MPM specific)
    ##
    
    # prefork MPM
    # StartServers ......... number of server processes to start
    # MinSpareServers ...... minimum number of server processes which are kept spare
    # MaxSpareServers ...... maximum number of server processes which are kept spare
    # MaxClients ........... maximum number of server processes allowed to start
    # MaxRequestsPerChild .. maximum number of requests a server process serves
    <IfModule prefork.c>
    StartServers             5
    MinSpareServers          5
    MaxSpareServers         15
    MaxClients             200
    MaxRequestsPerChild  10000
    </IfModule>
    
    # pthread MPM
    # StartServers ......... initial  number of server processes to start
    # MaxClients ........... maximum  number of server processes allowed to start
    # MinSpareThreads ...... minimum  number of worker threads which are kept spare
    # MaxSpareThreads ...... maximum  number of worker threads which are kept spare
    # ThreadsPerChild ...... constant number of worker threads in each server process
    # MaxRequestsPerChild .. maximum  number of requests a server process serves
    <IfModule worker.c>
    StartServers         2
    MaxClients         150
    MinSpareThreads     25
    MaxSpareThreads     75
    ThreadsPerChild     25
    MaxRequestsPerChild  0
    </IfModule>
    
    # perchild MPM
    # NumServers ........... constant number of server processes
    # StartThreads ......... initial  number of worker threads in each server process
    # MinSpareThreads ...... minimum  number of worker threads which are kept spare
    # MaxSpareThreads ...... maximum  number of worker threads which are kept spare
    # MaxThreadsPerChild ... maximum  number of worker threads in each server process
    # MaxRequestsPerChild .. maximum  number of connections per server process (then it dies)
    <IfModule perchild.c>
    NumServers           5
    StartThreads         5
    MinSpareThreads      5
    MaxSpareThreads     10
    MaxThreadsPerChild  20
    MaxRequestsPerChild  0
    AcceptMutex fcntl
    </IfModule>
    What's the output of
    Code:
    ls -la /etc/apache2/mods-enabled
    and
    Code:
    ls -la /etc/apache2/mods-available
    ?
     
  7. satimis

    satimis New Member

    Hi falko,

    $ cat /etc/apache2/apache2.conf
    Code:
    ....
    # prefork MPM
    # StartServers ......... number of server processes to start
    # MinSpareServers ...... minimum number of server processes which are kept spare# MaxSpareServers ...... maximum number of server processes which are kept spare# MaxClients ........... maximum number of server processes allowed to start
    # MaxRequestsPerChild .. maximum number of requests a server process serves
    <IfModule prefork.c>
    StartServers         5
    MinSpareServers      5
    MaxSpareServers     10
    MaxClients          20
    MaxRequestsPerChild  0
    </IfModule>
    
    # pthread MPM
    # StartServers ......... initial  number of server processes to start
    # MaxClients ........... maximum  number of server processes allowed to start
    # MinSpareThreads ...... minimum  number of worker threads which are kept spare
    # MaxSpareThreads ...... maximum  number of worker threads which are kept spare
    # ThreadsPerChild ...... constant number of worker threads in each server process
    # MaxRequestsPerChild .. maximum  number of requests a server process serves
    <IfModule worker.c>
    StartServers         2
    MaxClients         150
    MinSpareThreads     25
    MaxSpareThreads     75
    ThreadsPerChild     25
    MaxRequestsPerChild  0
    </IfModule>
    
    # perchild MPM
    # NumServers ........... constant number of server processes
    # StartThreads ......... initial  number of worker threads in each server process
    # MinSpareThreads ...... minimum  number of worker threads which are kept spare
    # MaxSpareThreads ...... maximum  number of worker threads which are kept spare
    # MaxThreadsPerChild ... maximum  number of worker threads in each server process
    # MaxRequestsPerChild .. maximum  number of connections per server process (then it dies)
    <IfModule perchild.c>
    NumServers           5
    StartThreads         5
    MinSpareThreads      5
    MaxSpareThreads     10
    MaxThreadsPerChild  20
    MaxRequestsPerChild  0
    AcceptMutex fcntl
    </IfModule>
    ....
    
    $ ls -la /etc/apache2/mods-enabled
    Code:
    total 8
    drwxr-xr-x 2 root root 4096 2006-11-09 11:39 .
    drwxr-xr-x 8 root root 4096 2006-11-09 12:15 ..
    lrwxrwxrwx 1 root root   36 2006-11-09 11:39 cgi.load -> /etc/apache2/mods-available/cgi.load
    lrwxrwxrwx 1 root root   29 2006-11-06 10:48 dav_fs.conf -> ../mods-available/dav_fs.conf
    lrwxrwxrwx 1 root root   29 2006-11-06 10:48 dav_fs.load -> ../mods-available/dav_fs.load
    lrwxrwxrwx 1 root root   26 2006-11-06 10:48 dav.load -> ../mods-available/dav.load
    lrwxrwxrwx 1 root root   30 2006-11-06 10:48 dav_svn.conf -> ../mods-available/dav_svn.conf
    lrwxrwxrwx 1 root root   30 2006-11-06 10:48 dav_svn.load -> ../mods-available/dav_svn.load
    lrwxrwxrwx 1 root root   37 2006-10-17 04:38 php5.conf -> /etc/apache2/mods-available/php5.conf
    lrwxrwxrwx 1 root root   37 2006-10-17 04:38 php5.load -> /etc/apache2/mods-available/php5.load
    lrwxrwxrwx 1 root root   36 2006-10-29 17:26 ssl.conf -> /etc/apache2/mods-available/ssl.conf
    lrwxrwxrwx 1 root root   36 2006-10-29 17:26 ssl.load -> /etc/apache2/mods-available/ssl.load
    lrwxrwxrwx 1 root root   40 2006-10-17 04:38 userdir.conf -> /etc/apache2/mods-available/userdir.conf
    lrwxrwxrwx 1 root root   40 2006-10-17 04:38 userdir.load -> /etc/apache2/mods-available/userdir.load
    

    $ ls -la /etc/apache2/mods-available
    Code:
    total 200
    drwxr-xr-x 2 root root 4096 2006-11-09 11:39 .
    drwxr-xr-x 8 root root 4096 2006-11-09 12:15 ..
    -rw-r--r-- 1 root root   66 2006-07-26 18:03 actions.load
    -rw-r--r-- 1 root root   60 2006-07-26 18:03 asis.load
    -rw-r--r-- 1 root root   70 2006-07-26 18:03 auth_anon.load
    -rw-r--r-- 1 root root   68 2006-07-26 18:03 auth_dbm.load
    -rw-r--r-- 1 root root   74 2006-07-26 18:03 auth_digest.load
    -rw-r--r-- 1 root root  130 2006-07-26 18:03 auth_ldap.load
    -rw-r--r-- 1 root root   72 2006-04-06 04:58 auth_mysql.load
    -rw-r--r-- 1 root root   62 2006-07-26 18:03 cache.load
    -rw-r--r-- 1 root root   70 2006-07-26 18:03 cern_meta.load
    -rw-r--r-- 1 root root   61 2006-07-26 18:03 cgid.conf
    -rw-r--r-- 1 root root   60 2006-07-26 18:03 cgid.load
    -rw-r--r-- 1 root root   58 2006-07-26 18:03 cgi.load
    -rw-r--r-- 1 root root   37 2006-07-26 18:03 dav_fs.conf
    -rw-r--r-- 1 root root   64 2006-07-26 18:03 dav_fs.load
    -rw-r--r-- 1 root root   58 2006-07-26 18:03 dav.load
    -rw-r--r-- 1 root root 1283 2006-11-06 11:40 dav_svn.conf
    -rw-r--r-- 1 root root 1331 2006-11-06 11:37 dav_svn.conf.original
    -rw-r--r-- 1 root root  174 2006-05-08 07:40 dav_svn.load
    -rw-r--r-- 1 root root   66 2006-07-26 18:03 deflate.load
    -rw-r--r-- 1 root root   72 2006-07-26 18:03 disk_cache.load
    -rw-r--r-- 1 root root   66 2006-07-26 18:03 expires.load
    -rw-r--r-- 1 root root   72 2006-07-26 18:03 ext_filter.load
    -rw-r--r-- 1 root root   72 2006-07-26 18:03 file_cache.load
    -rw-r--r-- 1 root root   66 2006-07-26 18:03 headers.load
    -rw-r--r-- 1 root root   60 2006-07-26 18:03 imap.load
    -rw-r--r-- 1 root root   66 2006-07-26 18:03 include.load
    -rw-r--r-- 1 root root   60 2006-07-26 18:03 info.load
    -rw-r--r-- 1 root root   60 2006-07-26 18:03 ldap.load
    -rw-r--r-- 1 root root   70 2006-07-26 18:03 mem_cache.load
    -rw-r--r-- 1 root root   85 2006-07-26 18:03 mime_magic.conf
    -rw-r--r-- 1 root root   72 2006-07-26 18:03 mime_magic.load
    -rw-r--r-- 1 root root  133 2006-07-18 23:21 php5.conf
    -rw-r--r-- 1 root root   59 2006-07-18 23:21 php5.load
    -rw-r--r-- 1 root root  840 2006-07-26 18:03 proxy.conf
    -rw-r--r-- 1 root root   78 2006-07-26 18:03 proxy_connect.load
    -rw-r--r-- 1 root root   70 2006-07-26 18:03 proxy_ftp.load
    -rw-r--r-- 1 root root   72 2006-07-26 18:03 proxy_http.load
    -rw-r--r-- 1 root root  316 2006-07-26 18:03 proxy.load
    -rw-r--r-- 1 root root   66 2006-07-26 18:03 rewrite.load
    -rw-r--r-- 1 root root   66 2006-07-26 18:03 speling.load
    -rw-r--r-- 1 root root 3545 2006-07-26 18:03 ssl.conf
    -rw-r--r-- 1 root root   58 2006-07-26 18:03 ssl.load
    -rw-r--r-- 1 root root   64 2006-07-26 18:03 suexec.load
    -rw-r--r-- 1 root root   70 2006-07-26 18:03 unique_id.load
    -rw-r--r-- 1 root root  244 2006-07-26 18:03 userdir.conf
    -rw-r--r-- 1 root root   66 2006-07-26 18:03 userdir.load
    -rw-r--r-- 1 root root   70 2006-07-26 18:03 usertrack.load
    -rw-r--r-- 1 root root   74 2006-07-26 18:03 vhost_alias.load
    
    Tks

    B.R.
    satimis
     
  8. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Please change
    Code:
    <IfModule prefork.c>
    StartServers         5
    MinSpareServers      5
    MaxSpareServers     10
    MaxClients          20
    MaxRequestsPerChild  0
    </IfModule>
    to
    Code:
    <IfModule prefork.c>
    StartServers         5
    MinSpareServers      5
    MaxSpareServers     10
    MaxClients          20
    MaxRequestsPerChild  [B][COLOR="Red"]10000[/COLOR][/B]
    </IfModule>
    and restart Apache.
     
  9. satimis

    satimis New Member

    Hi falko,

    Apache2 is now running.

    $ sudo /etc/init.d/apache2 restart
    Code:
    Password:
     * Forcing reload of apache 2.0 web server... apache2: Could not determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    apache2: Could not determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                             [ ok ]
    After changing the line on;
    /etc/apache2/ports.conf
    Code:
    Listen 80 Listen 40
    to
    Code:
    Listen 80
    Listen 44
    
    They must be in 2 lines.


    Shall I make any change on your suggestion?
    [/quote]

    Tks.

    B.R.
    satimis
     
  10. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    No, if it's working it's ok. :)
     
  11. satimis

    satimis New Member

    Noted with tks.

    B.R.
    satimis
     

Share This Page