Send loadXML errors to log file

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
whocarez
Registered User
Posts: 139
Joined: Sat Apr 18, 2009 9:19 pm

Send loadXML errors to log file

Post by whocarez » Tue Feb 20, 2018 9:54 pm

Hello,
on a phpbb 3.2.2 board with php 7.0.27-1~dotdeb+8.1 I got on some topics errors like this:

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/s9e/text-formatter/src/Utils.php on line 76: DOMDocument::loadXML(): EntityRef: expecting ';' in Entity, line: 10
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/s9e/text-formatter/src/Utils.php on line 76: DOMDocument::loadXML(): EntityRef: expecting ';' in Entity, line: 12
PHP-Information

Code: Select all

display_errors	Off	Off
display_startup_errors	Off Off
...
error_reporting	24567 22527
config.php

Code: Select all

//@define('DEBUG', true);
//@define('DEBUG_CONTAINER', true);
Somehow these messages are displayed to normal users despite the fact, that error_display and debug mode are switched off. How can I send these messages to the normal php-error.log??? And has someone an idea what can cause this error? Probably an extension?
Thanks a lot!

whocarez
Registered User
Posts: 139
Joined: Sat Apr 18, 2009 9:19 pm

Re: Send loadXML errors to log file

Post by whocarez » Tue Feb 20, 2018 10:42 pm

ok, this error seems to be caused by unencoded ampersands in urls. Manually changing & to & removed these messages for at least in one post. But the main problem persists, why get users displayed this warning and it is not sent to the log file?

Another post contains this warning:

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/vendor/s9e/text-formatter/src/Utils.php on line 76: DOMDocument::loadXML(): xmlParseEntityRef: no name in Entity, line: 1

whocarez
Registered User
Posts: 139
Joined: Sat Apr 18, 2009 9:19 pm

Re: Send loadXML errors to log file

Post by whocarez » Tue Feb 20, 2018 10:54 pm

The second error was caused by a & inside the text. Removing that solved the problem.

User avatar
Lumpy Burgertushie
Registered User
Posts: 64862
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Send loadXML errors to log file

Post by Lumpy Burgertushie » Tue Feb 20, 2018 10:58 pm

that looks like a mod_security setting being too strict. contact your host and show them what is going on and ask them about mod_security settings.

robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

whocarez
Registered User
Posts: 139
Joined: Sat Apr 18, 2009 9:19 pm

Re: Send loadXML errors to log file

Post by whocarez » Tue Feb 20, 2018 11:18 pm

hm, you mean this Apache module? I've got only installed nginx 1.12.2 with some of these standard php params.
Tested it with an older PHP Version 5.6.33-0+deb8u1 version, but with the same result. Maybe I should first try it again with all extensions switched off.

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 49457
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Send loadXML errors to log file

Post by stevemaury » Tue Feb 20, 2018 11:21 pm

If you are your own host, this is a server configuration issue. There is no support here for server configuration, sorry.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. PM or email me.

All unsolicited PMs will be ignored.

whocarez
Registered User
Posts: 139
Joined: Sat Apr 18, 2009 9:19 pm

Re: Send loadXML errors to log file

Post by whocarez » Tue Feb 20, 2018 11:29 pm

I'm sorry, this was a misunderstanding. I'm talking about ampersands in posted URLs and posted texts. This has nothing to do with the server configuration.
This does also not explain why "display_error off" is ignored for these loadxhtml issues. But anyway, I habe to explore first, if it has something to do with an extension.

User avatar
Lumpy Burgertushie
Registered User
Posts: 64862
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Send loadXML errors to log file

Post by Lumpy Burgertushie » Tue Feb 20, 2018 11:44 pm

if you are hosting this on your own machine and not with a hosting company then you need to learn about how to setup your server software properly.

this is almost certainly going to be related to a server software setting whether it is apache or nginx.
there seems to be a lot of problems when people are running nginx instead of apache but I don't know anything about nginx and why people are trying to use it when it has so many problems.

robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

whocarez
Registered User
Posts: 139
Joined: Sat Apr 18, 2009 9:19 pm

Re: Send loadXML errors to log file

Post by whocarez » Wed Feb 21, 2018 12:06 am

Once again sorry for my unclear post. I'm talking about posts which contains text like this.

Code: Select all

[url=http://domain.com/something&12345&6788.html]this is a link with an ampersand[/url]

This & this is causing errors ....
This has nothing to do with server software and her configuration.

User avatar
3Di
Registered User
Posts: 12893
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Send loadXML errors to log file

Post by 3Di » Wed Feb 21, 2018 12:12 am

That's what happens if you use those so called SEO MOD/Extensions, usually.
Those links aren't native.

your url in my environment takes you to
.
ampersandurl.png
.
that's my config.php (local)
.
ampersandurldebug.png
.
PHP 7.0.27 like yours, to add, for this test.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

User avatar
Lumpy Burgertushie
Registered User
Posts: 64862
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Send loadXML errors to log file

Post by Lumpy Burgertushie » Wed Feb 21, 2018 12:32 am

not trying to be argumentative here, however, when running apache with mod_security set incorrectly, any given letter or character or combination of them can set it off and cause all sorts of strange errors like this.

I have no idea if nginx has anything like mod_security or, if so, if that is what is causing your problem but it is certainly a possibility.

ok, I'm out.

robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

whocarez
Registered User
Posts: 139
Joined: Sat Apr 18, 2009 9:19 pm

Re: Send loadXML errors to log file

Post by whocarez » Wed Feb 21, 2018 12:48 am

Once again sorry guys, but this is really a misunderstanding.
I'm talking about posted external links and not only links.
Everytime an ampersand appears inside the text, the XML renderer gives an error.

User avatar
3Di
Registered User
Posts: 12893
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Send loadXML errors to log file

Post by 3Di » Wed Feb 21, 2018 12:55 am

whocarez wrote:
Wed Feb 21, 2018 12:48 am
Once again sorry guys, but this is really a misunderstanding.
I'm talking about posted external links and not only links.
Everytime an ampersand appears inside the text, the XML renderer gives an error.
that's what I did, I posted your URL
.
ampersandurlpost.png
ampersandurlpost.png (10.38 KiB) Viewed 288 times
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

User avatar
JoshyPHP
Code Contributor
Posts: 949
Joined: Mon Jul 11, 2011 12:28 am

Re: Send loadXML errors to log file

Post by JoshyPHP » Wed Feb 21, 2018 2:54 am

whocarez wrote:
Tue Feb 20, 2018 9:54 pm
And has someone an idea what can cause this error? Probably an extension?
The best way to investigate would be to find a way to reproduce the issue and trigger the error message on a default install. If you can, post the exact steps to reproduce it here. And if you can't, then it's caused an extension and you should try toggling them until you find the one.
I wrote the thing that does BBCodes in 3.2.

whocarez
Registered User
Posts: 139
Joined: Sat Apr 18, 2009 9:19 pm

Re: Send loadXML errors to log file

Post by whocarez » Wed Feb 21, 2018 10:44 am

I could identify the extension (phpbbseo/meta), which caused this error while generating the meta description with a standard post like that:

Code: Select all

test &&&&

http://example.com/testurl.html?dfgdrt&xcvdfg&4546456
So @3Di had the right assumption. Thanks for this hint ...

But the opening question is still actual: Why is this warning with switched off debug and error_display not sent to the standard php-error.log and instead shown to usual users?

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: canonknipser, invenio, ivailo95, Mannix_, Rosain and 61 guests

cron