Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: mysql.ini is missing
PostPosted: Sun Jun 24, 2012 3:00 pm 
Offline
Senior Newbie

Joined: Wed Nov 24, 2010 9:42 pm
Posts: 6
Hello,

I'm trying to set up a Wordpress install and am getting "Your PHP installation appears to be missing the MySQL extension which is required by WordPress."

So far as I can tell, php5-mysql is installed. I installed with apt-get and dpkg -l show it as installed.

If I understand it correctly phpinfo() should show the file under "Additional .ini files parsed"
It's not there:
/etc/php5/apache2/conf.d/pdo.ini, /etc/php5/apache2/conf.d/pdo_mysql.ini, /etc/php5/apache2/conf.d/suhosin.ini, /etc/php5/apache2/conf.d/xcache.ini

The file is in fact not in this directory, /etc/php5/apache2/conf.d/ and locate mysql.ini only turns up /etc/php5/conf.d/pdo_mysql.ini.

I decided to see if anyone had suggestions before I went any further.

I'm considering uninstalling and reinstalling php but I would rather not as it seems like that could cause more problems.

Could just create a new mysql.ini file?

Thanks for any suggestions.


Top
   
 Post subject: Re: mysql.ini is missing
PostPosted: Sun Jun 24, 2012 4:05 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Have you restarted Apache lately? service apache2 restart

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject: Re: mysql.ini is missing
PostPosted: Sun Jun 24, 2012 4:13 pm 
Offline
Senior Newbie

Joined: Wed Nov 24, 2010 9:42 pm
Posts: 6
Thanks for the reply, yes I restarted apache (several times)


Top
   
 Post subject: Re: mysql.ini is missing
PostPosted: Sun Jun 24, 2012 4:24 pm 
Offline
Senior Member

Joined: Fri Dec 10, 2010 6:21 am
Posts: 144
I'm guessing that this is Ubuntu you are talking about...

php5-mysql does contain /etc/php5/conf.d/mysql.ini, I assume that is what you are looking for?
http://packages.ubuntu.com/precise/i386 ... l/filelist


Top
   
 Post subject: Re: mysql.ini is missing
PostPosted: Sun Jun 24, 2012 4:31 pm 
Offline
Senior Newbie

Joined: Wed Nov 24, 2010 9:42 pm
Posts: 6
Yes, this is the file I'm looking for.


Top
   
 Post subject: Re: mysql.ini is missing
PostPosted: Sun Jun 24, 2012 4:34 pm 
Offline
Senior Newbie

Joined: Wed Nov 24, 2010 9:42 pm
Posts: 6
Also, yes it is Ubuntu.


Top
   
 Post subject: Re: mysql.ini is missing
PostPosted: Sun Jun 24, 2012 4:34 pm 
Offline
Junior Member

Joined: Sun Jun 24, 2012 4:27 pm
Posts: 29
The "Additional .ini files parsed" section in phpinfo() are for additional php config files, not for mysql files. PHP has no reason to read from the MySQL config file.

However, what you should see in phpinfo are MySQL and MySQLi sections. The presence of these will tell you that MySQL extension for PHP is installed and enabled. Check in your php.ini for the lines:

Code:
extension=php_mysql.so
extension=php_mysqli.so


If there is a semi-colon in front of those, then the extensions are disabled. Remove the semi-colons, and restart your web server and you should have success.


Top
   
 Post subject: Re: mysql.ini is missing
PostPosted: Sun Jun 24, 2012 5:43 pm 
Offline
Senior Newbie

Joined: Wed Nov 24, 2010 9:42 pm
Posts: 6
These two lines:
extension=php_mysql.so
extension=php_mysqli.so

are not in php.ini, so I can't uncomment.

I did try manually adding them but it didn't help.

Makes me think the mysql extension is not enabled ( how would I enable it? ) or it's corrupted. As I mentioned in the first post it appears to be installed.


Top
   
 Post subject: Re: mysql.ini is missing
PostPosted: Sun Jun 24, 2012 6:17 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Try reinstalling the php mysql package
Code:
apt-get purge php5-mysql; apt-get install php5-mysql
then restart apache.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject: Re: mysql.ini is missing
PostPosted: Sun Jun 24, 2012 11:51 pm 
Offline
Senior Newbie

Joined: Wed Nov 24, 2010 9:42 pm
Posts: 6
Thanks for the replies, reinstalling php5-mysql did the trick.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group