PHP not working, segmentation fault 11, urgent problem.

Richard G

Verified User
Joined
Jul 6, 2008
Messages
13,870
Location
Maastricht
I just discovered on our newly installed server, php is not working.
It's like in this thread:
http://forum.directadmin.com/showthread.php?t=44386

I'm using custombuild 1.2.
php -v:
PHP 5.3.23 (cli) (built: Mar 24 2013 17:07:21)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd., and
with Zend Guard Loader v3.3, Copyright (c) 1998-2010, by Zend Technologies

Apache:
httpd -v
Server version: Apache/2.2.24 (Unix)
Server built: Mar 21 2013 21:18:58

Mod_ruid2 1.9.8 is installed but the problem was also present with 1.9.7.

I don't know what happened or exactly when the problem occured.

PHP is not working, you see php code like tekst.
phpinfo.php gives a blank screen.
Access log of httpd in /var/log is empty (0 bytes)
Error log is growing and containing a lot of this:
[Sun Mar 24 17:36:01 2013] [notice] child pid 13845 exit signal Segmentation fault (11)
[Sun Mar 24 17:36:01 2013] [notice] child pid 13846 exit signal Segmentation fault (11)
[Sun Mar 24 17:36:01 2013] [notice] child pid 13847 exit signal Segmentation fault (11)
[Sun Mar 24 17:36:01 2013] [notice] child pid 13848 exit signal Segmentation fault (11)
[Sun Mar 24 17:36:01 2013] [notice] child pid 13849 exit signal Segmentation fault (11)
[Sun Mar 24 17:36:01 2013] [notice] child pid 13850 exit signal Segmentation fault (11)
[Sun Mar 24 17:36:01 2013] [notice] child pid 13851 exit signal Segmentation fault (11)

I just restarted httpd again and this is also present:
[Sun Mar 24 17:36:01 2013] [notice] caught SIGTERM, shutting down
[Sun Mar 24 17:36:01 2013] [notice] seg fault or similar nasty error detected in the parent process
[Sun Mar 24 17:36:02 2013] [notice] SSL FIPS mode disabled
[Sun Mar 24 17:36:02 2013] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Sun Mar 24 17:36:02 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Mar 24 17:36:03 2013] [notice] SSL FIPS mode disabled
[Sun Mar 24 17:36:03 2013] [warn] RSA server certificate CommonName (CN) `localhost' does NOT match server name!?
[Sun Mar 24 17:36:03 2013] [notice] mod_ruid2/0.9.8 enabled
[Sun Mar 24 17:36:03 2013] [notice] Apache/2.2.24 (Unix) mod_ssl/2.2.24 OpenSSL/1.0.0-fips DAV/2 PHP/5.3.23 configured -- resuming normal operations

Also done this:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build clean
./build php d
./build rewrite_confs
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
/etc/init.d/httpd restart

But this did not help either.

I'm out of options and don't know what to do or what is causing this.
Any help would be greatly appreciated!
 
It looks like after the rebuilding php is working fine again, except for admin's account.
Still have no clue why it's not working there and what caused the previous problem. Not sure if it's over for good either.

So if anybody knows why it's not working on admin's account or how to get it working there.
 
Found it. Seems admin's users in /usr/local/directadmin/data/users/admin/domains all contains this:
Code:
UseCanonicalName=OFF
active=yes
bandwidth=unlimited
cgi=OFF
defaultdomain=yes
domain=mydomain.nl
ip=188.xxx.xxx.xxx
open_basedir=ON
php=OFF <----------
quota=unlimited
safemode=OFF
ssl=OFF
suspended=no
username=admin
Is there an easy way to change this for all domains/user under admin?
Any clue on how these suddenly were changed to OFF?

Edit: Just changed this setting to ON and restarted apache, but still no php for admin domain.
 
Last edited:
Fixed!

Fixed it by creating another admin. Logging in as that admin.
Disabling php for root-admin. Then enabling php for root-admin again and now it's working.

Seems all problems are gone now.
 
Hi Saosangmo.

Yes, it seems to have been gone since I did this:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build clean
./build php d
./build rewrite_confs
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
/etc/init.d/httpd restart

At least I haven't seen it again until now so I hope it's really gone. I will keep on monitoring it for a couple of days though to be sure.

Are you having kindlike problems then?
 
thank Richard,
Finally, I switch my environment to the same to you. That things save my life.
Too many errors:
signal Segmentation fault
Can't sleep night by night.
I have run with them after 2 days and no "signal Segmentation fault" back.
 
Bringing up this topic a bit again since I'm experiencing similar errors in my httpd-logs, although nothing is 'down'.

I noticed about 40-50 of these errors just from today. Looking at the timestamps I see these errors occur sometimes 4-5 times in a row, and sometimes only one at the time, spaced by roughly half an hour orso.

Don't know exactly when these errors started but the only thing I can recall having done is putting "ini_set" in the disable_functions in php-ini.

Not sure if I should try Richard's solution aswell as I'm not running mod_ruid2 (yet).


Code:
...
[Tue Mar 11 20:42:25.549494 2014] [core:notice] [pid 6663] AH00052: child pid 3939 exit signal Segmentation fault (11)
[Tue Mar 11 21:02:58.160945 2014] [core:notice] [pid 6663] AH00052: child pid 6432 exit signal Segmentation fault (11)
[Tue Mar 11 21:02:58.161107 2014] [core:notice] [pid 6663] AH00052: child pid 6575 exit signal Segmentation fault (11)
[Tue Mar 11 21:02:58.161170 2014] [core:notice] [pid 6663] AH00052: child pid 6594 exit signal Segmentation fault (11)
[Tue Mar 11 21:02:58.161227 2014] [core:notice] [pid 6663] AH00052: child pid 6617 exit signal Segmentation fault (11)
[Tue Mar 11 21:02:58.161265 2014] [core:notice] [pid 6663] AH00052: child pid 6643 exit signal Segmentation fault (11)
[Tue Mar 11 21:35:11.818491 2014] [core:notice] [pid 6663] AH00052: child pid 10609 exit signal Segmentation fault (11)
[Tue Mar 11 21:35:28.839837 2014] [core:notice] [pid 6663] AH00052: child pid 10554 exit signal Segmentation fault (11)
[Tue Mar 11 21:39:52.186807 2014] [core:notice] [pid 6663] AH00052: child pid 11168 exit signal Segmentation fault (11)
[Tue Mar 11 22:19:00.506046 2014] [core:notice] [pid 6663] AH00052: child pid 16202 exit signal Segmentation fault (11)
 
You can try my solution because the commands are to rebuild php and reset the httpd configs to default and have nothing to do with mod_ruid2 which I'm using. So you could try without problems, if you did not make any custom changes to configs, except for php.ini because that won't be overwritten.
First check if php is set to on as stated before.
This can also happen if you got a faulty memory module.
 
Ok, just ran the commands and all seems well at the moment.
PHP also got updated to 5.4.26 from 5.4.25 in the progress.

Will report here if the errors return.
 
The errors have returned again. Got 22 of them today.
Not sure what to think of it yet. Hope it doesn't get worse.

Code:
snip...
[Wed Mar 12 19:30:33.641729 2014] [core:notice] [pid 32526] AH00052: child pid 11387 exit signal Segmentation fault (11)
[Wed Mar 12 20:44:01.681849 2014] [core:notice] [pid 32526] AH00052: child pid 18717 exit signal Segmentation fault (11)
[Wed Mar 12 20:44:49.755928 2014] [core:notice] [pid 32526] AH00052: child pid 19026 exit signal Segmentation fault (11)
[Wed Mar 12 21:01:02.065885 2014] [core:notice] [pid 32526] AH00052: child pid 21326 exit signal Segmentation fault (11)
[Wed Mar 12 21:08:26.694727 2014] [core:notice] [pid 32526] AH00052: child pid 22460 exit signal Segmentation fault (11)
[Wed Mar 12 21:29:06.453164 2014] [core:notice] [pid 32526] AH00052: child pid 24807 exit signal Segmentation fault (11)
snip...

Also got a few 'new' errors I haven't seen before;
Code:
[Wed Mar 12 11:19:36.343515 2014] [core:error] [pid 667] [client 91.232.213.62:55855] AH00135: Invalid method in request 4--
[Wed Mar 12 11:19:53.310178 2014] [core:error] [pid 1023] [client 91.232.213.62:52512] AH00135: Invalid method in request 4--
...
[Wed Mar 12 18:27:09.118417 2014] [core:error] [pid 5698] [client 79.110.33.21:60176] AH00135: Invalid method in request 4--
[Wed Mar 12 18:27:41.524576 2014] [core:error] [pid 5818] [client 79.110.33.21:60317] AH00135: Invalid method in request 4--
[Wed Mar 12 21:32:07.414897 2014] [core:error] [pid 25042] [client 46.201.238.23:62750] AH00135: Invalid method in request Lp

And:
Code:
[Wed Mar 12 15:41:17.549689 2014] [cgi:error] [pid 22907] [client 187.240.82.243:33902] script not found or unable to stat: /var/www/cgi-bin/php
[Wed Mar 12 15:41:22.276102 2014] [cgi:error] [pid 23248] [client 187.240.82.243:45884] script not found or unable to stat: /var/www/cgi-bin/php5
[Wed Mar 12 15:41:23.962858 2014] [cgi:error] [pid 22983] [client 187.240.82.243:51227] script not found or unable to stat: /var/www/cgi-bin/php-cgi
[Wed Mar 12 15:41:25.772758 2014] [cgi:error] [pid 23247] [client 187.240.82.243:53152] script not found or unable to stat: /var/www/cgi-bin/php.cgi
 
Back
Top