I have attached the code with which I am having difficulty (I have also attached the 
php configuration of my host provider).  
What is happening is that I can call up a jpeg file from ./maps and see that it makes 
it through to the next page, and I can then call the next jpeg file in the sequence, 
from the same sub-directory, and I get a broken link (error 500 page).  The jpeg's I'm 
working with are 30 to 100 KB , not overly large, and they have names like grid_a.jpg, 
grid_b.jpg ... grid_l.jpg. The jpeg files view fine in PhotoShop5.5 and are whole 
files with proper termination.  

It is the inconsistancy of the problem that is driving me nutz.  I work on it for a 
while and get some images to pass, and then for no reason I can fathom, they stop 
going through.  At one time, I thought it could be a path problem so I did a  
copy("./maps/$map","$map")  to get the image file in the same directory as the image 
program. The jpegs were delivered, but I still had problems with getting images out.  
I also thought it could be a database problem, so I stripped all the records from the 
table.  Still no change, some jpegs got through some delivered the error 500 page.

If anyone is familiar with using the gd files I can certainly use your help.  I'm dead 
in the water on this.



<?php  // this is the top line in the page; there are no lines or spaces above here!
header("content-type: image/jpg");


$im_size = GetImageSize("./maps/$map");
$imWidth = $im_size[0];
$imHeight = $im_size[1];




ImageCopy($image,$image2,0,0,0,0, $imWidth, $imHeight);

// database call works
 if (! $link) die("Can't log in at this time");
 mysql_select_db($db,$link) or die ("Can't log in at this time"); 
 $query="SELECT * FROM heritage where map_name='$map' ORDER BY bldg_name ";
 if (!$results) die(mysql_error());
// end database call

while ($heritage=mysql_fetch_array($results))
 if ($bldg_use=="Commercial Bldg.") $var_color=$red;
 if ($bldg_use=="Government Bldg.") $var_color=$orange;
 if ($bldg_use=="other") $var_color=$green;
 if ($bldg_use=="Home") $var_color=$lt_blue;
 imagettftext($image,  5, 0,$coordinate_x-3, $coordinate_y-4, $black, $font2, "l"); 
 imagettftext($image, 19, 0,$coordinate_x-7, $coordinate_y+4, $black, $font2, "l");
 imagettftext($image, 17, 0,$coordinate_x-6, $coordinate_y+2, $black,$font2,"l");
 imagettftext($image, 17, 0,$coordinate_x-6, $coordinate_y+2, $var_color, $font2, "l");
 imagettftext($image,  5, 0,$coordinate_x-3, $coordinate_y-4, $white, $font2, "l");



header("location: user_map.php?map=$map"); 
?> // This is the last line of the page; there are no lines below here.

Configure command:  
'./configure' '--with-config-file-path=/etc' '--enable-safe-mode=yes' 
'--enable-force-cgi-redirect=yes' '--with-gdbm' '--with-mysql' 
'--with-exec-dir=/www/cgi-bin' '--bindir=/www/cgi-bin' '--enable-ftp' 
'--enable-trans-sid' '--with-gd=/usr' '--with-zlib=/usr' '--with-jpeg-dir=/usr' 
'--enable-gd-native-ttf' '--with-png-dir=/usr' '--with-ttf=/usr/lib'

When the only tool you have is a hammer, everything looks like a nail.

Reply via email to