We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34162
    • 1 Posts
    I got an error installing
    lost the copy from the installer to past here so I dit an update and got the same error
    Chunks:
    
    
      WebLoginSideBar: Upgraded
    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/httpd/vhosts/devrijeenergieproducent.com/httpdocs/manager/processors/cache_sync.class.processor.php on line 146
    
    Installation was successful!
    
    


    looks like I am missing a database par
    wat would I need to add to the database to het it working?
      • 7455
      • 2,204 Posts
      sorry this was me did not see that i was not logged in sorry
        follow me on twitter: @dimmy01
        • 7455
        • 2,204 Posts
        tryed a clean install
        and again:

        Chunks:
        
          WebLoginSideBar: Installed
        
        
        Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/httpd/vhosts/devrijeenergieproducent.com/httpdocs/manager/processors/cache_sync.class.processor.php on line 146
        
        Installation was successful!
        
        
          follow me on twitter: @dimmy01
        • Go to the line that has the mysql_query just before the line causing the error, and add this to the query itself:
          $blah = mysql_query($blah) or die(mysql_error());

          then try it again and see what exactly is the problem with that query so it's not returning any results.
            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
            • 7455
            • 2,204 Posts
            Id did that, now it says
            Query was empty
            
              follow me on twitter: @dimmy01
              • 7455
              • 2,204 Posts
              		// WRITE system event triggers
              		$sql = "
              			SELECT sysevt.name as 'evtname', pe.pluginid, plugs.name 
              			FROM $dbase.".$table_prefix."system_eventnames sysevt 
              			INNER JOIN $dbase.".$table_prefix."site_plugin_events pe ON pe.evtid = sysevt.id 
              			INNER JOIN $dbase.".$table_prefix."site_plugins plugs ON plugs.id = pe.pluginid 
              			WHERE plugs.disabled=0 
              			ORDER BY sysevt.name;
              		";
              		$events = array();
              		$rs = mysql_query($sql);
              		$limit_tmp = mysql_num_rows($rs);         // line146
              		for ($i=0; $i<$limit_tmp; $i++) { 
              			$evt = mysql_fetch_assoc($rs); 
              			if(!$events[$evt['evtname']]) $events[$evt['evtname']] = array();
              			$events[$evt['evtname']][] = $evt['name'];
              		}
              		foreach($events as $evtname => $pluginnames) {
              			$tmpPHP .= '$this->pluginEvent[\''.$evtname.'\'] = array(\''.implode("','",$pluginnames)."');\n";
              		}
              		
              


              so do I add
              or die(mysql_error()); to line 145?

              ore do I add a new line
              $blah = mysql_query($blah) or die(mysql_error());

              before line 144?

              the result I get from the first option is:
              You have an error in your SQL syntax near '; ' at line 7

              and the result from the last option is:
              Query was empty 


              hope this helps
                follow me on twitter: @dimmy01
                • 24853
                • 29 Posts
                edit manager/processors/cache_sync.class.processor.php and remove the ; in line 142
                • Sorry, I didn't explain it very well. Line 145 was the correct place to append the "or die" clause.
                  $rs=mysql_query($sql) or die (mysql_error());


                  Odd, I have the same code and it doesn't cause a problem. Different version of PHP or MySQL?
                    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
                    • 7455
                    • 2,204 Posts
                    Sorry, I didn't explain it very well. Line 145 was the correct place to append the "or die" clause.
                    $rs=mysql_query($sql) or die (mysql_error());


                    Odd, I have the same code and it doesn't cause a problem. Different version of PHP or MySQL?

                    Problem solved

                    there was already a treat that I missed

                    http://vertexworks.com/forums/viewtopic.php?t=157
                      follow me on twitter: @dimmy01