ok, got the install completed, but I'm having trouble now getting it to work.
Here's the exerpt from my script that handles a new file upload:
if( $files['bitmapfile']['name'] != "" )
{
$bitmapFileTemp = $files['bitmapfile']['tmp_name'];
$bitmapFileName = $files['bitmapfile']['name'];
$bitmapArtExt = JFile::getExt( $bitmapFileName );
$bitmapArtName = $primaryfolder.DS.$newArtName.'.bmap.orig.';
if (!JFile::upload( $bitmapFileTemp , $bitmapArtName.$bitmapArtExt ))
{
$msg = "Bitmap File Upload failed! path: ".$bitmapArtName.$bitmapArtExt;
$this->setRedirect( 'index.php?option=com_clientcenter&view=artmanagement', $msg );
$this->redirect();
} else {
echo "Bitmap File Upload successful. path: ".$bitmapArtName.$bitmapArtExt."<br />";
//create and save thumbnail and screensize images
$location = '$HOME/local/bin/convert';
$command = '-thumbnail 150';
$name = $primaryfolder.DS.$newArtName.'.';
$extfrm = $bitmapArtExt;
$extto = 'png';
$output = "{$name}thumb.{$extto}";
$convert = $location . ' ' .$command . ' ' . $bitmapArtName . $extfrm . ' ' . $name .'thumb.'. $extto;
if(!exec ($convert,$execOutput,$execReturn))
{
echo "can't execute convert command:<br />";
echo "Convert Command: <br />" .$convert."<br />";
echo "Output: <br />";
var_dump($execOutput);
echo '<br />';
echo "Returned: ".$execReturn.'<br />';
};
print "<img src=" . $output . ">";
}
}
this results in the following output:
Bitmap File Upload successful. path: ../clientArt/Client66/live_thumb_test/primary/live_thumb_test.bmap.orig.jpg
can't execute convert command:
Convert Command:
$HOME/local/bin/convert -thumbnail 150 ../clientArt/Client66/live_thumb_test/primary/live_thumb_test.bmap.orig.jpg ../clientArt/Client66/live_thumb_test/primary/live_thumb_test.thumb.png
Output:
array(0) { }
Returned: 127
the paths are all correct, and the file upload itself is working, but no thumbnail... and the only error message I can seem to get is the returned '127'
In my site log, I see these statements:
[Thu Mar 13 17:42:10 2008] [error] [client (myip)] sh: line 1: /local/bin/convert: No such file or directory, referer: http://alleycat.chadroyer.com/index.php?option=com_clientcenter&view=artupload&Itemid=55
[Thu Mar 13 17:42:11 2008] [error] [client (myip)] File does not exist: /home/alleycat_ftp/alleycatworldwide.com/public/clientArt, referer: http://alleycat.chadroyer.com/index.php?option=com_clientcenter&view=artupload&Itemid=55
[Thu Mar 13 17:42:11 2008] [error] [client (myip) File does not exist: /home/alleycat_ftp/alleycatworldwide.com/public/missing.html, referer: http://alleycat.chadroyer.com/index.php?option=com_clientcenter&view=artupload&Itemid=55
So, it doesn't seem to be finding $HOME/local/bin/convert, tho I can see that is where it is.
Also in the second line, it's pointing to the wrong folder. My clientArt folder is below my public folder, not in it, to avoid outside access. It should be pointing to /home/alleycat_ftp/alleycatworldwide.com/clientArt (If I have to move the clientArt folder into the public site area for this to work, I guess I'll do that, but I'd rather not)
Please help... I'm wasting a lot of days here getting this working.