Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2009
    Posts
    32

    Mysql fetch error

    We have mysql fetch error in many of our hosted sites.

    Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/user/www/xxxx

    Where is issue and how can resolve this issue?

  2. #2
    Join Date
    Feb 2004
    Location
    UK
    Posts
    1,429
    Hi

    Have you recently upgraded from mysql 4 to 5 or php 4 to 5 ?

    Thanks

  3. #3
    Join Date
    Aug 2009
    Posts
    32
    No, i just transfered all account from old whm server to new whm server.

  4. #4
    Join Date
    Mar 2009
    Location
    Gods Own Country
    Posts
    681
    turn off display_error in php.ini.. it will be ok

  5. #5
    Join Date
    Aug 2009
    Posts
    32
    Quote Originally Posted by fabin View Post
    turn off display_error in php.ini.. it will be ok
    Its not resolved with turn off display_error

  6. #6
    Join Date
    May 2009
    Location
    SLASH ROOT
    Posts
    853

  7. #7
    Join Date
    Apr 2005
    Location
    Cochin
    Posts
    2,446
    Quote Originally Posted by aryafar View Post
    We have mysql fetch error in many of our hosted sites.

    Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/user/www/xxxx

    Where is issue and how can resolve this issue?
    This is definitely a version compatibility issue.

    Check the versions of mysql on both your servers and change the version to the corresponding one in the current server
    Sam
    Supportlobby.com - Expertise in Windows/Linux server support, IaaS and PaaS Management
    Spiralbean.com - Custom Software Development
    Email: exec @ activelobby.net | Skype: unni_active

  8. #8
    Join Date
    Aug 2009
    Posts
    32
    Do you have any idea? For example some setting in my.cnf file.

  9. #9
    Join Date
    Dec 2006
    Location
    London
    Posts
    660
    Quote Originally Posted by aryafar View Post
    We have mysql fetch error in many of our hosted sites.

    Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/user/www/xxxx

    Where is issue and how can resolve this issue?
    That's not really enough information to go on, I'm afraid.

    As per the PHP documentation, mysql_fetch_row needs to be provided with a $resource. This usually comes from mysql_query and contains the results from this query. It is very likely that this query failed for some reason, e.g. the database was not connected.

    I advise you perform error checking on the commands leading up to this, e.g.

    $resource = mysql_connect(...) or mysql_query(...)

    if (!$resource)
    {
    die(mysql_error());
    }


    Hope this helps.
    Last edited by gigatux; 08-18-2009 at 09:07 AM. Reason: Corrected code
    GigaTux, Value Linux Hosting
    UK, US and Germany based Xen VPS. Reliability is key! Quick support response and 99.9% SLA.

  10. #10
    Join Date
    Aug 2009
    Posts
    32
    Quote Originally Posted by activelobby4u View Post
    This is definitely a version compatibility issue.

    Check the versions of mysql on both your servers and change the version to the corresponding one in the current server
    Both server mysql version is same.

Similar Threads

  1. Error: Unable to fetch customers' balances: Unable to connect to Plesk-Billing.
    By kpmedia in forum Hosting Software and Control Panels
    Replies: 0
    Last Post: 05-01-2009, 06:22 AM
  2. Fetch admin password from MySQL database
    By Abee in forum Hosting Security and Technology
    Replies: 7
    Last Post: 03-31-2009, 03:14 AM
  3. PHP, Mysql Fetch Error Help
    By pcnet21 in forum Programming Discussion
    Replies: 5
    Last Post: 08-18-2006, 01:31 PM
  4. Fetch info off a website and put it into a database - PHP/MYSQL
    By mrsam in forum Employment / Job Offers
    Replies: 4
    Last Post: 10-31-2004, 04:52 PM
  5. MySQL Fetch Array Prob
    By Falco1199 in forum Programming Discussion
    Replies: 7
    Last Post: 10-20-2002, 04:11 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
  •