PHP Warnings in Admin Panel

When I go to
Administration -> Admin -> Developer Tools (section) -> Display modules and Subpanels

I have a number of warning/errors at the top of the page:

Deprecated: Non-static method SubPanelDefinitions::get_all_subpanels() should not be called statically in /home/mgmt2goc/public_html/crm/modules/Administration/views/view.configuretabs.php on line 115

Deprecated: Non-static method TabController::get_key_array() should not be called statically in /home/mgmt2goc/public_html/crm/include/SubPanel/SubPanelDefinitions.php on line 776

Deprecated: Non-static method SubPanelDefinitions::get_hidden_subpanels() should not be called statically in /home/mgmt2goc/public_html/crm/modules/Administration/views/view.configuretabs.php on line 116

Has anyone else seen these and if so, what do I do to fix the issues?

Please add these 2 lines in index.php after <?php tag

ini_set(“display_errors”,1);
error_reporting(E_ALL);

THIS should remove those things, best of luck!

If I understand it correctly, that is not solving the problem but hiding it from view.

If I am interpreting it correctly, and the PHP notices are just warnings (for now; deprecated items will bite us later if not eventually solved) I am OK with this as a temporary solution, but if the error (bug?) is not dealt with, eventually this could cause a real issue.

Thoughts?

Moot point re my previous post.

I did as you suggested and it did not change anything, even after a Repair and Rebuild.

Any other ideas?

Please share your index.php content.

Please disable the error reporting by adding these two lines at the beginning of your suitecrm index.php file,

ini_set(‘display_errors’,0);
error_reporting(0);

Above lines will hide these notice/warnings/error from UI.

@Note, for these Notices/errors/warnings

PHP provides various levels of feedback to developers in the form of notices, warnings and on occasion errors. Some of these can be ignored and are only used to inform programmers of best practices (and violations there of) and others.

So better to hide these warnings by turning off error reporting.

Also changes done in index.php does not need to be repair & rebuild .
It will reflect in suitecrm even without repair & rebuild.

As it turns out, I am on siteground (which is a GREAT shared hosting provider and no, I am not in any way affiliated with them; I am just very impressed after having dealt with several other shared hosting providers) and they use the zend engine.

So for that configuration, I used your idea to just stop publishing php warnings and notices by adding into my php.ini file

zend_extension=/usr/local/php71/lib/php/extensions/ioncube.so
zend_extension=/usr/local/php71/lib/php/extensions/ZendOptimizer.so

That was apparently the zend equivalent of

error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING

in a normal php.ini file.

The net is, no more php notices on that page.

So I don’t have the problem now but I am worried about longer-term issues due to a deprecated function being used. I hope the dev team has this on their radar to change before the deprecated status turns into fatal.

Thank for the prod in the right direction.

Ideally there are three ways to turn off the error reporting,

  1. Either through php.ini configuration file (this will be at the server level)
    2.Adding error reporting disable lines in suitecrm index.php file (this will be at the suitecrm application level)
  2. through suitecrm .htaccess file (this will be at the suitecrm application level)

You can use any one of these 3 approaches.

Thanks.