+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Php database help! :)

  1. #1
    memphiz is offline x10Hosting Member memphiz is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    8

    Php database help! :)

    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 by memphiz; 12-03-2009 at 01:32 PM.

  2. #2
    Gouri's Avatar
    Gouri is offline Community Paragon Gouri has a brilliant futureGouri has a brilliant futureGouri has a brilliant future
    Join Date
    Oct 2007
    Location
    India
    Posts
    4,502

    Re: Php database help! :)

    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 by Gouri; 12-03-2009 at 01:37 PM.
    If you feel my post is useful then click to give Reputation (bottom left corner of this post)

    X10 Hosting | News and Announcements | Premium Hosting | VPS Hosting | Prime Membership

    Tech Community | Gouri

  3. #3
    memphiz is offline x10Hosting Member memphiz is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    8

    Re: Php database help! :)

    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

    Error

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

  4. #4
    Gouri's Avatar
    Gouri is offline Community Paragon Gouri has a brilliant futureGouri has a brilliant futureGouri has a brilliant future
    Join Date
    Oct 2007
    Location
    India
    Posts
    4,502

    Re: Php database help! :)

    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 by Gouri; 12-03-2009 at 01:58 PM.
    If you feel my post is useful then click to give Reputation (bottom left corner of this post)

    X10 Hosting | News and Announcements | Premium Hosting | VPS Hosting | Prime Membership

    Tech Community | Gouri

  5. #5
    memphiz is offline x10Hosting Member memphiz is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    8

    Re: Php database help! :)

    yes i did mate.

  6. #6
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Php database help! :)

    Quote Originally Posted by memphiz View Post

    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.

  7. #7
    memphiz is offline x10Hosting Member memphiz is an unknown quantity at this point
    Join Date
    Nov 2009
    Posts
    8

    Re: Php database help! :)

    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 by memphiz; 12-04-2009 at 01:17 AM. Reason: Automerged Doublepost

  8. #8
    Coonz is offline x10 Sophmore Coonz is an unknown quantity at this point
    Join Date
    Aug 2007
    Posts
    132

    Re: Php database help! :)

    sorry, that is outdated.... I'd suggest to look for something else.

  9. #9
    myarunachal is offline x10Hosting Member myarunachal is an unknown quantity at this point
    Join Date
    Dec 2009
    Posts
    8

    Thumbs up Re: Php database help! :)

    just put this in Your Host : mysql-lotus.x10hosting.com


    :happysad:if it works please rate me thanks
    Last edited by myarunachal; 12-03-2009 at 09:48 PM. Reason: mistake

  10. #10
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Php database help! :)

    Quote Originally Posted by memphiz View Post
    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 by misson; 12-03-2009 at 11:34 PM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Export Sql database with php
    By driveflexfuel in forum Programming Help
    Replies: 2
    Last Post: 08-22-2009, 12:00 AM
  2. [PHP] Variables in PHP
    By Bryon in forum Tutorials
    Replies: 15
    Last Post: 01-29-2009, 09:46 AM
  3. php & database help
    By playdnd in forum Scripts & 3rd Party Apps
    Replies: 1
    Last Post: 12-05-2007, 10:55 PM
  4. Sigo con problemas con phpbb2
    By reciecho in forum Soporte
    Replies: 7
    Last Post: 10-20-2007, 06:28 PM
  5. search database with php
    By niahossain in forum Scripts & 3rd Party Apps
    Replies: 4
    Last Post: 10-17-2007, 11:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers