PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/sqlite.so'

Bug #875262 reported by zasran
344
This bug affects 69 people
Affects Status Importance Assigned to Milestone
php5 (Debian)
Fix Released
Unknown
php5 (Ubuntu)
Fix Released
Medium
koolhead17
Oneiric
Won't Fix
High
Unassigned
Precise
Fix Released
Medium
koolhead17

Bug Description

Getting error messages from the cronjob:

Cron <root@jojda> [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete

The error message is:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/sqlite.so' - /usr/lib/php5/20090626+lfs/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0

Config files:

erik@jojda:/usr/share/doc/dovecot-common$ cat /etc/php5/conf.d/sqlite.ini
; configuration for php SQLite module
extension=sqlite.so

erik@jojda:/usr/share/doc/dovecot-common$ cat /etc/php5/conf.d/sqlite3.ini
; configuration for php SQLite3 module
extension=sqlite3.so

However there is only sqlite3.so in /usr/lib/php5/20090626+lfs/:

erik@jojda:/usr/share/doc/dovecot-common$ ls -l /usr/lib/php5/20090626+lfs/
total 788
-rw-r--r-- 1 root root 103800 2011-08-25 16:31 gd.so
-rw-r--r-- 1 root root 161076 2011-08-25 16:31 intl.so
-rw-r--r-- 1 root root 38560 2011-02-22 08:33 mcrypt.so
-rw-r--r-- 1 root root 121520 2011-08-25 16:31 mysqli.so
-rw-r--r-- 1 root root 46460 2011-08-25 16:31 mysql.so
-rw-r--r-- 1 root root 9824 2010-03-02 17:21 pam_auth.so
-rw-r--r-- 1 root root 26128 2011-08-25 16:31 pdo_mysql.so
-rw-r--r-- 1 root root 91644 2011-08-25 16:31 pdo.so
-rw-r--r-- 1 root root 22032 2011-08-25 16:31 pdo_sqlite.so
-rw-r--r-- 1 root root 17788 2011-08-25 16:31 pspell.so
-rw-r--r-- 1 root root 39108 2011-08-25 16:31 sqlite3.so
-rw-r--r-- 1 root root 79544 2011-08-25 16:31 xmlrpc.so

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: php5-sqlite 5.3.6-13ubuntu3.1
ProcVersionSignature: Ubuntu 2.6.38-11.50-generic 2.6.38.8
Uname: Linux 2.6.38-11-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu3
Architecture: i386
Date: Sat Oct 15 12:45:19 2011
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: php5
UpgradeStatus: Upgraded to oneiric on 2011-10-15 (0 days ago)

Revision history for this message
zasran (erik-zasran) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in php5 (Ubuntu):
status: New → Confirmed
Revision history for this message
Mahender Didwania (mahender.didwania) wrote :

I get a similar problem with pam_auth.so, I haven't installed php5-auth-pam package, but the file /etc/php5/conf.d/pam_auth.ini exists while /usr/lib/php5/20090626+lfs/pam_auth.so doesn't. This is after upgrade from 11.04 to 11.10.

Revision history for this message
Mahender Didwania (mahender.didwania) wrote :

I do not know if it is related, but I had Squirrelmail installed and Dovecot is configured to authenticate user via PAM.

Revision history for this message
Martin Weber (martin-karl-weber) wrote :

I am also hit by this bug (missing sqlite.so). Deleting, purging and reinstalling the package does not help. Problem is always reproducible.

Revision history for this message
Povilas Balzaravičius aka Pawka (pawka) wrote :

Same problem affects me too:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/sqlite.so' - /usr/lib/php5/20090626+lfs/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0

Revision history for this message
Ben Romer (bromer) wrote :

Same problem here, just upgraded a server to 11.10 from 11.04.

Revision history for this message
W.John Guineau (guineau) wrote :

Same error here. Distro upgrade from 11.04 to 11.10 x64

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/sqlite.so' - /usr/lib/php5/20090626/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0

Dave Walker (davewalker)
Changed in php5 (Ubuntu Precise):
importance: Undecided → High
milestone: none → precise-alpha-1
Revision history for this message
Dave Walker (davewalker) wrote :

This has occurred because sqlite support was removed, in favour of pure sqlite3. It seems that a config file was left in place.

Workaround:
sudo rm /etc/php5/conf.d/sqlite.ini

Changed in php5 (Ubuntu Precise):
importance: High → Medium
Changed in php5 (Ubuntu Oneiric):
importance: Undecided → High
status: New → Confirmed
milestone: none → oneiric-updates
Revision history for this message
PabloRQ (pablo-romeroquinteros) wrote :

@Dave, this workaround doesn't work.

Proved solution: manual install sqlite.so from natty packages.

You can see the difference between packages here:
oneiric: http://packages.ubuntu.com/oneiric-updates/i386/php5-sqlite/filelist
natty: http://packages.ubuntu.com/natty-updates/i386/php5-sqlite/filelist

Step by step:
- Download the old package from here: http://packages.ubuntu.com/natty-updates/php5-sqlite
- Extracts sqlite.so
- Move sqlite.so to /usr/lib/php5/20090626+lfs/
- Change file permissions to root:root
- Enjoy!

(source: http://ubuntuforums.org/showthread.php?p=11381810)

Revision history for this message
Ame Nomade (ame-nomade) wrote :

Hello guys, please note that this is a big concern when using Zend Framework with Zend_Cache and the Sqlite Backend (Zend_Cache_Backend_Sqlite), as it rely on sqlite.so, not sqlite3.so
A temporary fix can be done by copying the old file (from another similar computer) to the same place on the updated computer : /usr/lib/php5/20090626/sqlite.so , this is working.

Revision history for this message
Ame Nomade (ame-nomade) wrote :

This issue about not using Sqlite 3.x databases in Zend_Cache_Backend_Sqlite is described here : http://framework.zend.com/issues/browse/ZF-3006

Status: Open
Resolution: Unresolved
Fix Version/s: Next Major Release

"This will be fixed in Zend Framework 2.0 on using one of the installed extensions sqlite3, pdo_sqlite or sqlite"

Dave Walker (davewalker)
Changed in php5 (Ubuntu Precise):
assignee: nobody → koolhead17 (koolhead17)
Revision history for this message
sergiGP (sergigp85) wrote :

The solution of @parq doesn't work for me... the warning is already here :(

Maybe because my folder is called "20090626" without lfs ? I'm not a unix expert :(

Revision history for this message
Dave Walker (davewalker) wrote :

@parq, no, my workout is valid. Your workaround is regarding a different issue.

To clarify, sqlite2 support was dropped with intention via bug 747325

This bug is purely about the warning message that is visible, due to a config file being left in place.

Any archive packages which still depend on sqlite support, rather than sqlite3 need to have a bug raised; as this support is deprecated in Ubuntu main.

Thanks.

Revision history for this message
JenniferHodgdon (yahgrp) wrote :

@davewalker: Thanks for posting your workaround in #9 and clarification in #14.

I started getting this message in my cron log emails after upgrading from 11.04 to 11.10 last week. The error was coming from the /etc/cron.d/php5 job. You can also see it in a terminal by running:
% php5
(that's probably the simplest reproduce).

So I did as you suggested (more or less), and my errors went away, and I'm still able to use Drupal 7 with SQLite (which is why I had the SQLite packages in the first place). A somewhat safer way to get rid of this error message and not completely obliterate the sqlite.ini file (which you could conceivably need for something):

cd /etc/php5/conf.d/
sudo mv sqlite.ini sqlite.NOTini

Revision history for this message
Steve Langasek (vorlon) wrote :

Two fixes appear to be needed to this package:
 - drop sqlite from debian/modulelist
 - add maintainer scripts for the php5-sqlite package which call dpkg-maintscript-helper to handle removal of the obsolete conffile /etc/php5/conf.d/sqlite.ini (requires a versioned pre-dependency on dpkg; see the manpage).

Dave Walker (davewalker)
Changed in php5 (Ubuntu):
milestone: precise-alpha-1 → precise-alpha-2
Revision history for this message
Romsla (romsla) wrote :

's not too hard to fix that ...just open that file:

nano /etc/php5/conf.d/sqlite.ini

... and comment out the load instruction:

; configuration for php SQLite module
; extension=sqlite.so

Revision history for this message
Pander (pander) wrote :

On workaround in comment #10, you can extract the file with:
  dpkg -x php5-sqlite_5.3.5-1ubuntu7.4_amd64.deb /tmp
and find it here:
  /tmp/usr/lib/php5/20090626/sqlite.so

Colin Watson (cjwatson)
Changed in php5 (Ubuntu Precise):
milestone: precise-alpha-2 → ubuntu-12.04-beta-1
Changed in php5 (Debian):
status: Unknown → Fix Released
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

I believe this was fixed by the latest precise merge with Debian.

Can somebody please try out the upgrade to php5 5.3.10-1ubuntu1?

Thanks!

Revision history for this message
Timo Erbach (terbach) wrote :

Just upgraded to php5 5.3.10 with the same error.

tags: added: rls-p-tracking
Martin Pitt (pitti)
Changed in php5 (Ubuntu):
milestone: ubuntu-12.04-beta-1 → ubuntu-12.04-beta-2
Revision history for this message
Steve Langasek (vorlon) wrote :

This was fixed in 5.3.10-1ubuntu2. Changelog:

php5 (5.3.10-1ubuntu2) precise; urgency=low

  * Pre-Depend on a new enough version of dpkg for dpkg-maintscript-helper
    rather than checking whether it exists at run-time, leading to more
    predictable behaviour on upgrades.

The preinst should be cleaned up to drop the '[ -x /usr/bin/dpkg-maintscript-helper ] && ' check as well, but that's not critical, as with the pre-dep it should always be present and executable.

Changed in php5 (Ubuntu Precise):
status: Confirmed → Fix Released
Revision history for this message
Ondřej Surý (ondrej) wrote :

Just a note:

php 5.4 has dropped [ -x ... ] and also has a new module manager.

Revision history for this message
Zineb MOURACHE (zineb-mourache) wrote :

Thanks parq ! your solution worked for me !!

I just upgraded to ubuntu 11.10 and got the same problem :

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/sqlite.so' - /usr/lib/php5/20090626+lfs/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0

I followed the instructions from parq (pablo-romeroquinteros) and it foxed the issue perfectly

As he described :

Step by step:
- Download the old package from here: http://packages.ubuntu.com/natty-updates/php5-sqlite
- Extracts sqlite.so
- Move sqlite.so to /usr/lib/php5/20090626+lfs/
- Change file permissions to root:root
- Enjoy!

Revision history for this message
Mark Fraser (launchpad-mfraz) wrote :

Upgraded to 12.10 yesterday and I'm now seeing these errors.

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525+lfs/uploadprogress.so' - /usr/lib/php5/20100525+lfs/uploadprogress.so: cannot open shared object file: No such file or directory in Unknown on line 0

Revision history for this message
Luis Ferro (luis-ferro) wrote :

There is a quick fix for this issue, which is to add the full path of the file in the ini file loading the extension.

Some extensions that give this error will load with this work around without issues (zend-opcache on php 5.3 for instance).

Revision history for this message
Rolf Leggewie (r0lf) wrote :

oneiric has seen the end of its life and is no longer receiving any updates. Marking the oneiric task for this ticket as "Won't Fix".

Changed in php5 (Ubuntu Oneiric):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.