The Perfect Server - CentOS 6.2 x86_64 With Apache2 [ISPConfig 3] - SUPHP

Discussion in 'HOWTO-Related Questions' started by epretorious, Jan 13, 2012.

  1. epretorious

    epretorious New Member

    While performing Step 15 ("Installing Apache2 With mod_php, mod_fcgi/PHP5, And suPHP ") of "The Perfect Server - CentOS 6.2 x86_64 With Apache2 [ISPConfig 3]" phpMyAdmin stopped working. In fact, every time that I access phpMyAdmin, one of Apache's child processes dies:

    Code:
    [eric@ispconfig-1 suphp-0.7.1]$ sudo tail -f /var/log/httpd/error_log
    ...
    [Thu Jan 12 21:35:38 2012] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fcgid/2.3.6 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
    [Thu Jan 12 21:35:52 2012] [notice] child pid 2145 exit signal Segmentation fault (11)
    [Thu Jan 12 21:36:51 2012] [notice] child pid 2146 exit signal Segmentation fault (11)
    [Thu Jan 12 21:36:55 2012] [notice] child pid 2147 exit signal Segmentation fault (11)
    
    I created the configuration file for suphp using the sample file (/tmp/suphp-0.7.1/doc/suphp.conf-example) and modified according to the recipe (e.g., webserver_user=apache)...

    Code:
    [global]
    ;Path to logfile
    logfile=/var/log/httpd/suphp.log
    
    ;Loglevel
    loglevel=info
    
    ;User Apache is running as
    webserver_user=apache
    
    ;Path all scripts have to be in
    docroot=/var/www:${HOME}/public_html
    
    ;Path to chroot() to before executing script
    ;chroot=/mychroot
    
    ; Security options
    allow_file_group_writeable=false
    allow_file_others_writeable=false
    allow_directory_group_writeable=false
    allow_directory_others_writeable=false
    
    ;Check wheter script is within DOCUMENT_ROOT
    check_vhost_docroot=true
    
    ;Send minor error messages to browser
    errors_to_browser=false
    
    ;PATH environment variable
    env_path=/bin:/usr/bin
    
    ;Umask to set, specify in octal notation
    umask=0077
    
    ; Minimum UID
    min_uid=100
    
    ; Minimum GID
    min_gid=100
    
    [handlers]
    ;Handler for php-scripts
    x-httpd-php="php:/usr/bin/php"
    
    ;Handler for CGI-scripts
    x-suphp-cgi="execute:!self"
    Any ideas what might be causing this?
     
    Last edited: Jan 13, 2012
  2. epretorious

    epretorious New Member

    This problem persists even after removing the suphp configuration file and restarting apache!
    Code:
    [eric@ispconfig-1 suphp-0.7.1]$ sudo mv /etc/httpd/conf.d/suphp.conf ~
    
    [eric@ispconfig-1 suphp-0.7.1]$ sudo service httpd restart
    Stopping httpd:                                            [  OK  ]
    Starting httpd:                                            [  OK  ]
    
    [eric@ispconfig-1 suphp-0.7.1]$ sudo tail -f /var/log/httpd/error_log
    [Thu Jan 12 21:49:49 2012] [notice] caught SIGTERM, shutting down
    [Thu Jan 12 21:49:50 2012] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
    [Thu Jan 12 21:49:50 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
    [Thu Jan 12 21:49:50 2012] [notice] Digest: generating secret for digest authentication ...
    [Thu Jan 12 21:49:50 2012] [notice] Digest: done
    [Thu Jan 12 21:49:51 2012] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fcgid/2.3.6 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
    [Thu Jan 12 21:49:57 2012] [notice] child pid 2249 exit signal Segmentation fault (11)
    
     
    Last edited: Jan 13, 2012
  3. eddie303

    eddie303 New Member

    Same happens here as well. Friday the 13th. Let's go and try it without suphp :) Maybe drink some beer :)
     
  4. eddie303

    eddie303 New Member

    After a while of trial and error, it turns out to be eaccelerator the problem... After removing it, everything starts to work magically....
     
  5. epretorious

    epretorious New Member

    Works for me too:
    Code:
    [eric@ispconfig-1 ~]$ sudo yum erase `rpm -qa | grep accel`
    Loaded plugins: fastestmirror, priorities, security
    Setting up Remove Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package php-eaccelerator.i686 1:0.9.6.1-1.el6 will be erased
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ==============================================================================
     Package          Arch        Version             Repository            Size
    ==============================================================================
    Removing:
     php-eaccelerator i686        1:0.9.6.1-1.el6     @epel                 313 k
    
    Transaction Summary
    ==============================================================================
    Remove        1 Package(s)
    
    Installed size: 313 k
    Is this ok [y/N]: y
    Downloading Packages:
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Erasing    : 1:php-eaccelerator-0.9.6.1-1.el6.i686                    1/1
    
    Removed:
      php-eaccelerator.i686 1:0.9.6.1-1.el6
    
    Complete!
    
    [eric@ispconfig-1 ~]$ sudo mv suphp.conf /etc
    
    [eric@ispconfig-1 ~]$ sudo service httpd restart
    Stopping httpd:                                            [  OK  ]
    Starting httpd:                                            [  OK  ]
    
    Thanks, Eddie!
     
    Last edited: Jan 13, 2012
  6. epretorious

    epretorious New Member

    Hey, Falko:

    Any ideas why eaccelertor is causing segmentation faults? What do you recommend? Is eacelerator important/necessary? What should we do?
     
  7. falko

    falko Super Moderator Howtoforge Staff

    If eAccelerator is giving you problems, you can use APC or Xcache instead. All three are PHP opcode caches that speed up PHP execution a lot, therefore it's strongly recommmended to have one installed.
     
  8. epretorious

    epretorious New Member

    Any idea why eAccelerator isn't working on Centos 6.2 (x86_64), Falko?
     
  9. falko

    falko Super Moderator Howtoforge Staff

    No, but as I've mentioned before, you can replace it with Xcache or APC.
     
  10. epretorious

    epretorious New Member

    Hey, Falko:

    I guess that my point here is that I installed eAccelerator (as per the HOWTO) and it didn't work so I'm hoping that you might know why.
     
  11. falko

    falko Super Moderator Howtoforge Staff

    I have no idea...
     
  12. umusa

    umusa New Member

    Hi to ALL,
    Im new to linux and busy with step 15 as per Eric Pretorius . my problem is with the follwoing step : Next we install suPHP (there is a mod_suphp package available in the repositories, but unfortunately it isn't compatible with ISPConfig, therefore we have to build suPHP ourselves):

    cd /tmp
    wget http://suphp.org/download/suphp-0.7.1.tar.gz
    tar xvfz suphp-0.7.1.tar.gz
    cd suphp-0.7.1/
    ./configure --prefix=/usr --sysconfdir=/etc --with-apr=/usr/bin/apr-1-config --with-apxs=/usr/sbin/apxs --with-apache-user=apache --with-setid-mode=owner --with-php=/usr/bin/php-cgi --with-logfile=/var/log/httpd/suphp_log --enable-SUPHP_USE_USERGROUP=yes
    make
    make install



    I get the following error after running the command:
    ./configure --prefix=/usr --sysconfdir=/etc --with-apr=/usr/bin/apr-1-config --with-apxs=/usr/sbin/apxs --with-apache-user=apache --with-setid-mode=owner --with-php=/usr/bin/php-cgi --with-logfile=/var/log/httpd/suphp_log --enable-SUPHP_USE_USERGROUP=yes

    checking for APR ... configure:error: the --with-apr parameter is incorrct.it must specify an install prefix,a build directory or an apr-config file




    thankyou !!!!
    Michael
    Cape Town, South Africa
     
  13. falko

    falko Super Moderator Howtoforge Staff

    Is this CentOS 6.2? Is SELinux disabled?
     
  14. umusa

    umusa New Member

    Yes to both questions.
     
  15. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ls -la /usr/bin/apr-1-config
    ? Did you install the httpd-devel package?
     

Share This Page