Reduce PHP Strict Standards Declaration ?

Too much error in log file

How can I reduce it ?

SugarCRM Enterprise, Version 7.5.2.0

apache2: PHP Strict Standards:  Declaration of UndeployedRelationships::findRelatableModules() should be compatible with AbstractRelationships::findRelatableModules($includeActivitiesSubmodules = true) in /var/www/sugarcrm_v2/htdocs/modules/ModuleBuilder/parsers/relationships/UndeployedRelationships.php line 20

apache2: PHP Strict Standards:  Declaration of UndeployedRelationships::build() should be compatible with AbstractRelationships::build($basepath, $installDefPrefix, $relationships) in /var/www/sugarcrm_v2/htdocs/modules/ModuleBuilder/parsers/relationships/UndeployedRelationships.php line 20

apache2: PHP Strict Standards:  Declaration of DeployedRelationships::findRelatableModules() should be compatible with AbstractRelationships::findRelatableModules($includeActivitiesSubmodules = true) in /var/www/sugarcrm_v2/htdocs/modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php on line 21

apache2: PHP Strict Standards:  apache2: PHP Strict Standards:  Declaration of DeployedRelationships::build() should be compatible with AbstractRelationships::build($basepath, $installDefPrefix, $relationships) in /var/www/sugarcrm_v2/htdocs/modules/ModuleBuilder/parsers/relationships/DeployedRelationships.php on line 21

apache2: PHP Strict Standards:  Declaration of User::retrieve() should be compatible with Person::retrieve($id = -1, $encode = true, $deleted = true) in /var/www/sugarcrm_v2/htdocs/modules/Users/User.php on line 18

apache2: PHP Strict Standards:  Declaration of User::create_new_list_query() should be compatible with SugarBean::create_new_list_query($order_by, $where, $filter = Array, $params = Array, $show_deleted = 0, $join_type = '', $return_array = false, $parentbean = NULL, $singleSelect = false, $ifListForExport = false) in /var/www/sugarcrm_v2/htdocs/modules/Users/User.php on line 18

apache2: PHP Strict Standards:  Declaration of User::list_view_parse_additional_sections() should be compatible with SugarBean::list_view_parse_additional_sections(&$list_form) in /var/www/sugarcrm_v2/htdocs/modules/Users/User.php on line 18

apache2: PHP Strict Standards:  Declaration of InboundEmail::retrieve() should be compatible with SugarBean::retrieve($id = '-1', $encode = true, $deleted = true) in /var/www/sugarcrm_v2/htdocs/modules/OutboundEmailConfiguration/OutboundEmailConfigurationPeer.php on line 17

apache2: PHP Strict Standards:  Declaration of Currency::retrieve() should be compatible with SugarBean::retrieve($id = '-1', $encode = true, $deleted = true) in /var/www/sugarcrm_v2/htdocs/include/entryPoint.php on line 153

apache2: PHP Strict Standards:  Declaration of Currency::list_view_parse_additional_sections() should be compatible with SugarBean::list_view_parse_additional_sections(&$list_form) in /var/www/sugarcrm_v2/htdocs/include/entryPoint.php on line 153

apache2: PHP Strict Standards:  Non-static method UploadStream::register() should not be called statically in /var/www/sugarcrm_v2/htdocs/include/entryPoint.php on line 158

apache2: PHP Strict Standards:  Declaration of MysqlManager::checkQuery() should be compatible with DBManager::checkQuery($sql, $object_name = false) in /var/www/sugarcrm_v2/htdocs/include/database/MysqliManager.php on line 67

apache2: PHP Strict Standards:  Declaration of ACLVisibility::addSseVisibilityFilter() should be compatible with SugarVisibility::addSseVisibilityFilter(SugarSearchEngineInterface $engine, $filter) in /var/www/sugarcrm_v2/htdocs/include/utils/autoloader.php on line 333

apache2: PHP Strict Standards:  Declaration of SugarEmailAddress::save() should be compatible with SugarBean::save($check_notify = false) in /var/www/sugarcrm_v2/htdocs/include/utils/autoloader.php on line 333

apache2: PHP Strict Standards:  Declaration of RestService::generateETagHeader() should be compatible with ServiceBase::generateETagHeader() in /var/www/sugarcrm_v2/htdocs/include/api/RestService.php on line 22

apache2: PHP Strict Standards:  Non-static method SugarConfig::get() should not be called statically, assuming $this from incompatible context in /var/www/sugarcrm_v2/htdocs/include/api/RestRequest.php on line 332

PHP Strict Standards:  Declaration of LDAPAuthenticateUser::authenticateUser() should be compatible with SugarAuthenticateUser::authenticateUser($name, $password, $fallback = false) in /var/www/sugarcrm_v2/htdocs/modules/Users/authentication/LDAPAuthenticate/LDAPAuthenticateUser.php on line 24

PHP Strict Standards:  Declaration of LDAPAuthenticateUser::loadUserOnLogin() should be compatible with SugarAuthenticateUser::loadUserOnLogin($name, $password, $fallback = false, $PARAMS = Array) in /var/www/sugarcrm_v2/htdocs/modules/Users/authentication/LDAPAuthenticate/LDAPAuthenticateUser.php on line 24

apache2: PHP Strict Standards:  Declaration of Team::mark_deleted() should be compatible with SugarBean::mark_deleted($id) in /var/www/sugarcrm_v2/htdocs/include/utils/autoloader.php on line 369

apache2: PHP Strict Standards:  Declaration of Team::list_view_parse_additional_sections() should be compatible with SugarBean::list_view_parse_additional_sections(&$list_form) in /var/www/sugarcrm_v2/htdocs/include/utils/autoloader.php on line 369

apache2: PHP Strict Standards:  Declaration of TeamMembership::list_view_parse_additional_sections() should be compatible with SugarBean::list_view_parse_additional_sections(&$list_form) in /var/www/sugarcrm_v2/htdocs/modules/Teams/Team.php on line 14

apache2: PHP Strict Standards:  Declaration of ACLAction::save() should be compatible with SugarBean::save($check_notify = false) in /var/www/sugarcrm_v2/htdocs/include/utils/autoloader.php on line 369

apache2: PHP Strict Standards:  Declaration of ACLAction::toArray() should be compatible with SugarBean::toArray($dbOnly = false, $stringOnly = false, $upperKeys = false) in /var/www/sugarcrm_v2/htdocs/include/utils/autoloader.php on line 369

apache2: PHP Strict Standards:  Declaration of ACLField::hasAccess() should be compatible with ACLAction::hasAccess($is_owner = false, $access = 0) in /var/www/sugarcrm_v2/htdocs/modules/ACLFields/ACLField.php on line 20

apache2: PHP Strict Standards:  Declaration of M2MRelationship::addRow() should be compatible with SugarRelationship::addRow($row) in /var/www/sugarcrm_v2/htdocs/data/Relationships/M2MRelationship.php on line 19

apache2: PHP Strict Standards:  Declaration of Call::save_relationship_changes() should be compatible with SugarBean::save_relationship_changes($is_update, $exclude = Array) in /var/www/sugarcrm_v2/htdocs/include/utils/autoloader.php on line 369

apache2: PHP Strict Standards:  Non-static method UploadStream::register() should not be called statically in /var/www/sugarcrm_v2/htdocs/include/entryPoint.php on line 158

.....

Thanks,

M

  • Hi Autchara,

    This might be a cause of error reporting.

    Can you check error_reporting in your php.ini file.error_reporting should be like below.

    error_reporting = E_ALL & ~E_STRICT & ~E_DEPRECATED
    

    If it is not matching,can you try adding above in your php.ini.Once made changes in that file.Don’t forget to restart your web server.

    Here what we are actually doing is ,we are ignoring strict errors and deprecated errors.This is by sugar recommendation.

    Here is the sugar documentation about it.

    http://support.sugarcrm.com/Knowledge_Base/Administration/Troubleshooting/About_PHP_Notices_Warnings_and_Errors/index.ht…

    And find Alan answer too!.

    Sugarcrm Installation Errors

    Hope this helps!.

  • Thank you for your reply.

    I find details more.

    E_ALL & ~E_STRICT & ~E_DEPRECATED   (all error except )

    ; E_ALL                  - All errors and warnings (includes E_STRICT as of PHP 5.4.0)

    ; E_STRICT           - run-time notices, enable to have PHP suggest changes

    ;                               to your code which will ensure the best interoperability

    ;                               and forward compatibility of your code

    ; E_DEPRECATED      - warn about code that will not work in future versions of PHP

    Error occur in sugar file system .

    Can I disregard it ?

    Thanks,

    M

  • I have updated my answer.Please review once.

  • Very thank you Ajay

    If It work I will update solution for this topic.