Help - Search - Members - Calendar
Full Version: My Site Wont Log In After Database Setup
Zymic Webmaster Forums > Zymic Free Web Hosting > Databases & MySQL
LETHAL-ENDING
Hi

I am trying to setup a website from a template, it is flash based. I havenīt modified the template yet, im waiting till the database works correctly. I think it is a problem related to the database, although im not getting any specific errors as such.

each time i try to log in it says "incorrect username or password" and if i try to create a new member it says "an error has occurred, please try again"

the website in question is http://all4u.99k.org/

I have searched the forums and found details and also tried various suggestions however the problem is still there, i have also tried using a shorter website name and using a shorter database name, but i have reverted back to the suggested name as it appears in the text file used to import data to the data base (although the prefix is automatic and i cant seem to create a database with only the given name).


the specific instructions i have for setting it up are :

QUOTE
Installing

* First step : Open Connections/databaseConnection.php and change following lines with yours.

$hostname_mySqlConnection = "localhost";
$database_mySqlConnection = "test";
$username_mySqlConnection = "root";
$password_mySqlConnection = "";

usually these values are the same in a testing server (like wamp wich is free!)

Using phpmyadmin (can be found in http://localhost/phpmyadmin/) or a similar tool follow these steps

* Second step : Create a database called ecommercedatabase
* Third step : From phpMyAdmin go to import and browse for database.sql . You have created 3 tables wich will store admins username/passwords , users details and users username/passwords.



so my databaseconnection file looks like this :

QUOTE
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_databaseConnection = "localhost";
$database_databaseConnection = "all4u_99k_ecommercedatabase";
$username_databaseConnection = "*****_*****";
$password_databaseConnection = "******";
$databaseConnection = mysql_pconnect($hostname_databaseConnection, $username_databaseConnection, $password_databaseConnection) or trigger_error(mysql_error(),E_USER_ERROR);
?>


I have successfully imported the data into the database.

If you can see where the problem is i would be grateful, if you need any more info just ask.


Thank you, and have a Merry Christmas and a happy New Year

LETHAL-ENDING
Ed
Replace mysql_pconnect with mysql_connect.
LETHAL-ENDING
QUOTE(Ed @ Dec 25 2009, 02:43 PM) *
Replace mysql_pconnect with mysql_connect.




Thank you VERY much, it is working perfect now, wow, just one letter difference hehe, is that unique to here or is it required to do that all the time, what decides whether it needs the p or not?

while writing this i googled and got a sort of definition for the two:

QUOTE
mysql_pconnect establishes a persistent connection. If you don't need one (such as a website that is mostly HTML files or PHP files that don't call the db) then you don't need to use it.

mysql_connect establishes a connection for the duration of the script that access the db. Once the script has finished executing it closes the connection. The only time you need to close the connection manually is if you jump out of the script for any reason.

If you do use mysql_pconnect. You only need to call it once for the session. That's the beauty of it. It will hold open a connection to the db that you can use over and over again simply by calling the resource ID whenever you need to interact with the db.



so i guess normally depending on what kind of website you want would depend on what you would use, does here only accommodates for the one without the p?.

ok thats all good, thanks again

LETHAL-ENDING
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.