image creations in 4.3.11 versus 4.3.10
Posted: Sun Apr 17, 2005 6:55 pm
i have an on-the-fly image creation script that has worked when using php while on 4.2.4 and through every upgrade through 4.3.10
my home server is now 4.3.11 and the script is not working on it.
I have been testing but cannot find the difference that's causing it to not work on 4.3.11 when i know and can prove it works on 4.3.10
http://24.218.195.201:5739/findyourdesi ... pg&fn=full

versus
http://www.findyourdesire.com/pic.php?p ... pg&fn=full

my home server (first link) is:
i used echo statements to prove that ALL the conditions are met and the problem is the
what i cannot tell from php.net is why it's not working on my home server
my home server is now 4.3.11 and the script is not working on it.
I have been testing but cannot find the difference that's causing it to not work on 4.3.11 when i know and can prove it works on 4.3.10
http://24.218.195.201:5739/findyourdesi ... pg&fn=full

versus
http://www.findyourdesire.com/pic.php?p ... pg&fn=full

my home server (first link) is:
- Fedora Core 3 with SE on in permissive mode (trying to get a customized policy so that MySQL will work and SE will be enforcing)
- Apache 2.x
- mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu
- PHP 4.3.11
- Linux (i think red hat enterprise, but am not sure)
- Apache 2.x
- mysql Ver 12.22 Distrib 4.0.18, for pc-linux (i686)
- PHO 4.3.10
Code: Select all
<?php
include("/home/dcfydllc/includes/fyd.incs.php");
// get the function type and picture
$pic=$faup.$_GET['pic']; # set the picture
$fn=$_GET['fn']; # function?
if($fn=='pg'){ # img pg
bgnpg('FULL PICTURE VIEW','',$cssd,0,'fpv');
echo <<<END
<a href="#" onclick="window.close();"><img alt="full pic view -- click to close" class="fpv" src="{$_SERVER['PHP_SELF']}?pic={$_GET['pic']}&fn=full" title="full pic view -- click to close" /><br /></a></body></html>
END;
}elseif($fn=='full'){ # we're making the tagged full size pic (should only be called if it exists & is approved)
if(is_file($pic)){ # there is a passed picture
$tag='sitepics/imgtag.png'; # the tag
$tagimg=ImageCreateFromPNG($tag);
$tw=ImageSx($tagimg); $th=ImageSy($tagimg);
$mem=ImageCreateFromJPEG($pic);
imageCopy($mem, $tagimg, 0, 0, 0, 0, $tw, $th);
header('Content-Type: image/png');
ImagePNG($mem);
imageDestroy($mem); imageDestroy($tagimg);
}else{ // there was an error (or we're calling the spacer)
$src=ImageCreateFromPNG('sitepics/unoa.png');
$width=ImageSx($src); $height=ImageSy($src);
$x=250; $y=250; $dst=ImageCreate($x,$y);
ImageCopyResized($dst,$src,0,0,0,0,$x,$y,$width,$height);
header('Content-Type: image/png'); ImagePNG($dst);
}
}else{ # we're doing one of the others
switch ($fn){
case 'main': $x=250; $y=250; break; # main image; set x & y to 250
case 'thumb': $x=125; $y=125; break; # thumbnail; set x & y to 125
case 'am1':
$x=150; $y=150;
break;
case 'am2':
$x=150; $y=225;
break;
default: $x=75; $y=75; break; # thumb for non-profile or error; set x & y to 75
}
if(is_file($pic)){ # there is a passed picture
$src=ImageCreateFromJPEG($pic); # use the passed picture
}else{ # there wasn't a picture
$src=ImageCreateFromPNG('sitepics/uona.png'); # use the default
}
$width=ImageSx($src); $height=ImageSy($src); $dst=ImageCreate($x,$y);
ImageCopyResized($dst,$src,0,0,0,0,$x,$y,$width,$height);
header('Content-Type: image/png'); ImagePNG($dst);
}
?>what i cannot tell from php.net is why it's not working on my home server