close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Admin Login*denotes required field ERROR: Failed to save the settings in the database. Please verify your database connection.

Thread begun 2/18/2021 10:09 am by Daniel | Last modified 3/12/2025 2:05 am by Reading Garage | 2763 views | 7 replies |

Daniel

Admin Login*denotes required field ERROR: Failed to save the settings in the database. Please verify your database connection.

Can you please assist me with getting past:
PowerCMS Installation Wizard
STEP 4 OF 5

I have tried installing the database db.sql both ways.

It also gives me this error:
Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in C:\wamp64\www\test\install_cms\global.php on line 13
13 mysqli_select_db($database_PowerCMSConnection);

Sign in to reply to this post

Ray BorduinWebAssist

If you give me FTP access then I can take a look and debug this issue.

Sign in to reply to this post
Did this help? Tips are appreciated...

Daniel

What files do you need I'm working on localhost?

Sign in to reply to this post

Ray BorduinWebAssist

I wouldn't be able to debug with the file... The issue is likely with your local web server and the database connection or tables. Can you put them in a live environment so I can debug them? If not, we would need to do screen sharing.

Sign in to reply to this post
Did this help? Tips are appreciated...

Daniel

Okay let’s just leave it. When I come across it again I will let you know.
Thank you for your help.

Sign in to reply to this post

vered435903

To anyone trying to add PowerCMS to their site in the 2020s or later.... Here's a helpful tip.

I have spent a lot of time trying to get past the step 4 of 5 (setting the admin login) and finally found the solution. It kept telling me that it couldn't save my information and to check my database connection. I have been trying all the solutions in these help forums, and here is what worked. Most of the forum answers are from long ago, before there was the MYSQLI option. Apparently PowerCMS was never updated for that connection so you need to use the classic MySql connection.

Here's the thread with the solution: https://www.webassist.com/forums/posts.php?id=41218

Here's Ray's comment from 2018 from that thread:
We debugged this in a screen sharing session. The issue was that a MySQLi connection was specified and PowerCMS has not been updated for MySQLi yet. We updated the connection to standard MySQL and the installer was able to complete.

Good luck!

Sign in to reply to this post

anonymous

The error occurs because mysqli_select_db() requires two parameters: the database connection object and the database name. It seems your code is missing the connection object. Here’s how to fix it:

Correct Code
In global.php, modify line 13 to include the database connection object:

php
Copy code
mysqli_select_db($PowerCMSConnection, $database_PowerCMSConnection);
Explanation
$PowerCMSConnection should be your database connection object created using mysqli_connect().
$database_PowerCMSConnection should be the name of your database.
Additional Steps
Verify Connection: Ensure $PowerCMSConnection is properly initialized using:

php
Copy code
$PowerCMSConnection = mysqli_connect('hostname', 'username', 'password', 'database_name');
if (!$PowerCMSConnection) {
die('Connection failed: ' . mysqli_connect_error());
}
Check Configuration: Confirm that global.php has the correct database credentials and connection logic.

Database Import: If importing db.sql manually, ensure there are no errors during the import. Check for missing tables or permissions.

Debugging: If the error persists, add this line to debug:

php
Copy code
echo "Database connection: " . ($PowerCMSConnection ? "Success" : "Failed");
This should resolve the issue and allow you to proceed with the installation!

Sign in to reply to this post

Reading Garage

i face same issue

This post has been deleted.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...