From owner-freebsd-ports@FreeBSD.ORG Fri Jul 26 15:47:40 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1788F734 for ; Fri, 26 Jul 2013 15:47:40 +0000 (UTC) (envelope-from bw.mail.lists@gmail.com) Received: from mail-ea0-x235.google.com (mail-ea0-x235.google.com [IPv6:2a00:1450:4013:c01::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A098E2334 for ; Fri, 26 Jul 2013 15:47:39 +0000 (UTC) Received: by mail-ea0-f181.google.com with SMTP id d10so501336eaj.12 for ; Fri, 26 Jul 2013 08:47:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=t+4Wgk9oBfUUqMdqcr+OFr/w3ba54xKFHTPYK2j0E0c=; b=IbUk7qXdysxz+KJTa0GvnrSfQTwVLCZJy0OLH02gBdEZWwJvYPqnP+tYGC1PkqUPdt dDRr/ViMapwkzy9jO8j54votOG5C/Bk88kOFBbd2s8SIE2AwufrNoRF0aZ7AwuaIcgn2 yIGSKz09As/pG8NXHXaKofnbXkIGPk/g9AOcb7l+EBXVQ9uaen8+P2zC8/8ga7Rk/A4n XK2A+Gim02TxPkc8eZLfjc0XxRCfy1axk06UrGwfUg0YBYTCvZ6OaS7Wfem4TvSR01l8 bLm7UxGP4a1xU/XVg9vwtg70YEsviny5j0I7ZS9MruewcR6ibSMVabxVW/T+8SzeZQM2 CMJg== X-Received: by 10.14.223.199 with SMTP id v47mr47980680eep.32.1374853657918; Fri, 26 Jul 2013 08:47:37 -0700 (PDT) Received: from [127.0.0.1] ([87.213.55.5]) by mx.google.com with ESMTPSA id n45sm81745115eew.1.2013.07.26.08.47.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Jul 2013 08:47:36 -0700 (PDT) Message-ID: <51F29A05.80604@gmail.com> Date: Fri, 26 Jul 2013 17:47:17 +0200 From: "bw.mail.lists" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: FreeBSD Mailing List Subject: php5-5.4.17 and php5-pdo_dblib upgrade brakes MSSQL connections Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jul 2013 15:47:40 -0000 Hello list, Today I upgraded to php5-5.4.17 which broke the web pages because connections to MSSQL servers were failing, /var/log/httpd-error.log: /usr/local/lib/php/20100525/pdo_dblib.so: Undefined symbol "DBSETLDBNAME" This is a php bug: https://bugs.php.net/bug.php?id=65219 What I did was REPLACE the file /usr/ports/databases/php5-pdo_dblib/files/patch-dblib_driver.c with the following contents, then recompile: =========== --- dblib_driver.c.orig 2013-07-26 16:26:43.986888682 +0200 +++ dblib_driver.c 2013-07-26 16:33:27.930888754 +0200 @@ -274,9 +274,9 @@ ,{"5.0",DBVERSION_70} /* FIXME: This does not work with Sybase, but environ will */ ,{"6.0",DBVERSION_70} ,{"7.0",DBVERSION_70} - ,{"7.1",DBVERSION_71} - ,{"7.2",DBVERSION_72} - ,{"8.0",DBVERSION_72} + ,{"7.1",DBVERSION_80} + ,{"7.2",DBVERSION_80} + ,{"8.0",DBVERSION_80} ,{"10.0",DBVERSION_100} ,{"auto",0} /* Only works with FreeTDS. Other drivers will bork */ @@ -346,6 +346,12 @@ DBSETLAPP(H->login, vars[1].optval); +#ifdef DBSETLDBNAME + if (vars[3].optval) { + DBSETLDBNAME(H->login, vars[3].optval); + } +#endif + H->link = dbopen(H->login, vars[2].optval); if (!H->link) { @@ -361,10 +367,6 @@ /* allow double quoted indentifiers */ DBSETOPT(H->link, DBQUOTEDIDENT, "1"); - if (vars[3].optval) { - DBSETLDBNAME(H->login, vars[3].optval); - } - ret = 1; dbh->max_escaped_char_length = 2; dbh->alloc_own_columns = 1; =========== Basically applied the patch from the php bug linked above to the php-5.4.17 dist file. Website works now. Note that I'm not really sure what the patch is affecting. I can't submit a proper PR now, will do it if no one else does in the next 24 hours or so, just wanted to let people know in case someone else hits this problem.