Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37917 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36789 invoked from network); 27 May 2008 13:16:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 May 2008 13:16:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.238 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.198.238 rv-out-0506.google.com Received: from [209.85.198.238] ([209.85.198.238:45452] helo=rv-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8B/07-28982-4A90C384 for ; Tue, 27 May 2008 09:16:21 -0400 Received: by rv-out-0506.google.com with SMTP id g37so2745818rvb.23 for ; Tue, 27 May 2008 06:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=9qP8G1qPc4cb3s5P0SUPpV8tSJaQ51l9uvJOUD9W8ac=; b=oXkuqnlEZzxaPHvHYHC56QfurjyMUiIuOhznR0kazAJvzP1iKyn1ymjl9CNNNbb8ohMX5/l/6juOG97Mz+nHrQ/NvVG1Q80UAgDih+3qunebdDs9XDQ/bIs4zXrJ5XOB8z042Fkqdlna0xNjCn5A2ull73ukWqxvdOKBNALH63g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=VCKaHSyldkmMcx/lYVCfDkJEoqdh6LOiKW2QAxFv82Cp8jUiOnyNxXLQl1uj0lvf7uFahLIAk3ocWhR1wyUTSzSuUUJ84f2SA4cBagu7NrKymwhjO4dOauU9v1qldo33cLQP8aeaKD0LvPGp8JrqDZ5IJbwpTfyMXjo5TEw6jM8= Received: by 10.140.131.11 with SMTP id e11mr284002rvd.104.1211894178245; Tue, 27 May 2008 06:16:18 -0700 (PDT) Received: by 10.141.123.13 with HTTP; Tue, 27 May 2008 06:16:18 -0700 (PDT) Message-ID: Date: Tue, 27 May 2008 15:16:18 +0200 To: "Ulf Wendel" Cc: "KishoreKumar Bairi" , "PHP Internals" In-Reply-To: <483C0788.1020206@mysql.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <483C0788.1020206@mysql.com> Subject: Re: [PHP-DEV] Streaming Enabled MySQL Driver for PHP - Google Summer of Code 2008 - MySQL From: pierre.php@gmail.com ("Pierre Joye") hi Ulf, On Tue, May 27, 2008 at 3:07 PM, Ulf Wendel 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