[Sqlrelay-discussion] Workable sol'n for Apache + mod_php
Brought to you by:
mused
|
From: Steve P. <ste...@gm...> - 2008-11-14 06:32:23
|
I've as yet been unable to get the Apache PHP module to load with libmysql50sqlrelay preloaded. I originally had both the mysql and mysqli modules built as DSOs, and no matter where I tried setting LD_PRELOAD, they'd never see the library. Judging by the listserv archives, several folks appear to have had the same problem, but I haven't seen a solution. I tried linking the two modules in staticly; didn't make a difference. But I may have hit upon something. By compiling PHP with LDFLAGS="$LDFLAGS -L/usr/local/sqlrelay/lib -lmysql50sqlrelay" (change the lib path to suit your install) and linking the old PHP mysql module in statically while building mysqli support as a dso: ./configure --with-mysql=/usr/local/mysql --with-mysqli=shared,/usr/local/mysql/bin/mysql_config (again, change the paths to suit your install) I may just have found a way to give myself the best of both worlds. The mysqli extension's still linking against libmysqlclient while the older module is properly linking against libmysql50sqlrelay. This is helpful in my particular instance as I'm using a popular open source content management framework (ahem, Drupal) that helpfully includes support for both libraries. Simply changing one variable allows me to use one library to tunnel through SQL Relay while using the other to pound on our db directly. Don't know how useful this might be for others, but I'm certainly elated to have found something workable for our situation. :) Crossing my fingers that I'm on the right track now. -- Stephen P. Paschall |