Databases: lots of "PHP Warning" that is related to the pdo and pdo_sqlite extensions (SQLite 3 DB support)?

Databases: lots of "PHP Warning" that is related to the pdo and pdo_sqlite extensions (SQLite 3 DB support)?

by Wen Hao Chuang -
Number of replies: 0
Dear all:

I just noticed that for a typical installation of Moodle 1.9.x, it would generate a lot of "PHP Warning" message in the PHP error_log, here is an example[07-Jun-2010 16:27:39] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0
[07-Jun-2010 16:27:39] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
[07-Jun-2010 16:27:39] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo_sqlite.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
[07-Jun-2010 16:27:39] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0



I google'd around, but couldn't find more information about it. It seems to be related to the pdo and pdo_sqlite extensions for the (experimental) SQLite 3 database support (see http://docs.moodle.org/en/PHP_settings_by_Moodle_version#PHP_Extensions_and_libraries).

However, when I did the phpinfo.php, I noticed that the PHP that I'm running (5.2.13) already has pdo and pdo-mysql compiled in (maybe pointing to the wrong directory?):

Build Date May 12 2010 15:49:48
Configure Command './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-config-file-scan-dir=/etc/php.d' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--with-unixODBC=/usr' '--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx' '--enable-dio' '--with-mime-magic' '--with-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--with-system-tzdata' '--enable-pcntl' '--enable-static' '--with-imap' '--with-imap-ssl' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt=/usr' '--with-mhash=/usr' '--with-tidy=/usr' '--with-ncurses' '--with-gd' '--enable-bcmath' '--enable-dba' '--with-db4=/usr' '--with-xmlrpc' '--with-ldap' '--with-ldap-sasl' '--with-mysql=/usr' '--with-mysqli=/usr/bin/mysql_config' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--enable-dom' '--with-dom-xslt=/usr' '--with-dom-exslt=/usr' '--with-pgsql' '--enable-soap' '--with-xsl=/usr' '--enable-fastcgi' '--enable-pdo' '--with-pdo-odbc=unixODBC,/usr' '--with-pdo-mysql=/usr' '--with-pdo-pgsql=/usr' '--with-pdo-sqlite=/usr' '--enable-json' '--enable-zip' '--with-readline' '--enable-dbase'


My questions:

1. Is this caused by bad code implementation around the experimental SQLite 3 database support area, or it was just bad configuration of PHP on my part?

2. What can I do to avoid getting these PHP warnings in my error_log in the future?

Here is another similar output (which I found through google):

http://www.harlemchildrensociety.org/moodle/pix/error_log

By the way I was running Moodle 1.9.7+, but I think this is also happening in the latest 1.9.9+.

Thanks!

Wen
Average of ratings: -