Results 1 to 9 of 9

Thread: [RESOLVED] Trying to get my website working...

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2005
    Location
    Long Island, NY.
    Posts
    353

    Resolved [RESOLVED] Trying to get my website working...

    I'm using PHP to connect to MySQL database. When I go to www.alamotrades.com/post.html and try to post something it just spits back this below. I am not good with PHP or MySQL but use to have it running for an old site and trying to get it running again. I'm putting the right info in the PHP script so I don't get it...
    If anyone wants to help I can let you get into my server to take a look. Thanks!

    $hostname=mysqlhost
    $username=
    $password=
    $dbid=
    $link=mysql_connect($hostname, $username, $password);
    mysql_select_db($dbid)

    Warning: mysql_connect(): Access denied for user 'u70262984'@'anyhost' (using password: YES) in /mnt/w0200/d41/s14/b0284c62/www/submitit.php on line 3

    Warning: mysql_select_db(): Access denied for user 'root'@'anyhost' (using password: NO) in /mnt/w0200/d41/s14/b0284c62/www/submitit.php on line 4

    Warning: mysql_select_db(): A link to the server could not be established in /mnt/w0200/d41/s14/b0284c62/www/submitit.php on line 4

    Warning: imagejpeg(): Unable to open '/export/home/vonoventwin/public_html/images/content/7172006ups.jpg' for writing in /mnt/w0200/d41/s14/b0284c62/www/php-lib/imageupload.php on line 64

    Warning: mysql_query(): Access denied for user 'root'@'anyhost' (using password: NO) in /mnt/w0200/d41/s14/b0284c62/www/submitit.php on line 44

    Warning: mysql_query(): A link to the server could not be established in /mnt/w0200/d41/s14/b0284c62/www/submitit.php on line 44

    Warning: mysql_insert_id(): A link to the server could not be established in /mnt/w0200/d41/s14/b0284c62/www/submitit.php on line 50

    Warning: Cannot modify header information - headers already sent by (output started at /mnt/w0200/d41/s14/b0284c62/www/submitit.php:3) in /mnt/w0200/d41/s14/b0284c62/www/submitit.php on line 85

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Trying to get my website working...

    The host name is usually 'localhost' unless MySQL is on a different server to PHP.

    Is this your own server?

  3. #3
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: Trying to get my website working...

    Looks like you need to configure the permissions on both your MySQL database and your server.

    Do you have access to change the permissions yourself?

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2005
    Location
    Long Island, NY.
    Posts
    353

    Re: Trying to get my website working...

    Quote Originally Posted by john tindell
    Looks like you need to configure the permissions on both your MySQL database and your server.

    Do you have access to change the permissions yourself?
    I use NetFirms. So my MySQL database is through them and they told me the host name was mysqlhost. I can get into phpmyadmin to change anything about my MySQL database and then I do have complete permissions for the website also.

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Trying to get my website working...

    Are you sure that is $hostname='mysqlhost' not $hostname=mysqlhost.

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2005
    Location
    Long Island, NY.
    Posts
    353

    Re: Trying to get my website working...

    This is what I have:

    <?php
    // establish db connection
    $sql_link = mysql_connect("mysqlhost", "username", "password");
    mysql_select_db("d60244618");

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2005
    Location
    Long Island, NY.
    Posts
    353

    Re: Trying to get my website working...

    Also what is this crap before everything? /mnt/w0200/d41/s14/b0284c62/www/

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2005
    Location
    Long Island, NY.
    Posts
    353

    Re: Trying to get my website working...

    Does anyone want to log into my website www.alamotrades.com and take a look around. I will give you all the information to help me. All the PHP is written I just can't get it to connect to MySQL database. PM if you would like to help me!

  9. #9
    New Member
    Join Date
    Jun 2006
    Posts
    1

    Re: [RESOLVED] Trying to get my website working...

    I have the answer for you if you still need it... I also use Netfirms and just figured it out.

    You have to log into your Netfirms account, then get into the settings for your database user account (you should check to see if it's an 'admin' account, although I don't know if that's mandatory). From there select the option to 'Allow external connections'. You will then be shown the correct hostname and port to connect remotely. The correct hostname should be 'mysql.netfirms.com'. It tried that and it worked for me.

    Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width