Help!! hundreds of core.xx files being created!

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
948
29
178
Hi, I hope someone can help me here, we recently had a drive failure on a server and I had the drive replaced, installed the OS - then installed cpanel and restored all accounts from backup.

Now, a few users are getting tons and tons of files like core.17864 in their home directories. It seems in some cases, every execution of a php script creates another one of these files.

Can ayone shed any light on what might be happening here ? Ive done a thorough search and cant see anything in this forum.
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
core.NNNN files are core dumps - they're produced when a process fails. From what you've said, they're clearly being created by failing apache processes and so any further information will be in the apache error log. One typical culprit is v3.0.0 of Zend Opt if you have that installed (up or downgrade it to 3.0.1 or 2.6.2) if not, then you'll have to work from the information in the error log.
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
948
29
178
Ahah - chirpy to the rescue again!.

I was finding that for some reason /scripts/installzendopt cant connect to zend to download the neccessary files so I downloaded it and installed manually - I'm sure it was version 3.0.0

Is ther an easy way to remove these files other than doing a locate > redirecting the output to a text file and going thru manually ?

Thanks for your help.
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
It's a little tricky as a number of PHP apps use core.php as a file name. However, this should do it, but use with care:

First try it out:

locate -r /core\.[0-9] | grep /home

If that all looks good:

locate -r /core\.[0-9] | grep /home | xargs rm -fv

You should probably regenerate the locate database before running the commands. I tried using find, but it didn't like the regex.
 

DigitalN

Well-Known Member
Sep 23, 2004
419
1
168
find is picky with -regex or -iregex

# find /home -type f -regex '.*/core\.[0-9].*'

Should work though.
 

darkelder

Well-Known Member
Oct 8, 2004
74
0
156
try

php -v

If it return any Zend error, you must update your zend with /scripts/installzendopt

Actually cPanel thinks last zend version is 3.0.0, just edit my $ver on this script to match newest zend version.

You can find new zend versions at http://downloads.zend.com/optimizer/
 

darkelder

Well-Known Member
Oct 8, 2004
74
0
156
I didn't good experiences with EDGE, I do prefer STABLE versions.