close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Database Connection problems

Thread began 8/14/2009 11:20 am by bernardkane381926 | Last modified 9/02/2009 2:42 am by bernardkane381926 | 3157 views | 5 replies |

bernardkane381926

Database Connection problems

Sorry but I thought I had go this cracked but clearly not. When I try to access the user registration page I get the message - No database selected. My localhost.php code is

<?php
# FileName="localhost.php"
# Type="MYSQL"
# HTTP="true"
$hostname_localhost = "localhost";
$database_localhost = "bksol_adminbks";
$username_localhost = "bksol_beeky";
$password_localhost = "rara09winks63";
$localhost = mysql_pconnect($hostname_localhost, $username_localhost, $password_localhost) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db("bksol_adminbks");
?>

Where I have added a new user name "bksol_beeky" and a password "rara09winks63". I am really frustrated over tis can you help please before I decide to go and join a bowls club!!

Sign in to reply to this post

Jason ByrnesWebAssist

the error suggests that there is no database named "bksol_adminbks" on the MySQL server.

Sign in to reply to this post

bernardkane381926

Database Connection Problem

Sorry but there is a database called bksol_adminbks and user is bksol_beeky. I am looking at both these in the cpanel url index.html see attached jpegs. I have also included a dump of the phpmyadmin page which clearly shows the database and your users table.

Also now when I try to access the users_registration.php form through a link on my index page I get this message:


Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /data03/bksol/public_html/WA_Globals/WA_Globals.php:78) in /data03/bksol/public_html/WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php on line 3

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /data03/bksol/public_html/WA_Globals/WA_Globals.php:78) in /data03/bksol/public_html/WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php on line 3
No database selected

Is there anything else I can do to check or get going with the connection because I am absolutely stumped if not. Alternatively if I can send anything else that may help an answer to the problem let me know.

Beeky

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a tech support ticket for you so we can look into this issue.

Pleas update your ticket by logging into your support history:
supporthistory.php

Sign in to reply to this post

michaelf0199272

I think I know the solution to this issue.

I think that your issue is with the phpMyAdmin that you are using. It is encounting a statement that it could not translate. So this cause it to give error #1044, where access is denied or did not recognize\see the database.


1) remove -- CREATE DATABASE IF NOT EXISTS <name of data base that you tried to import>; from the database.

Then save the revised copy.


2) You also need to edited Connection\localhost.php to reflect the actual database.

This is what you have -- it looks correct to me.

<?php
# FileName="localhost.php"
# Type="MYSQL"
# HTTP="true"
$hostname_localhost = "localhost";
$database_localhost = "bksol_adminbks";
$username_localhost = "bksol_beeky";
$password_localhost = "rara09winks63";
$localhost = mysql_pconnect($hostname_localhost, $username_localhost, $password_localhost) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_select_db("bksol_adminbks");
?>

All that you need is to do step 1 of my suggestion and you should be fine.

I hope that this helps.

Sign in to reply to this post

bernardkane381926

Database Connection problems

Fine now thanks.

Sign in to reply to this post

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...