Deprecated error on Dashboard

I am using Version 7.10.10
Sugar Version 6.5.25 (Build 344) and;
PHP 7.0 at install.

I modified my dashboard and looked great. I created one account and the dashboard still looked great. I imported 82 accounts and they imported correctly. I looked at the accounts and it looked fine.
I went back to the dashboard I have four lines of the following:

Deprecated: Non-static method SugarWidgetReportField::_get_column_select() should not be called statically in /home1/ibdcllcc/public_html/digdev/include/generic/SugarWidgets/SugarWidgetFieldname.php on line 244

I removed the Accounts widget and it’s still there.
Any ideas how to remove the error?

It’s a good practice to always disable

display_errors

in your php.ini, so your PHP messages won’t go on screen. Many of these messages are safe to ignore, any way. Namely those “deprecated” ones.

Then you should keep an eye on your logs for anything relevant (ERROR or FATAL level).

Yes, that did the trick. Thank you!

Would you recommend copying the same php.ini file that’s in the root of the server to the sub-domain I have the crm build in?

I don’t know. Different hostings handle php.ini files in different ways.

All I can say is, change whichever files your hosting considers, and makes effective, for your SuiteCRM install… you might have to check with them how that works.

HI, have the same issue (differnt history)…

in all php.ini I could finf I have

display_errors = Off

bit still see this error

any idea?
thx
Dan

Check Admin / Diagnostics / phpinfo to see exactly which php.ini your PHP is using, and the effective value of display_errors.

1 Like

HI pgr, thank you…
that was a superb tip, hadn’t seen that tool yet

the tool showed me the place here: /opt/cpanel/ea-php70/root/etc

BUT: set all

; display_errors
;   Default Value: Off
;   Development Value: Off
;   Production Value: Off

; display_startup_errors
;   Default Value: Off
;   Development Value: Off
;   Production Value: Off

and still get this " Deprecated: Non-static method SugarWidgetReportField::_get_column_select() should not be called statically in /home/XXX/crm/include/generic/SugarWidgets/SugarWidgetFieldname.php on line 244

this is a tricky issue
thanks for all your help!

Dan

Lines starting with ; are comments, you need to add a line with

display_errors = false

and then restart your web server.

You can check your effective values in the same diagnostics tool.

I assume you are getting the deprecated error on screen, and not in the logs? If it’s just in the logs, then display_errors has nothing to do with it, and you can safely ignore the message.

1 Like

:blush: uuppsss…
sorry, yes…seems that is only the explainatory part

but I searched the file, and already it contains:

display_errors = Off

in line 107
also the diagnostic tool is great, but it always shows me

display_errors	On	On

no matter what I try (I always restart Apache)

I will now try to also add the line you gave me

Thx for your help!!

Dan

Update: after Iadded your line

; This directive controls whether or not and where PHP will output errors,
; notices and warnings too. Error output is very useful during development, but
; it could be very dangerous in production environments. Depending on the code
; which is triggering the error, sensitive information could potentially leak
; out of your application such as database usernames and passwords or worse.
; For production environments, we recommend logging errors rather than
; sending them to STDOUT.
; Possible Values:
;   Off = Do not display any errors
;   stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
;   On or stdout = Display errors to STDOUT
; Default Value: On
; Development Value: On
; Production Value: Off
; http://php.net/display-errors
display_errors = Off
display_errors = false

and restarted Apache, still have the same issue and diagnostics shows me error display as on

Oh, and this is only about the

Deprecated: Non-static method SugarWidgetReportField::_get_column_select() should not be called statically in /home/XXX/crm/include/generic/SugarWidgets/SugarWidgetFieldname.php on line 244

I get 2x on most pages, not error-logging
sorry
thank you
Dan

[/code]

Sorry, it shouldn’t be set to “false”, it should be set to “Off”

If you have both values there in two lines, the last one will be effective, and it’s the wrong one.

HI pgr, no need for sorry, I so much appreciate your help!!

But, with the code now looking like this

; This directive controls whether or not and where PHP will output errors,
; notices and warnings too. Error output is very useful during development, but
; it could be very dangerous in production environments. Depending on the code
; which is triggering the error, sensitive information could potentially leak
; out of your application such as database usernames and passwords or worse.
; For production environments, we recommend logging errors rather than
; sending them to STDOUT.
; Possible Values:
;   Off = Do not display any errors
;   stderr = Display errors to STDERR (affects only CGI/CLI binaries!)
;   On or stdout = Display errors to STDOUT
; Default Value: On
; Development Value: On
; Production Value: Off
; http://php.net/display-errors
display_errors = Off

I still get the "depreciated messages. And am sure if I look again into the diagnostics file, it would still be set to ON.

Sorry that I am a PITA here :frowning:

Thx a million

Dan

Is this your own server, or is it shared hosting? Sometimes hostings do weird things to php.ini settings (to keep you from changing things they don’t want you to change).

Does your phpinfo mention only one php.ini? I think there can be more than one, and it doesn’t look like you’re edits are being effective, for some weird reason.

1 Like

HI pgr, sorry for the late reply…I gave up for some time bec of the weirdness…
it shows only one php.ini file
and it is my own vServer… I have all rights …

the stranger this is

Dan