Solved

Why does phpBB tell me MySQL is not available on installation?

Posted on 2009-04-02
16
3,782 Views
Last Modified: 2013-12-13
I have only ever used phpBB in a hosted environment, so this is my first time installing it on a machine I'm running myself.  When I try to install it, I get the notification that MySQL: Unavailable.  MySQL is installed on this machine and is running; I can log in at the command-line and do stuff.  I reinstalled PHP making sure I included MySQL support, but that didn't seem to fix it.

Ideas?  I am also attaching a screen shot and a PDF of my phpInfo.
phpInfo.pdf
phpbb.gif
0
Comment
Question by:mrcoulson
  • 9
  • 3
  • 3
  • +1
16 Comments
 
LVL 20

Expert Comment

by:Gawai
ID: 24057277
if i am not mistaken, you need to set the mysql info in phpbb configuration file. i will make sure and will come back to you
0
 
LVL 20

Assisted Solution

by:Gawai
Gawai earned 100 total points
ID: 24057290
0
 
LVL 14

Accepted Solution

by:
shobinsun earned 300 total points
ID: 24057423
Hello,

Your php installation is not correctly configured.

Only MSSQL Server 2000 + ODBCi is enabled.

Check your extenstion path as in php.ini for the extension modules for mysql etc.

And I recomended that you choose the XAMPP for windows.

With XAMMP phpBB works well with many databases including MySQL, Postgresql, MSSQL etc.


Here is the link for downloading XAMMP:

http://www.apachefriends.org/en/xampp-windows.html

or

http://sourceforge.net/project/showfiles.php?group_id=61776&package_id=89552

Installation and more about xampp is in the above site.

After installation your webroot will be /xampp/htdocs.

You can just create a php file and paste this code:

<?php
echo phpinfo();
?>

in it.

Then go to the browser with localhost/yourphpfilename.php

Then you get the information about your php installation .

And after that you can install phpbb with success.

regards.
 
0
 
LVL 14

Expert Comment

by:shobinsun
ID: 24057490
Hello,

This link will help you:

http://www.sitepoint.com/article/build-a-phpbb-forum/

For more info abou that go to :

http://www.phpbb.com/

regards.
0
 

Author Comment

by:mrcoulson
ID: 24059422
Okay, let's see here....

gawai: I didn't see my solution in those articles.  Did I miss something?  Also: "you need to set the mysql info in phpbb configuration".  Maybe in php.ini?  Not sure.

shobinsun: I'm going to try XAMPP for grins.  Currently removing existing PHP and MySQL installations.  I'll let you know what happens.  Also, I had already stumbled upon the first article you linked.  It didn't seem to shed any light on this step.

Jeremy
0
 

Author Comment

by:mrcoulson
ID: 24060266
Okay, here's the result of my time with XAMPP: it's neat, but I can't use it.  This machine still has to run IIS and, according to XAMPP's website, I can only have one web server running at a time -- hence why I got port errors when trying to install XAMPP.

So, I can't use XAMPP.  I'll be putting PHP and MySQL back on there the old way and trying again at this problem.  Any new input that brings me to a solution will be appreciated!

Jeremy
0
 

Author Comment

by:mrcoulson
ID: 24061195
Clean install of PHP and MySQL still gives the same result.
0
 

Author Comment

by:mrcoulson
ID: 24063305
Just out of curiosity, I got rid of IIS and installed XAMPP.  Result: no change.  Still says MySQL is unavailable.

Jeremy
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 20

Expert Comment

by:Gawai
ID: 24063386
uninstall phpbb and reinstall it.
then

install :  sudo apt-get install php5-mysql
after that
 the extensions will be available in a subdirectory of /usr/lib/php5, and after this directory will be quoted in php.ini

if it fails ref
http://www.phpbb.com/kb/article/installing-and-setting-up-your-own-web-server/
0
 

Author Comment

by:mrcoulson
ID: 24063573
"sudo apt-get install php5-mysql"  I recognize that as Linux/Unix/etc.  What would be the lame PC equivalent of the operation you are suggesting?
0
 
LVL 9

Assisted Solution

by:LinuxNubb
LinuxNubb earned 100 total points
ID: 24064821
There are a number of different things you will need to do to get this to work in Windows:

In your php.ini, you 'll need to make sure your extensions directory is set correctly.
extension_dir = "C:/php/extensions"
Make sure you check your structure for this.  There should be a bunch of DLL's in this extensions folder.  Yours may point to program files or something, doesn't matter as long as the path is correct.

Also, need to make sure the mysql extension is enabled:
extension=php_mysql.dll

You will also need to copy the php_mysql.dll file to your c:\windows\system32 directory.
0
 

Author Comment

by:mrcoulson
ID: 24076805
LinuxNubb:

The ini file points to C:\Program Files\PHP\ext where I do see the php_mysql.dll.

I see this in the ini file:

[PHP_MYSQL]
extension=php_mysql.dll

Does that mean the extension is enabled?

I copied the DLL to the system32 folder.

Same results as before.  
0
 

Author Comment

by:mrcoulson
ID: 24077586
Hey, XAMPP fans: When I try to do this with XAMPP and go to phpMyAdmin, I get "Cannot load mysql extension.  Please check your PHP configuration."

Jeremy
0
 
LVL 14

Expert Comment

by:shobinsun
ID: 24078797
Hello,

Check your php.ini for the extension directory and make sure that ther is the mysql.dll.

Regards.
0
 

Author Comment

by:mrcoulson
ID: 24079026
Hey!  Got it!  I'll have to do some fancy point-awarding here, but this is what I finally did.

I uninstalled PHP and MySQL and XAMPP and stopped IIS and restarted the machine with no web server running at all.  I ran the XAMPP install successfully.  Actually, I got an error message, but I don't know what it was about.

Then I changed Apache to listen on a different port.  Then I restarted IIS.

Then I did the PHP install with no troubles!  Woo!

Now I have IIS and Apache playing well on the same machine and phpBB is up and running and waiting for us to configure it.  

Whew.  Thanks.  Points are coming now.
0
 

Author Closing Comment

by:mrcoulson
ID: 31565959
Okay.  Shobinsun gets 300 for introducing me to XAMPP.  Gawai and LinuxNubb get 100 points each for information that helped me further understand the situation.  I wish I had more than 500 points to deal out because you guys helped me figure out something big.  Thanks a ton!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Creating and Managing Databases with phpMyAdmin in cPanel.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now