Page 1 of 1

Error display and solving them

Posted: Mon May 20, 2019 9:56 am
by AccentAvondschool
Hi,

I almost successfully converted the website of our school from CMSMS v1.12.2 to v2.2.10 on subdomain (www1).
After quite a few smarty adjustments everything (menu/calendar/news/etc) seems to work (on screen) but the error logs still show some PHP warnings but I have no idea where to look. Some lines of code ...

Code: Select all

[Mon May 20 11:14:14.608096 2019] [fcgid:warn] [pid 14027:tid 139848157689600] [client 84.84.7.27:57657] mod_fcgid: stderr: PHP Warning:  A non-numeric value encountered in /var/www/vhosts/accentavondschool.nl/domains/www1.accentavondschool.nl/tmp/templates_c/1f872bb2407ba11fb3b08117a364153d774ad774_0.tpl_top.58.php on line 34, referer: https://www1.accentavondschool.nl/
[Mon May 20 11:14:14.608223 2019] [fcgid:warn] [pid 14027:tid 139848157689600] [client 84.84.7.27:57657] mod_fcgid: stderr: PHP Warning:  Parameter 2 to smarty_postfilter_noopener() expected to be a reference, value given in /var/www/vhosts/accentavondschool.nl/domains/www1.accentavondschool.nl/lib/smarty/sysplugins/smarty_internal_runtime_filterhandler.php on line 57, referer: https://www1.accentavondschool.nl/
Is there a way to get the error messages a little easier to understand, for example which block or code generates the error?

Thanks in advance
Accent Avondschool - https://www.accentavondschool.nl/
René

Re: Error display and solving them

Posted: Mon May 20, 2019 3:30 pm
by DIGI3
These are warnings so won't bring your site down. Usually they're just modules which need minor updates for your version of PHP.

PHP is reporting those errors, they're not generated by CMSMS. But you can probably find out what is causing them by looking at the files it lists, and the line number specified. These particular ones are in cache files so you'll have to look at them before clearing the cache.

Re: Error display and solving them

Posted: Mon May 20, 2019 6:07 pm
by velden
First warning:
.._0.tpl_top.58.php ...

Suggests it's something at the very top (before <__html>) of your page template. I'm not sure if it can be included templates (global content blocks or others too).

Second warning:

https://cmscanbesimple.org/blog/solutio ... nerability

Re: Error display and solving them

Posted: Mon May 20, 2019 7:29 pm
by AccentAvondschool
@DIGI3 & @velden thank you for your quick responses.

Domain www1.accentavondschool.nl runs on latest PHP 7.2.18 and because the log file is already 50Mb I want to reduce these warning messages.

I am going to view your advice and links, thanks for this information.

Regards,
René

Re: Error display and solving them

Posted: Mon May 20, 2019 7:31 pm
by DIGI3
It's good to sort them out, but you can always change the reporting level to not include warnings. Typically you just enable the warnings on development sites, not production.

Re: Error display and solving them

Posted: Mon May 20, 2019 7:45 pm
by calguy1000

Code: Select all

smarty_postfilter_noopener()
This is not a core function. But you may have added a postfilter function.
You can look in your assets/plugins or lib/plugins directory for a file containing that filter.

Or look in your UDT's

Re: Error display and solving them

Posted: Tue May 21, 2019 8:42 pm
by Rolf
The second warning is already fixed in the blog:
https://cmscanbesimple.org/blog/solutio ... nerability
Update your plugin file with the latest code.

Re: Error display and solving them

Posted: Wed May 22, 2019 9:15 pm
by AccentAvondschool
@Rolf, calguy1000,

Thx for your responses.

I've indeed added the postfilter function 'postfilter.noopener.php' and it is already active on the current site (http://www.accentavondschool.nl).
On the new site (www1.accentavondschool.nl) this file is in the new plugin folder. I just compared them and the only difference with my code and the code from https://cmscanbesimple.org/blog/solutio...nerability was the Ampersand for $smarty in my code like ...

Code: Select all

function smarty_postfilter_noopener($tpl_output, &$smarty) {
Also is the latest blog version 1.15.8 active on the new site (www1.accentavondschool.nl)

Regards,
René