hi!
On Mon, Aug 12, 2013 at 11:24 PM, Jacob Kruger wrote:
> What with trying to store image data in mySQL database, I am saving the
> results of fread() function carried out using the file handle returned from
> fopen(), with the "rb" argument to tell it the file is for binary reading.
>
> Eith
Thanks - looks pretty much exactly what I want to try achieve, so will try
modd'ing my code/script and see if works...
Also nice to maybe use the actual parameter binding for a change instead of
just building up sql statement strings using sprintf() etc. - know better
practice anyway.
Stay w
Ok, even when trying to use the mysqli_statement->bind_params() and
mysqli_statement->send_long_data() to pass larger blob data chunks through,
I am still hitting a form of timeout - from the mysqli_statement->errorno,
and error string:
["errno"]=> int(2006)
["error"]=> "MySQL server has gone a
And, here's the current test code:
//start code
$f = fopen("./candles.png", "rb");
$fB = fread($f, filesize("./candles.png"));
fclose($f);
$b = NULL;
$stmnt = $mysqliObj->prepare("update tbl_mysqli_test set b_test = ? where id
= 1;");
$stmnt->bind_param("b", $b);
$stmnt->send_long_data(0, $fB);
Also, BTW, if I leave out the blob/binary data field, and use all of that
test code, apart from the send_long_data() call, it works fine with integer
and varchar fields.
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'
- Original Messa
hi oli,
i can confirm this if i use following command.
one download one 500
[download.cmd]
"C:\Program Files (x86)\GnuWin32\bin\wget.exe" --limit-rate=4
http://127.0.0.1/index.php
did you find any solution?
regards
Hi List,
i installed a blank Windows Server 2012 Standard, added Role IIS &
Ok, and think now figured out cause of issue with binding etc. - local mySQL
server was set to max_packet_length = 1M
And, that's 1Mb, so set it to match production server value of 999M, and
then, the following code works - seems like you should assign value to
parameter variable after binding
And, again, however, for whatever reason, although it's reading full length
of image file into variable, for whatever reason, it's only saving like 64Kb
of data to server - no errors being generated, etc., so assume there's some
or other automatic limit can't find cause/mention of/for, etc.
St