LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-10-2009, 04:59 AM   #1
jmacloue
LQ Newbie
 
Registered: Apr 2009
Location: Kharkiv, UA
Distribution: Slackware
Posts: 18

Rep: Reputation: 7
Slackware 12.2/13.0 pdo_sqlite problem


Spent quite a time to discover that pdo_sqlite PHP extension shipping with Slackware doesn't link against system sqlite3 but rather against bundled 3.3.7 version. This is hardly a big problem for PHP itself but it appears that Apache modules tend to use this bundled sqlite library instead of the system one which may lead to problems.

At my development server I use Trac issue tracker - a Python application "linked" to Apache via mod_wsgi. Trac uses Subversion bindings to access local repositories and while upgrading server to Subversion 1.6.4 from Slackware 13.0 I trapped an error in Trac: while trying to open the repository Subversion says it is linked against sqlite library 3.6.6.2 but working with 3.3.7 and stops processing. But when I used trac-admin command-line application there were no problems of this kind - Trac synchronized with the repositories just fine.

The most obvious solution was to fall back to "legacy" repository format not using sqlite features but it is not what we want so I tried to find this 3.3.7 sqlite everywhere on the server. The only place we still had 3.3.7 was in pdo_sqlite.so from PHP package - it seems that when Python interpreter linked to the Apache through mod_wsgi (and possibly through mod_python as well - don't see any dramatic difference) tries to load sqlite library it finds that sqlite library already loaded by pdo_sqlite extension and uses it instead of the system one. It's also possible that the Subversion modules may face the same problem if used in conjunction with mod_php. I didn't find any clues on this matter with Google I thought it might be useful for somebody out there.

The best solution will be to rebuild the php package with ... --with-pdo-sqlite=/usr,shared ... in SlackBuild but it will require some time and installation of many libraries which are not otherwise needed so it's faster to rebuild the pdo_sqlite extension only:

Code:
tar -xf /home/ftp/slackware...../php-5.2.10.tar.xz
cd php-5.2.10/ext/pdo_sqlite
phpize
LDFLAGS=-ldl ./configure --with-pdo-sqlite=/usr
make
cp modules/pdo_sqlite.so /usr/lib/php/extensions/
(note the LDFLAGS setting)

PS ... or maybe it's not worth to use mod_wsgi for Python applications in Slackware - just stick with CGI.
 
  


Reply

Tags
php, subversion



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
slackware 12.2 problem after problem, no mysql no mbstring zonemikel Slackware 6 08-30-2009 01:37 PM
Slackware 12.0: boot problem & sudo / wifi-radar problem War_Ensemble Slackware 7 01-15-2008 09:49 AM
Slackware 9.0 Lan Card problem and a problem adding a user! BmxFace Slackware 1 07-03-2003 07:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration