Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Weird problem connecting to MySQL

  1. #1
    tupakapoor is offline x10Hosting Member tupakapoor is an unknown quantity at this point
    Join Date
    Jan 2008
    Posts
    25

    Weird problem connecting to MySQL

    Hi,

    I get the following error when trying to connect to mysql:

    Fatal error: Call to undefined function mysqli_query() in /home/kapoora/public_html/dirtybirdreport.com/functions.php on line 10

    I've seen in other posts that this function works for everyone else, so I'm not sure what the problem is. Here's my code (i included the text of a required file):


    Code:
    $host = 'mysql.x10hosting.com';
    $port = 3306;
    $username = XXX;
    $pwd = XXX;
    $db = XXX;
    
    function dbConnect() {
        return mysqli_connect($host, $username, $pwd, $db, $port);
    }
    
    function dbQuery($query, $DBConn) {
    // line 10-->    return mysqli_query($DBConn, $query);
    }
    
    function dbClose($DBConn) {
        mysqli_close($DBConn);
    }
    What am I doing wrong? TIA.

  2. #2
    bugfinder's Avatar
    bugfinder is offline Retired bugfinder is an unknown quantity at this point
    Join Date
    Dec 2007
    Posts
    2,260

    Re: Weird problem connecting to MySQL

    Im puzzled why you have mysqli_ why the i? perhaps this is what your problem stems from.. Im not sure the improved client is installed - you could check this of course with a phpinfo.

  3. #3
    tupakapoor is offline x10Hosting Member tupakapoor is an unknown quantity at this point
    Join Date
    Jan 2008
    Posts
    25

    Re: Weird problem connecting to MySQL

    Quote Originally Posted by bugfinder View Post
    Im puzzled why you have mysqli_ why the i? perhaps this is what your problem stems from.. Im not sure the improved client is installed - you could check this of course with a phpinfo.
    ha - trying to run phpinfo throws a server 500 error. searching the forums for mysqli_query brings up a couple posts where someone was able to successfully use mysqli. oh well, guess i'll try regular old mysql.

  4. #4
    bugfinder's Avatar
    bugfinder is offline Retired bugfinder is an unknown quantity at this point
    Join Date
    Dec 2007
    Posts
    2,260

    Re: Weird problem connecting to MySQL

    Perhaps they have a different lvl of php to you - if you cant do a phpinfo, Im guessing either you have the basic one or you didnt quite type it right.

    I agree try the more compatibile methods of mysql connection

  5. #5
    tupakapoor is offline x10Hosting Member tupakapoor is an unknown quantity at this point
    Join Date
    Jan 2008
    Posts
    25

    Re: Weird problem connecting to MySQL

    sigh...switched back to regular mysql commands and now i get "Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' ". Anyone? Bueller?

  6. #6
    tupakapoor is offline x10Hosting Member tupakapoor is an unknown quantity at this point
    Join Date
    Jan 2008
    Posts
    25

    Re: Weird problem connecting to MySQL

    btw my site is fantasycentral.x10hosting.com

    not dirtybirdreport.x10hosting.com as originally reported :hsughno:
    Last edited by tupakapoor; 01-21-2008 at 12:03 AM.

  7. #7
    Starshine's Avatar
    Starshine is offline Legend Killer Starshine is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    U.S.A.
    Posts
    7,211

    Re: Weird problem connecting to MySQL

    If you are on Absolut :

    http://forums.x10hosting.com/server-...e-absolut.html

    Quote Originally Posted by Corey
    Well, looks like the database hard drive that we JUST GOT died.
    "I apologize, but due to the amount of errors coming from the disk, it is almost definitely impossible to recover data from this drive. Even if one could recover data from this drive, the failure messages above indicate that data retrieved may be corrupted. We would recommend that your best course of action would be to have the disk replaced and then restore from any backups that you have taken.

    Davy S.
    SoftLayer CSA"

    Problem after problem =\

    We do have a backup of all the databases, I just need to figure out how we're going to fix this since they are mixed together with every other server.

  8. #8
    tupakapoor is offline x10Hosting Member tupakapoor is an unknown quantity at this point
    Join Date
    Jan 2008
    Posts
    25

    Re: Weird problem connecting to MySQL

    Quote Originally Posted by StarShine View Post
    If you are on Absolut :
    On cossacks. I'll stick to this thread, sorry.

  9. #9
    Corey's Avatar
    Corey is offline VPS Migration Professional Corey is a glorious beacon of lightCorey is a glorious beacon of light
    Join Date
    Dec 2004
    Location
    Northfield, NH
    Posts
    17,151

    Re: Weird problem connecting to MySQL

    Do you know if you ever upgraded to intermediate PHP?
    Corey Arbogast | CEO
    █ 888-X10-9668 - corey[@]x10hosting.com
    x10Hosting - Giving Away Hosting Since 2004
    Premium Hosting | VPS Services

  10. #10
    tupakapoor is offline x10Hosting Member tupakapoor is an unknown quantity at this point
    Join Date
    Jan 2008
    Posts
    25

    Re: Weird problem connecting to MySQL

    Quote Originally Posted by Corey View Post
    Do you know if you ever upgraded to intermediate PHP?
    It says my upgrade is pending on the account page. Is there something I need to do on my end to complete this?


    Edit:
    just to add to this thread, when I go to Fantastico from cPanel it tells me that "Fantastico is unable to connect to your MySQL server at this time. Please contact your host for assistance."

    Perhaps there's a bigger problem here?
    Last edited by tupakapoor; 01-22-2008 at 06:25 PM. Reason: Automerged Doublepost

Closed Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. MySQL Issues Here
    By Corey in forum Service Alerts
    Replies: 304
    Last Post: 01-06-2008, 09:10 PM
  2. MySQL Problem
    By Point in forum Free Hosting
    Replies: 4
    Last Post: 06-12-2006, 09:42 AM
  3. MySql (I think) problem
    By Nonis in forum Free Hosting
    Replies: 2
    Last Post: 05-30-2006, 05:35 AM
  4. problem mysql
    By svepe in forum Free Hosting
    Replies: 4
    Last Post: 10-09-2005, 02:54 PM

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