SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Apr 2007
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face Debugging.. mysql_pconnect()

    Hello!

    I am a newbie php and need some help debugging a site. This is a site handed over to me to fix and here is the issue:

    All pages are getting this error below:

    Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user: 'wwwbeau@localhost' (Using password: YES) in /home/wwwbeau/public_html/Connections/BFsite.php on line 2

    Fatal error: Access denied for user: 'wwwbeau@localhost' (Using password: YES) in /home/wwwbeau/public_html/Connections/BFsite.php on line


    Line #2 on the referring page is:

    # FileName="Connection_php_mysql.htm"

    Any ideas? I am thinking it is a simple issue to fix but I am not sure where to look for the bug.


  2. #2
    Who turned the lights out !! Mandes's Avatar
    Join Date
    May 2005
    Location
    S.W. France
    Posts
    2,496
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    For a start there are very few instances where you should be using pconnect to make the database conection.

    Secondly your line2 isnt a valid PHP line, can you post the script BFsite.php so we can see the whole script to debug ?
    A Little Knowledge Is A Very Dangerous Thing.......
    That Makes Me A Lethal Weapon !!!!!!!!

    Contract PHP Programming

  3. #3
    SitePoint Member
    Join Date
    Apr 2007
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Here is the whole page causing the error

    Here is the whole page causing the error

    <?php
    # FileName="Connection_php_mysql.htm"
    # Type="MYSQL"
    # HTTP="true"
    $hostname_BFsite = "";
    $database_BFsite = "example";
    $username_BFsite = "example";
    $password_BFsite = "example";
    $BFsite = mysql_pconnect($hostname_BFsite, $username_BFsite, $password_BFsite) or trigger_error(mysql_error(),E_USER_ERROR);
    ?>


    "example" is there for example definitions.

  4. #4
    Sell crazy someplace else markl999's Avatar
    Join Date
    Aug 2003
    Location
    Manchester, UK
    Posts
    4,007
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Access denied for user: 'wwwbeau@localhost' (Using password: YES)
    Sounds like you need to create the user/edit wwwbeau and assign appropriate permissions.

    http://dev.mysql.com/doc/refman/5.0/...ing-users.html


Bookmarks

Posting Permissions

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