Interview Question in SQL Server 2005 Driver for PHP


 

Interview Question :: Why does wamp;s php 5 corrupt my image-to-db uploads


have a look at this images.They are perfect when am uploading and
corrupt after download.i testes on sqlserver 2005 and sql server 2000.
the images are here http://erastus.paritykenya.com/
is there a setting in php.ini am missing.php.ini has most defaults.
Answers to "Why does wamp;s php 5 corrupt my image-to-db uploads"
RE: Why does wamp;s php 5 corrupt my image-to-db uploads?

If you let me have a look at your config, that would help.



Do this. On your document root create a file named phpinfo.php

Make its contents this:

<?php

phpinfo();

?>



When you have that, I'll look at your config file and post an update.



--oops, I made an assumption --



I assumed that the web server in question is open to the internet. Is it?



If not, do that yourself, and look for a setting that looks like it might set the file upload limit to 4kb. because that's where it seems to be cutting off your images.



-- another update after thinking about it some more --



You said something that got me thinking. You said they are perfect when uploading.



Another thing you want to look at is the size of the field you are putting them in in MySQL. are you using a blob type?

How big is the field you are putting the image into? MySQL will just chop stuff off, so that is also a pretty likely scenario. You might want to try a mediumblob, or a longblob.
 
Vote for this answer ::  
Update Alert Setting