[PHP]
if ($this->isSuccessful && !$hasMogrified) {
// SMACK IT ALL TOGETHER
@imagecopyresampled($newImage, $image, $config['posX'],
$config['posY'], 0, 0, $config['width'], $config['height'],
$origWidth, $origHeight);
// SAVE TO FILE
$imageEvalStr = 'if (@!image' . $extArray[$type] . "(\"$newImage\",
\"$this->thumbLocationPath/$this->fileName\", $thumbDimensionInt))
{\n" .
' $this->isSuccessful = false;\n' .
' $this->setErrorArray(array(\'action\' => \'Could not
seem to save image "$this->fileName" onto
"$this->thumbLocationPath"\'));' . "\n" .
' echo "Could not seem to save image \"$this->fileName\"
onto \"$this->thumbLocationPath\";\n' .
"} else {\n" .
" echo 'I am trying to save \"$this->fileName\" onto
\"$this->thumbLocaitonPath\"\n';\n" .
"}\n";
eval($imageEvalStr);
}
[/PHP]
What this snippet is supposed to do is do either imagepng, imagejpeg,
imagegif, imagebmp or imagetiff PHP functions which will save the
image resource object binary contents onto the actual physical image
file.
However, consider this:
I am running a CRON script that runs outside of the document root,
owned by me "phil" who is part of the Apache group. It will
instantiate a class object whose method contains that snippet that
will auto-run that feature, which is found within the document root,
owned by me "phil", and manipulate images that are owned by me "phil"
in directories owned by Apache; the directories having permissions of
0770, the images permissions of 0644.
Nothing happens.
No errors, no warning, no notices, nothing. No images are generated,
nothing at all occurs within the directories whatsoever. I am
suspecting permissions errors but since no errors are being produced I
can't verify what is going on.
What I need to know from someone is this:
How can a CRON script, outside the document root, ultimately affect
images within the document root that the CRON script's owner does not
himself own (but is in the same group as the images' owner)?
I really need help as usual.
Thanx
Phil