Module 'PDO' already loaded in Unknown on line 0

astra

Verified User
Joined
Mar 4, 2009
Messages
94
Hi,

I am running centos 4.4 32bit php 5.2.1 with mysql 5.0.51a and try to get mysql_pdo but i got a error after reboot my httpd Starting httpd: PHP Warning: Module 'PDO' already loaded in Unknown on line 0

I have search on google but i don't find a good answer to fix this problem.
 
Last edited:
Check to see if there are multiple lines trying to load mysql_pdo in your conf file.
 
I think it's compiled in (so, there is no need to load it in php.ini) :) Check "/usr/local/bin/php --info | grep configure".
 
/usr/local/bin/php --info | grep configure
Configure Command => './configure' '--with-apxs' '--with-curl' '--with-curl-dir=/usr/local/lib' '--with-gd' '--with-gd-dir=/usr/local' '--with-freetype' '--with-freetype-dir=/usr/local/lib' '--with-gettext' '--with-jpeg-dir=/usr/local/lib' '--with-kerberos' '--with-mcrypt' '--with-mhash' '--with-mysql=/usr' '--with-pear' '--with-png-dir=/usr/local/lib' '--with-xml' '--with-zlib' '--with-zlib-dir=/usr/local/lib' '--with-zip' '--with-openssl' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-track-vars' '--enable-mbstring' '--enable-memory-limit'

hmm i dont see the pdo :S
 
Did you recently update build and then php? Re-edit your configure file and then re-compile PHP with PDO.
 
Jup this is what i have done:

install:
pecl install pdo
pecl install pdo_mysql

edit:

joe /usr/local/directadmin/customapache/configure.php

--enable-pdo=shared \
--with-pdo-mysql=shared \
--with-sqlite=shared \
--with-pdo-sqlite=shared \

compile php:

cd /usr/local/directadmin/customapache/
./build clean
./build php n

edit php.ini:

joe /usr/local/lib/php.ini
extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613"
extension=pdo.so
extension=pdo_mysql.so

rest services:

service mysqld restart is oke
service httpd restart fail see error :)
 
When you run

Code:
/usr/local/bin/php --info | grep configure

do you see pdo at all now? If not, your customapache may not be compiling it correctly from the config file. I've only use custombuild to get pdo working.
 
Oke if i set

extension=pdo.so
extension=pdo_mysql.so

into the php.ini and restart the httpd i get the damn error :S

service httpd restart
Stopping httpd: [ OK ]
Starting httpd: PHP Warning: Module 'PDO' already loaded in Unknown on line 0
[FAILED]
 
Back
Top