Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Development & Programming > Programming Talk
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Programming Talk
This forum is for all programming questions.
The questions do not have to be directly related to Ubuntu and any programming language is allowed.

 
Thread Tools Display Modes
Old June 14th, 2007   #1
CopaceticOpus
5 Cups of Ubuntu
 
Join Date: Feb 2007
Beans: 21
Red face PDO troubles in Fiesty

I have a fresh install of Fiesty, which of course includes PHP 5.2.x with PDO by default. I was trying to figure out how to get pdo_dblib installed, and at one point I typed the following:

Code:
pecl install pdo
I knew I already had PDO, but I figured it wouldn't hurt. I was very wrong! PHP will not run at all on my system now. I tried "pecl uninstall pdo" and that ran, but it didn't seem to do much of anything.

When I try to restart Apache, I see the following in my /var/log/apache2/error.log:

Code:
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20060613+lfs/mssql.so' - /usr/lib/php5/20060613+lfs/mssql.so: cannot open shared object file: No such file or directory in Unknown on line 0
/usr/sbin/apache2: symbol lookup error: /usr/lib/php5/20060613+lfs/pdo_mysql.so: undefined symbol: php_pdo_get_dbh_ce
How do I undo this and get PHP back to functional?
CopaceticOpus is offline   Reply With Quote
Old June 14th, 2007   #2
CopaceticOpus
5 Cups of Ubuntu
 
Join Date: Feb 2007
Beans: 21
Re: PDO troubles in Fiesty

I've made some progress. I forgot about the extra .ini files that are included from "/etc/php5/apache2/conf.d". By removing pdo.ini and pdo_mysql.ini, I stopped the attempted include of pdo.so and pdo_mysql.so. PHP now works again, yay!

Unfortunately, PDO is now completely gone. It used to show up in the phpinfo() listing along with a pdo_mysql extension, but it's just not there. Hmm...
CopaceticOpus is offline   Reply With Quote
Old February 14th, 2008   #3
drwoland
First Cup of Ubuntu
 
Join Date: Apr 2005
Beans: 8
Re: PDO troubles in Fiesty

had the same problem in gutsy, looked around, found this:

http://www.mail-archive.com/debian-b...msg115619.html

It essentially says that the symbol should be loaded in pdo.so and then is referenced in pdo_mysql.so

What this means is that pdo.so has to be loaded chronologically before pdo_mysql.so. Apparently, when eating it's conf files, php/apache2 sorts pdo_mysql.ini before pdo.ini in /etc/php5/apache2/conf.d. I just did this to force it to be loaded later

Code:
sudo mv pdo_mysql.ini zpdo_mysql.ini
And it now works fine. Cheers.
drwoland is offline   Reply With Quote
Old February 26th, 2008   #4
ntom-taylor
5 Cups of Ubuntu
 
Join Date: Jul 2007
Location: GB
Beans: 27
Ubuntu 7.04 Feisty Fawn
Angry Re: PDO troubles in Fiesty

Hello,

My name is Tom Taylor, i am running ubuntu 7.10

I have also had this issue just happen to me..
I had previously installed php with pdo, and added the pdo_mysql and pdo extension into the /etc/php5/apache2/php.ini file.

Once i then tried to install php5-mysql via apt-get php segfaulted and apache refused to restart.

With the pdo and pdo_mysql extension in php.ini i was getting the following error from /var/log/apache2/error.log..

PHP Warning: Module 'PDO' already loaded in Unknown on line 0
PHP Warning: Module 'pdo_mysql' already loaded in Unknown on line 0
/usr/sbin/apache2: symbol lookup error: /usr/lib/php5/20060613+lfs/pdo_mysql.so: undefined symbol: php_pdo_get_dbh_ce

Once i commented out the pdo extension, this got rid of the first PHP warning, and pdo is in phpinfo but no pdo drivers..

If i comment out pdo_mysql in /etc/php5/apache2/php.ini and also commented it out from /etc/php5/conf.d/pdo_mysql.ini and restarted apache then it worked.

Bottom line is, if anywhere at all you have pdo_mysql.so in any configuration, you get the error:

/usr/sbin/apache2: symbol lookup error: /usr/lib/php5/20060613+lfs/pdo_mysql.so: undefined symbol: php_pdo_get_dbh_ce

and apache fails to load.

Server version: Apache/2.2.4 (Ubuntu)

Kind regards,
Tom Taylor
ntom-taylor is offline   Reply With Quote
Old June 17th, 2008   #5
algerion
First Cup of Ubuntu
 
Join Date: Jun 2008
Beans: 1
Re: PDO troubles in Fiesty

I did exactly the same Tom Taylor did, with the same result. Which I decided was to uninstall php5-mysql using

Code:
sudo apt-get remove php5-mysql
but to be sure I decided to uninstall pdo_mysql and pdo, so I did
Code:
pecl uninstall pdo_mysql
pecl uninstall pdo
and later I reinstalled pdo and pdo_mysql and it worked fine. I had to remove manually some extensions declarations in php.ini, but I think this is not a major problem.
algerion is offline   Reply With Quote
Old November 14th, 2008   #6
gr8whitesavage
First Cup of Ubuntu
 
Join Date: Mar 2006
Location: Fairfax, VA
Beans: 7
Ubuntu 6.10 Edgy
Send a message via AIM to gr8whitesavage Send a message via MSN to gr8whitesavage Send a message via Yahoo to gr8whitesavage
Re: PDO troubles in Fiesty

AFAIK this error is caused by missing mysql dev package seen here: http://www.buggy.id.au/2007/02/19/in...pdo-on-ubuntu/

i uninstalled pdo, pdo_mysql using pecl
ran % sudo apt-get install libmysqlclient15-dev
reinstall pdo, pdo_mysql using pecl

cheers!
gr8whitesavage is offline   Reply With Quote
Old May 8th, 2009   #7
eMarv
First Cup of Ubuntu
 
Join Date: May 2009
Beans: 1
Re: PDO troubles in Fiesty

Quote:
Originally Posted by gr8whitesavage View Post
i uninstalled pdo, pdo_mysql using pecl
ran % sudo apt-get install libmysqlclient15-dev
reinstall pdo, pdo_mysql using pecl

cheers!
thanks, this worked for me.

The only thing is I only uninstalled pdo_mysql and not pdo (and it still worked .
eMarv is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:28 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry