SQL Errors after upgrade.

I’ve upgraded two installs of Sugar to SuiteCRM. One, went clean, quick, and perfectly. It had no additional modules installed in the Sugar. The second is giving me two different errors. The first, is an error “Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /home4/dbd/public_html/mppcrm/include/database/MysqliManager.php on line 182”

That error shows up in contacts, accounts, leads. My research indicates that it is due to mysql results being returned when mysqli results are expected. Any idea which file to look for the conflict in?

The second error is:
“Parse error: syntax error, unexpected T_FUNCTION in /home4/dbdeshaw/public_html/mppcrm/modules/AOP_Case_Updates/Case_Updates.php on line 75”

That error shows up in Cases. Suggestions?
Thanks,
D

Hi doggiedaddy1,

The T_FUNCTION error is related to your version of PHP. The first error is infact a warning, not an error. What is the difference between the two installs?

The query is returning false which means it is failing somewhere. There are many topics on this on Stack Overflow, so you may find an answer there (such as this topic).

Thanks,

Will.

My PHP is V5.2.17; What should it be?
As to the mysqli warning, can it be turned off in config? Or is it serious enough I should look for a solution?

Hi doggiedaddy1,

This is an issue experienced by PHP versions before 5.3.

Thanks,

Will.

Ok, so I upgraded to php v5.3. That blew up all most of my php sites as date.timezone is now required in php.ini. Since I have several, had to change all of them to fix it, but only took a few minutes. That error is now gone.

As to the mysqli warning,
MysqliManager.php line 182,

Here are the remarks above that code for the function on 182:

/**
* Returns the number of rows returned by the result
*
* This function can’t be reliably implemented on most DB, do not use it.
* @abstract
* @deprecated
* @param resource $result
* @return int
*/
public function getRowCount($result)
{
return mysqli_num_rows($result);

That bottom line (above) is line 182. Is this telling me to just remark out both of those lines?

Hi there,

What is your setup apart from PHP 5.3? A warning is not the same as an error so this should not stop your CRM functioning normally.

Thanks,

Will.

Centos 6.4
MySql 5.5.33
PHP 5.3

What else do you want to know? Everything appears to be functioning normally, I’m just making sure that I have all the bases covered. Also, if I remember can’t the warnings be turned off in config.ini? That way if all is good, no one will have to see them.

BTW Will, I really appreciate your expertise, assistance, and timely responses. The worst thing about forums for OS projects is when no one ever replies.

Hi there,

Yes, you can turn off error reporting by adding the following line to your php.ini file:



display_errors = off

Thank you for your comments. The community is very important for open source projects to thrive and grow.

Regards,

Will.

1 Like

Thanks Will, that resolved it. You rock!