Hello Readers!
I believe I have a upload or a cache limit set too small in a configuration
file...I just can't seem to place my eyes on which one.
This is what is happening: the bottom portion of any image larger than ~45
Kb, stored as a BLOB in mySQL 2.22.24-shareware-debug server is not
displaying. I see no errors - mySQL, Apache 3.14, or PHP 4.04.
I'm not sure how to verify the BLOB's actual size against the orginal
image's filesize, as the column 'filesize' stores the original file's
filesize, not how data was actually written to the column. Is that a
correct statement? So my troubleshooting efforts have been limited to
finding out the kilobyte ceiling before I begin experiencing the above
symptoms, skimming through the manual, keyword searching the archives, etc.
Can someone help me out...I do RTFM, and in most cases WMOFM, but I have
really found firm ground to start from. Someone please jumpstart me!
TIA
// Here's my form to collect the file and other data:
<form name="addtoyform" method="post" action="content.php"
enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000">
Image: <input type="file" name="toy_image" size="50">
toy Name: <input type="text" name="toy_name" size="25"><br><br>
Function: <input type="text" name="toy_function" size="20">
<? include("filltoytypeselect.inc"); ?>
toy Description:<br><textarea name="toy_desc" cols="60"
rows="5"></textarea><br>
<input type="submit" name="appendtoy" value="Add This toy"></form>
// Here's my routine to append the collected form data to the table:
if ($appendtoy) { // append an binary image depicting a toy
$data = addslashes(fread(fopen($toy_image, "r"), filesize($toy_image)));
$result=MYSQL_QUERY("INSERT INTO inventory
(toy_name,toy_type,toy_function,toy_desc,toy_image,filename,filesize,filetyp
e)
VALUES
('$toy_name','$toy_type','$toy_function','$toy_desc','$data','$toy_image_nam
e','$toy_image_size','$toy_image_type')");
$id= mysql_insert_id();
$page_topic = $toy_type;
}
// This is my routine to fill an img src with the BLOB using syntax: <img
src="gettoyimage.php?toy_id=<toy_id>"
if($toy_id) {
@MYSQL_CONNECT("host","username","password");
@mysql_select_db("database");
$query = "select toy_image,filetype from inventory where
toy_id=$toy_id";
$result = @MYSQL_QUERY($query);
$data = @MYSQL_RESULT($result,0,"toy_image");
$type = @MYSQL_RESULT($result,0,"filetype");
Header( "Content-type: $type");
echo $data;
};
* Gerald E Buckmaster Jr *
* Professional Imagery Analyst *
* Amateur Webmaster, Imagery Analysis Support Site *
* www.imagery-analyst.com *
* www.buckoptimized.com *
* Tucson, Arizona *
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php