Date: Fri, 26 Jul 2013 17:47:17 +0200 From: "bw.mail.lists" <bw.mail.lists@gmail.com> To: FreeBSD Mailing List <freebsd-ports@FreeBSD.org> Subject: php5-5.4.17 and php5-pdo_dblib upgrade brakes MSSQL connections Message-ID: <51F29A05.80604@gmail.com>
next in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51F29A05.80604>