Ben-Nes Yonatan wrote: > $data = "INSERT INTO test_files (bin_data, filename, filesize, filetype) > VALUES ('$data', '$imagefile[name]', '$imagefile[size]', > '$imagefile[type]')"; // creating the sql for the insert, i called the > received value also $data cause i dont want to keep the previous $data > (after all we want to save our precious memory no? :)) > echo memory_get_usage().'<br />'; // 5570400 memory bytes allocated > {changed from b4 only alittle} As noted, *DURING* the execution of this assignment statment, PHP has to store $data in 2 places. On a completely un-related topic, you should research the pros and cons of storing image data directly in your database, if you haven't already. MOST experts will tell you "don't do that" unless you have a very specific performance maintenance requirement for it. There is a highly-tuned long-established custom database engine specifically geared for storing/maintaining/retrieve large binary data like your images... It's call "The File System" :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php