Core Dumps generated with suPHP + PHP 5.1.2 installed

MeGaMASTER

Well-Known Member
May 24, 2003
49
0
156
Hello,

I'm having a weird problem after having migrated to the CGI version of PHP 5.1.2. Core dumps are being generated into my clients directories and these are using lot of disk space.

NOTE: I'm having the same issue when using PHPsuexec.

Thanks.
 

HostMerit

Well-Known Member
Oct 24, 2004
163
0
166
New Jersey, USA
cPanel Access Level
DataCenter Provider
Try

ulimit -c 0

Should disable core files.

I had this issue but with horde / cpanel.

For now I guess

locate core.[0-9]*|xargs rm -rf

Should work
 

MeGaMASTER

Well-Known Member
May 24, 2003
49
0
156
I have tried the command "ulimit -c 0" however when I disconnect from shell and login back again ulimit -c has been reset to its previous value (1000000).
 
Last edited:

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
Simply disabling core dumps isn't a great idea. You really need to find out why they're being created. The best way to do that is to read them through the debugger. That said, you are running BETA software (as far as cPanel is concerned) so you can expect problems.
 

westhost-neil

Well-Known Member
Jun 3, 2005
48
0
156
UK
I've searched high and low to try and find some way to stop or control the apace core dumps being produced.

I tried ulimit -c 0, but as stated above this resets to 1000000 when I log out. I'm running 64bit Fedora Core and have read many posts which state that this is most likely the cause.

The core dumps only appear in users home directories and some of them are very large (152mb).

The only solution I've come up with is to manual run:

find /home -name core.* -size +10000000k | xargs rm -f {} \;

This finds and deletes all core files in the home sub directories which are larger than 10 meg.

If anyone has a better solution I'd be grateful for some info.

Neil
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
You need to edit /etc/profile and add that line:

ulimit -c 0

and put it after:

#cPanel Added Limit Protections -- END

if that line is in there.