Re: Streaming Enabled MySQL Driver for PHP - Google Summer of Code 2008 - MySQL

From: Date: Tue, 27 May 2008 13:16:18 +0000
Subject: Re: Streaming Enabled MySQL Driver for PHP - Google Summer of Code 2008 - MySQL
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-37917@lists.php.net to get a copy of this message
hi Ulf, On Tue, May 27, 2008 at 3:07 PM, Ulf Wendel <uwendel@mysql.com> wrote: > PHP streams are a better choice than PHP strings for handling large string > objects. PHP strings are loaded into memory at once. For a streaming engine > you do not want to load large portions of data into memory unless you really > have to. > > Why does this function return a resource? What type of resource is it and > what is the resource handle used for? > >> >> 2. string mysqli_put_blob ( mysqli link, string file_path, string mode , >> int >> length ) >> >> file_path: is the path of the file which is to be stored in a blob field. >> >> mode: mode specifier if the file should be read ASCII mode or binary mode. > > PHP strings are binary safe. There are no ASCII mode strings. Why do you > want to distinguish between ASCII and binary strings? Why is the > functionality restricted to existing files? Looks a bit like its inspired by > ftp or Windows? That's partaially incorrect. PHP streams are not always binary safe by default, at least on windows (linux has no 'b' but for API compatibility reasons afair). Unless you specify the binary mode explicitly. A common problem is to run under cgi, cli or apache on windows, the default mode may differ (apache for example is/was not binary safe) Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org

« previous php.internals (#37917) next »