A client has just asked me to fix an issue with their webside. I did not build it but here is what's happening.
The images are stored in the db as longblobs. Before moving to a new server, everything was working a ok. On the new server, some images only display partially. Even though the image is displayed at desired width and height, over a half of the image is either white or gray. EDIT: Only images uploaded after the server change are affected!
This is used for reading the image into a string for db insertion:
move_uploaded_file($_FILES['imagefile1']['tmp_name'],"tmppic.img"))
$tmpstr = fopen("tmppic.img","rb");
$image = addslashes(fread($tmpstr,filesize("tmppic.img")));
Here are the PHP functions used for displaying the images: imagecreatefromstring, imagecreatetruecolor, imagecopyresampled, imagejpeg
Since this has started happening after the server move, I am suspecting server configuration.
What is going on?