We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17705
    • 501 Posts
    Hi!

    Recently I had to install a 1.0.4 modx ina server of a friend, never used it before...
    It was all ok the installation... but now, at the manager it shows a few SQL errors, at top of the documents tree:

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/username/public_html/manager/includes/user_settings.inc.php on line 18

    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/username/public_html/manager/includes/user_settings.inc.php on line 20

    Warning: Cannot modify header information - headers already sent by (output started at /home/username/public_html/manager/includes/user_settings.inc.php:18) in /home/username/public_html/manager/index.php on line 169

    any idea? where to check/change something?


    in the other hand, at configuration... it shows a warning that says:
    One or more configuration details didn’t check out OK:

    Configuration warning: ’GD and/or Zip PHP extensions not found’

    What does this mean?
    MODx needs the GD and Zip extension enabled for PHP. While MODx will work without them, you will not be able to take full advantage of the built-in File Manager, Image Editor or Captcha for logins.

    the phpinfo() shows gd enabled...
    and a few gzip lines like HTTP_ACCEPT_ENCODING gzip,deflate

    any idea? sad

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Those are not SQL errors, they are PHP errors because the results of the SQL query aren’t making the two PHP functions happy. The third error is just because the PHP errors got sent before MODx could send anything, and they are arguing with each other over who gets to report the error first.

      I have no idea why the fetching of the logged-in user’s settings is causing a problem. If this were my site doing this, I would do a bit of debugging on the user_settings.inc.php file (it’s a small, fairly simple file) to see where it’s going bad.

      Your configuration error is because your PHP doesn’t have "zip" enabled; unless you want to unzip archives directly from the MODx Manager’s file manager you’ll never miss it. You can ignore the error, or block it in a couple of different ways http://modxcms.com/forums/index.php?topic=47782.20

        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 17705
        • 501 Posts
        well... now... the first error has gone (magically?)...
        but I have a new one at the main page (where it shows the "Welcome to your MODx Content Manager" message):

        Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/USERNAME/public_html/manager/actions/welcome.static.php on line 87
        (and that page takes ages to load... more than 1 minute)

        what is trying to do/request/show there?


        I have search for these kind of errors in modx, and its like being made by a limited or too busy mysql server...?


        anyway, an odd thing is that all the other regular actions (edit, save, delete, move, uploading pictures, etc) works fine and fast... sad
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          It could be; that query is just getting the data on the resources that were last deleted/created/edited by the current user (you). The error is because the result set of that query doesn’t fit the requirements of the num_rows() function trying to count the query result set, so it’s probably returning some kind of error that’s not getting displayed.

          What are your server stats? Especially PHP version and MySQL version. There may be some bug or conflict involved in one of these; for example Mysql 5.0.51a has known bugs that can cause problems with MODx.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 17705
            • 501 Posts
            here
            PHP Version 5.2.14
            MYSQL Client API version 4.1.22

            is that the mysql version?
            data from phpinfo()
              • 17885
              • 10 Posts
              Dear Susan,

              I have the same problem. My website was running well on the manager section but I don't know why it has an error like mentioned by luuuciano.

              These are the errors:

              Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/minibil3/public_html/new/manager/includes/user_settings.inc.php on line 18

              Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/minibil3/public_html/new/manager/includes/user_settings.inc.php on line 20

              Warning: Cannot modify header information - headers already sent by (output started at /home/minibil3/public_html/new/manager/includes/user_settings.inc.php:18) in /home/minibil3/public_html/new/manager/index.php on line 169

              Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/minibil3/public_html/new/manager/actions/welcome.static.php on line 87

              Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/minibil3/public_html/new/manager/actions/welcome.static.php on line 143


              Could you please help me.

              Best Regards,
              Made