PDA

View Full Version : The Perfect Server - CentOS 6.2 x86_64 With Apache2 [ISPConfig 3] - SUPHP


epretorious
13th January 2012, 07:57
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 (http://www.howtoforge.com/perfect-server-centos-6.2-x86_64-with-apache2-ispconfig-3-p5)" phpMyAdmin stopped working. In fact, every time that I access phpMyAdmin, one of Apache's child processes dies:

[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 ([I]e.g., webserver_user=apache)...

[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?

epretorious
13th January 2012, 08:02
This problem persists even after removing the suphp configuration file and restarting apache!
[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)

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

eddie303
13th January 2012, 14:20
After a while of trial and error, it turns out to be eaccelerator the problem... After removing it, everything starts to work magically....

epretorious
13th January 2012, 18:30
After a while of trial and error, it turns out to be eaccelerator the problem... After removing it, everything starts to work magically....
Works for me too:
[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!

epretorious
17th January 2012, 00:23
After a while of trial and error, it turns out to be eaccelerator the problem... After removing it, everything starts to work magically....Works for me too...

Hey, Falko:

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

falko
17th January 2012, 15:29
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.

epretorious
18th January 2012, 05:27
This tutorial shows how to prepare a CentOS 6.2 x86_64 server for the installation of ISPConfig 3...

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

falko
18th January 2012, 20:42
No, but as I've mentioned before, you can replace it with Xcache or APC.

epretorious
18th January 2012, 20:49
No, but as I've mentioned before, you can replace it with Xcache or APC.

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.

falko
19th January 2012, 16:53
I have no idea...

umusa
21st January 2012, 22:49
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

falko
22nd January 2012, 16:25
Is this CentOS 6.2? Is SELinux disabled?

umusa
22nd January 2012, 20:37
Yes to both questions.

falko
23rd January 2012, 12:13
What's the output of ls -la /usr/bin/apr-1-config? Did you install the httpd-devel package?