PHP Developers Network
http://forums.devnetwork.net/

Uni Server set-up
http://forums.devnetwork.net/viewtopic.php?f=31&t=141726
Page 2 of 2

Author:  MarkHoward [ Wed Sep 09, 2015 4:38 pm ]
Post subject:  Re: Uni Server set-up

When I click on the phpMyAdmin button in UniServer the NZMotorhomeForum database is not listed.

Author:  requinix [ Wed Sep 09, 2015 5:35 pm ]
Post subject:  Re: Uni Server set-up

Okay... So it sounds like you don't have the database set up. You need that.

You basically need to install phpBB on your machine. Go through that whole process, which will involve setting up a database user and creating databases and tables and such, and when you're done you can try the forum again. Most of the information you'll need to know (eg. username, password, database name) should be configured with the site's phpBB - maybe in a config file?

Author:  MarkHoward [ Wed Sep 09, 2015 8:22 pm ]
Post subject:  Re: Uni Server set-up

I think you are right again.

I used phpMyAdmin to set up the database and user
BUT
when I go to load the (large) database using bigdump.php I get a similar message saying :
Quote:
Database connection failed due to No connection could be made because the target machine actively refused it.


So I had another look at the database I'd set up. It looks as if the UniServer phpMyAdmin utility has set it up in a different folder to where it should be. It is not in localhost:81/NZMotorhomeForum/

See attached clip
Attachment:
Capture.PNG
Capture.PNG [ 37.14 KiB | Viewed 5482 times ]


I don't know how to get phpMyAdmin to create the database in the right folder.

Author:  requinix [ Wed Sep 09, 2015 10:09 pm ]
Post subject:  Re: Uni Server set-up

Databases are not set up in folders.

Did you find the configuration for the forum? It's probably a file, like config.php or config.inc or something like that. I think. That's the information that tells phpBB where the database is and how to connect to it.
You need to find that file and edit it to connect to your local database because whatever settings it has now will not work. The hostname needs to change (probably to localhost) but the username and password will be fine. Note the username, password, and database name.
Now you need to create the new database. Follow the instructions to install phpBB's database. Do it on your computer. Use the username, password, and database name from before.

Author:  MarkHoward [ Wed Sep 09, 2015 10:22 pm ]
Post subject:  Re: Uni Server set-up

Quote:
<?php
// phpBB 3.0.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'mysqli';
$dbhost = 'localhost';
$dbport = '';
$dbname = 'nzmotorh_forum';
$dbuser = 'nzmotorh_markh';
$dbpasswd = '*******'; [edited]

$table_prefix = 'phpbb_';
$acm_type = 'file';
$load_extensions = '';

@define('PHPBB_INSTALLED', true);
// @define('DEBUG', true);
// @define('DEBUG_EXTRA', true);
?>


This is the file (config.php) that is in the localhost:81/NZMotorhomeForum/ folder.
The dbname and dbuser entries are what I used when setting up the database.
I'm confused by the strange appearance of "us_opt1" in the address bar of the phpMyAdmin page that I included in my last post. That feels wrong.

I'll remove the database I have set up and try again. See if I can get to be recognised by either bigdump.php or my forum index.php

Author:  MarkHoward [ Thu Sep 10, 2015 8:52 pm ]
Post subject:  Re: Uni Server set-up

I have used phpMyAdmin in the UniServer dashboard to create the
database nzmotorh_forum
a User nzmotorh_markh
I have given nzmotorh_markh All privileges on database nzmotorh_forum.

I have imported my data into this database.

I can browse this data using phpMyAdmin :)

The forum's config.php is as posted in a previous post and I have attached some screen shots from within phpMyAdmin that seem to show (to me) that the config.php settings are right.

BUT when I try to run the forum's index.php I still get the following message
Quote:

General Error
SQL ERROR [ mysqli ]

No connection could be made because the target machine actively refused it. [2002]

An sql error occurred while fetching this page. Please contact an administrator if this problem persists.


Attachments:
File comment: Shows that I can browse my phpBB3 database
nzmotorh_forum.PNG
nzmotorh_forum.PNG [ 33 KiB | Viewed 5463 times ]
File comment: Shows the Username same as in config.php
Users.png
Users.png [ 17.08 KiB | Viewed 5463 times ]
File comment: Shows the Database same as in config.php
Databases.PNG
Databases.PNG [ 18.67 KiB | Viewed 5463 times ]

Author:  requinix [ Wed Sep 16, 2015 1:13 am ]
Post subject:  Re: Uni Server set-up

And I'm back.

Did you set up the database on the same machine where PHP is running?

Author:  PeeZo [ Tue Mar 13, 2018 1:15 am ]
Post subject:  Re: Uni Server set-up

updates on this?

Page 2 of 2 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/