Question: general course of action, considering the limited tools at my disposal.
Environment: Sever, Apache/2.2.11, PHP, 5.2.9, iMagick, 3.0.0b2, imageMagick, 6.5.9-6.
Problem: Huge core.#### files are being deposited into the directory where an upload script resides. This **only** seems to occur when large image files are uploaded and resized, which occurs without obvious error. Files under 1 MB don't create core dumps.
Understood: A core dump occurs when a program crashes. Since the upload/resize process occurs without error, works fine, assumption one is that the crash comes from some included module or resource being used by PHP.
Limited controls: And here's what bites. Shared hosting, I am able to create SSH keys to debug, but the account has no shell access, which would cost the client more. I am operating as a third party, so can't contact either the client or the host directly, or have the sysadmins tell me what's happening. Basically most of the tools I need are "not available."
Error logs are cheesy only-through-domain-management CP, and they appear to flush daily. I fiddled with it a bit, assume I can't access error logs.
I was able to script up the following commands, where #### is the number in the core extension:
exec("file core.####",$var) or die("cannot execute file");
foreach ($var as $k=>$v) { echo "<br><br>k: $k v: $v<br><br>"; }
exec("gdb httpd core.####",$var) or die("cannot execute gdb");
This outputs
k: 0 v: core.####: ELF 64-bit LSB core file AMD x86-64, version 1 (SYSV), SVR4-style, from 'php'
cannot execute gdb
Which reveals two things: the dump is coming from PHP, and I can't execute gdb, at least, not from PHP. gdb reads the stack trace of core files, which appear to be binary, unreadable by text editors. They are also very large, looking at one now, 156856320. So you can see why I want to get rid of them . . .
Assumption two: since these dumps only occur when larger files are uploaded and resized, such as directly from a digicam, I am assuming it's something to do with either iMagick or more likely imageMagick. OR am I chasing the wrong ghost?
I could post the code I'm using, don't see it as useful, it's basic Imagick resizing.
Any thoughts? I already have "you're hosed." :-P