Php database help! :)

memphiz

New Member
Messages
8
Reaction score
0
Points
0
Hello this is my first post and i need to ask for some help.

i have webspace with x10hosting, i got it for a fifa10 league website i am designing. now im exellent with html but i real feel for this to work properly it needs a php database so the league table and fixtures and news etc can be updated by me and other users.

anyway to the point i have downloaded a php script called PHPfootball which is a script for football leagues which sound like just what i need.

it says in the readme to upload to your site and run the install.php and fill in the details which i did. then it says to load your site log in with the password i made in the install.php
i have done all this but it just comes up with an error when i try to load.
is there anywhere special i shud be uploading the php documents too ? atm i just uploading to the public_html folder.

when i open the install.php it asks for the followin:
Databse name
database hostname
database user
database password
i have set up a database in control panel called fifaplay my user name is that : memphiz@starka.x10hosting.com?


i am a complete beginner at php and any help would be much appretiated.
 
Last edited:

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
If you created database in cpanel using "mysql databases" There is another option in the same window that create user for the database and link them by giving the full privillages.

Once you done

The database name will be yourcpanelusername_databasename in your case memphiz_fifaplay
username will be yourcpanelusername_username created and linked to DB memphiz_<username>
password what ever you given.

host name is localhost
 
Last edited:

memphiz

New Member
Messages
8
Reaction score
0
Points
0
thank you for the reply. i put all that information

memphiz_fifaplay
localhost

memphiz_memphiz
my password

but when i try to load the index.php this is the error it says:

Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'your database server hostname' (3) in /home/memphiz/public_html/includes/inc.db.php on line 5
phpfootball_logo_small.gif

Error

Could not conect to MySQL, Make sure it is started and you used the install script
 

Gouri

Community Paragon
Community Support
Messages
4,565
Reaction score
245
Points
63
Did you created the memphiz user in the database section and associated with fifaplay database by giving all the privileges

As you are giving the memphiz_ memphiz

first part is your cpanelusername and second name is the database user name
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
but when i try to load the index.php this is the error it says:

Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'your database server hostname' (3) in /home/memphiz/public_html/includes/inc.db.php on line 5

Error

Go to cPanel->File Manager and open /includes/inc.db.php to edit. (or however you edit files)
See if you can find a string that says 'your database server hostname'
Replace that with 'localhost'.
Save file.
See if your site works.
 

memphiz

New Member
Messages
8
Reaction score
0
Points
0
:( no i open up that file and it seems to be the code for that error message:

<?php
$image_l = "<img align=center src=images/phpfootball_logo_small.gif>";
$install_l = "[<a href=install.php>Installation Script<a/>]";
require("includes/inc.config.php");
$link = mysql_connect($dbhost,$dbuser,$dbpass) or die ("$image_l<h3>Error</h3>Could not conect to MySQL, Make sure it is started and you used the install script<br>$install_l\n");
mysql_select_db("$dbname",$link) or die ("$image_l<h3>Error</h3>Could not select database, Make sure you ran the install script<br>$install_l\n");
?>
Edit:
i found a inc.config.php file and edit in there the username server etc because that it all the info it wants. now i get this message:

died while authenticating user
Debug info: SELECT Userlevel FROM Accounts WHERE Username = 'PHPSESSID' AND Password = ###

this is the link for the thing im trying to set up maybe if someone looks at the files they might realise whats wrong.

http://sourceforge.net/projects/phpfootball/files/

sorry to be a pain in the ass its probably something really simple :D
 
Last edited:

Coonz

New Member
Messages
132
Reaction score
1
Points
0
sorry, that is outdated.... I'd suggest to look for something else.
 

myarunachal

New Member
Messages
8
Reaction score
0
Points
0
just put this in Your Host : mysql-lotus.x10hosting.com


:happysad:if it works please rate me thanks
 
Last edited:

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
died while authenticating user
Debug info: SELECT Userlevel FROM Accounts WHERE Username = 'PHPSESSID' AND Password = '...'
Never post a password, even if it's been hashed. Edit your post right now and replace the hash with some other string (e.g. ellipses or asterisks) as I have done.

Anyway, that error looks like a failure within the app's own authentication system, as opposed to a problem authenticating the DB user (memphiz_memphiz) with MySQL. Are you prompted for fantasy football account credentials? The user name also looks suspicious.
 
Last edited:
Top