Setting up phpBB board using Apache Server {RESOLVED}

  • SB
  • Moderator
  • Genius
  • User avatar
  • Posts: 8742
  • Loc: Aberdeen, Scotland

Post 3+ Months Ago

Lengthy title, amend if you wish.

Basically, i am trying to create a phpBB on my Apache server i have installed onto my machine. I have no problems with the server, its running with PHP and MySQL. I have set up the database etc etc thanks to Katana. I just need a little help with an error that is popping up when it comes to installing the actual BB.

The error i am having is this...

Quote:
Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\Program Files\Apache Group\Apache2\test\phpBB2\db\mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\Apache Group\Apache2\test\phpBB2\db\mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\Apache Group\Apache2\test\phpBB2\db\mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database.


I am not entirely sure what this means and would love to fix this before i head out to my other work in an hours time. Obviously its not likely to be sorted by then, but if someone could help me as soon as possible i would be extremely grateful!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Interesting timing. I just fixed this problem on a new installation on my workstation here not more than a half hour ago.

You need to set mySQL to use Old_Passwords. This describes how and why:

http://webyog.com/faq/23_58_en.html

Official documentation here:
http://dev.mysql.com/doc/refman/5.0/en/old-client.html

If you are using root as the user, you will need to reset the password to OLD_PASSWORD using the command line tool that comes with MySQL. Same goes for any user you have already created.
  • SB
  • Moderator
  • Genius
  • User avatar
  • Posts: 8742
  • Loc: Aberdeen, Scotland

Post 3+ Months Ago

Wow, hows that for a coincidence. Quick reply too.

Not sure what you mean, i will have a look at these links though.

Thanks!
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Yeah - the links explain it pretty well. I'm making the assumption you know how to use the command line utility that comes with MySQL. If you don't let us know. I've had to do this with every installation I've done so far, so I have it in my install notes now to remember to do it.
  • SB
  • Moderator
  • Genius
  • User avatar
  • Posts: 8742
  • Loc: Aberdeen, Scotland

Post 3+ Months Ago

I dont know much of anything to do with this unfortunatly.

So, to answer your question. No, i dont know much about the MySQL Command line :oops:
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

It's pretty much like a dos prompt. If you are on Windows, you'll find it under start|programs|MySQL |MySQL Command Line Client

When it opens, type in the password for user: root (If you didn't create a password for root the default is blank) then hit enter

At the prompt type the SQL query

SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');

You'll need to do this for any user you have already created.

(Making the substitutions for some_user, some_host, and newpwd - be sure to type it exactly as you see it including caps and apostophes.

Type exit or quit to exit the editor
  • SB
  • Moderator
  • Genius
  • User avatar
  • Posts: 8742
  • Loc: Aberdeen, Scotland

Post 3+ Months Ago

OK, did as you said before ATNO and despite it not working before it seems to be working in that its accepting the "SET PASSWORD FOR 'some_user'@'some_host' = OLD PASSWORD('newpwd');" and its good. Now there is another problem...

Quote:
Warning: mysql_connect(): Access denied for user 'localhost'@'localhost' (using password: YES) in C:\Program Files\Apache Group\Apache2\test\phpBB2\db\mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\Apache Group\Apache2\test\phpBB2\db\mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\Apache Group\Apache2\test\phpBB2\db\mysql4.php on line 331
phpBB : Critical Error

Could not connect to the database


Does anyone know what the problem is?
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

You need to give your username the appropriate rights to the database you wish to connect to.

It looks like you're using "localhost" as the username?
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

I believe AXE has it exactly correct. SB, if you haven't already done so, download and install this administration utility. It will make your life easier
http://www.mysql.com/products/tools/administrator/
  • SB
  • Moderator
  • Genius
  • User avatar
  • Posts: 8742
  • Loc: Aberdeen, Scotland

Post 3+ Months Ago

yes, thats correct. Not quite sure what you mean by giving it the correct rights. I was sure it was all ok.

I am new at the Apache, PHP, and MySQL (AMP) scene, so you will have to excuse how stupid i may sound.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

btw SB:

Quote:
Access denied for user 'localhost'@'localhost'


You most likely don't have a user named localhost.

I'm thinking in your config.php you have 'localhost' as your user, when it most likely is 'root'

If that's the case, I would recommend creating a new user other than root and give them access permissions to the database. That Admin utility will help you do that easily.

Using root to access a database via phpBB is a security risk.
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

Yup, go ahead and setup phpMyAdmin with the "root" account, and .htaccess protect its location so that it's not accesible via the net.

Once you've got phpMyAdmin setup (if you don't already), you can create new databases, new users (with password), and setup the appropriate access rights through that.

Basically, each user you create, you have to tell MySQL exactly which databases it has access to, and what level of access (add data, remove data, read-only access, etc) they're allowed to those databases.

This is basically due to the fact that it's designed for a multi-user environment, and on shared hosting, you don't want somebody else's username accessing your databases and playing with your data.

If your server is disconnected from the net, then you can safely use the "root" login for your scripts, as nobody else will be able to hit your server anyways.
  • SB
  • Moderator
  • Genius
  • User avatar
  • Posts: 8742
  • Loc: Aberdeen, Scotland

Post 3+ Months Ago

my server will be disconnected from the internet anyway as i hardly use my laptop for internet. Only if i need to download files.

Heh, i am even leaving this post on another laptop i use most of the time despite my personal laptop being inches away :lol:

Thank you for your help. I will download this Administrator file and see what happens. Looks quite simple to use.

Needless to say, i will probably leave some post here in the future with some stupid question again.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

P.S. SB -- I like you're new rank *lol
(*watches SB as he goes to run and hide under his bed *lol)
  • SB
  • Moderator
  • Genius
  • User avatar
  • Posts: 8742
  • Loc: Aberdeen, Scotland

Post 3+ Months Ago

ATNO/TW wrote:
P.S. SB -- I like you're new rank *lol
(*watches SB as he goes to run and hide under his bed *lol)


ATNO, you are not the first person that has said that since that rank was put in place. I will repeat what i said then, i aint no coward :)
  • SB
  • Moderator
  • Genius
  • User avatar
  • Posts: 8742
  • Loc: Aberdeen, Scotland

Post 3+ Months Ago

As a result of some brilliant help from ATNO and topped with previous help with Axe i have managed to fix this problem by editing the config.php file manually (ATNO was a great help in this).

I cant tell you all how please i am to have got this fixed, i am really grateful for your help.

Look out for some topics in the near future going along the lines of "I have ruined my phpBB forum" :lol:

Thank you!!
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

GTKY Question 1. How do you plan to screw up your board first? ;)
  • SB
  • Moderator
  • Genius
  • User avatar
  • Posts: 8742
  • Loc: Aberdeen, Scotland

Post 3+ Months Ago

:lol:

Please go away :lol:
  • daretofail87
  • Born
  • Born
  • daretofail87
  • Posts: 1

Post 3+ Months Ago

i read your article and i installed php5.1, mysql5.2 ,iis5.They are run.But when i try to install phpMyAdmin follow ur intruction in the article programming-forum/setting-phpbb-board-using-apache-server-resolved-t55568.html. When i run http://localhost/phpMyAdmin/index.php they have error :

phpMyAdmin - Error

Cannot load mysql extension. Please check your PHP configuration. - Documentation.
What i have to do.Thanks for your article

Post Information

  • Total Posts in this topic: 19 posts
  • Users browsing this forum: No registered users and 64 guests
  • 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
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.