Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27636 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52783 invoked by uid 1010); 24 Jan 2007 15:01:45 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 52768 invoked from network); 24 Jan 2007 15:01:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Jan 2007 15:01:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=chtekk@longitekk.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=chtekk@longitekk.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain longitekk.com from 62.48.110.172 cause and error) X-PHP-List-Original-Sender: chtekk@longitekk.com X-Host-Fingerprint: 62.48.110.172 unknown Linux 2.5 (sometimes 2.4) (4) Received: from [62.48.110.172] ([62.48.110.172:26256] helo=Mordor.longitekk.homelinux.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A8/45-08544-6D477B54 for ; Wed, 24 Jan 2007 10:01:44 -0500 Received: from localhost (localhost [127.0.0.1]) by Mordor.longitekk.homelinux.net (Postfix) with ESMTP id 50A464573B for ; Wed, 24 Jan 2007 16:01:38 +0100 (CET) Received: from Mordor.longitekk.homelinux.net ([127.0.0.1]) by localhost (mordor.longitekk.homelinux.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 18056-19 for ; Wed, 24 Jan 2007 16:01:22 +0100 (CET) Received: from [192.168.10.237] (Gwaihir.longitekk.homelinux.net [192.168.10.237]) by Mordor.longitekk.homelinux.net (Postfix) with ESMTP id 30A8745730 for ; Wed, 24 Jan 2007 15:59:24 +0100 (CET) Message-ID: <45B77441.4040803@longitekk.com> Date: Wed, 24 Jan 2007 15:59:13 +0100 Reply-To: chtekk@longitekk.com Organization: LongiTEKK Networks User-Agent: Thunderbird 1.5.0.8 (X11/20061112) MIME-Version: 1.0 To: internals@lists.php.net References: <45362247.2000306@ntlworld.com> <68.D3.08544.E6F67B54@pb1.pair.com> In-Reply-To: X-Enigmail-Version: 0.94.1.0 OpenPGP: id=3E95ED4F Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig76D1C5AC0AB1B1390847B054" X-Virus-Scanned: amavisd-new at mordor.longitekk.homelinux.net Subject: Re: [PHP-DEV] Re: [Patch] mysql_set_charset for mysql ext From: chtekk@longitekk.com (Luca Longinotti) --------------enig76D1C5AC0AB1B1390847B054 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable > On 1/24/07, Scott MacVicar wrote: >> This is a gentle nudge, there was no interest since this was posted 2 >> months ago, we had a client who get exploited recently because of this= >> issue. We use mysqli where appropriate but sometimes its not available= >> because hosts don't know any better. >> >> Since there are no plans to deprecate the mysql extension any time soo= n >> we at least need the ability to protect ourselves. Patches are again P= HP >> 4_4, 5_2 and HEAD. Just for the records, maybe someone will find all this useful (lots of users on Gentoo do ;) ), I've made something similar which will soon be part of the Gentoo PHP packages, because we have lots of users and situations where it's needed to be able to define the mysql connection charset. I'll only link the mysql ext patch for 4.4.4, but on the site you can also find the ones for pdo_mysql and mysqli for PHP 5.2 if needed. Basically just a new ini-entry, PHP_INI_ALL so you can just do ini_set() in your scripts, and define the connection charset for MySQL. Here it is: https://overlays.gentoo.org/proj/php/browser/patches/php-patches/4.4.4/4.= 4.4/php4.4.4-mysql-charsetphpini.patch Have fun. ;) --=20 Best regards, Luca Longinotti aka CHTEKK LongiTEKK Networks Admin: chtekk@longitekk.com Gentoo Dev: chtekk@gentoo.org SysCP Dev: chtekk@syscp.org TILUG Supporter: chtekk@tilug.ch --------------enig76D1C5AC0AB1B1390847B054 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFFt3RK+FxjjD6V7U8RAgSRAJ0RZ5Z1oVRnnLtlDjcC7o+7HN7c9gCfUlDw HyaqNbJHfhu5++sfwzPdE9M= =cFof -----END PGP SIGNATURE----- --------------enig76D1C5AC0AB1B1390847B054--