123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- ---
- title: PHP Notice: Array to string conversion in /var/www/gnusocial/lib/util/xmloutputter.php on line 141
- author: notabug.org/aab
- time: Thu, 02 Apr 2020 10:11:19 UTC
- status: closed
- ---
- author: notabug.org
- time: Thu, 02 Apr 2020 10:11:19 UTC
- content: -----
- I got this several times per day in the logs: <code>[error] 31910#31910: *1104369 FastCGI sent in stderr: "PHP message: PHP Notice: Array to string conversion in /var/www/gnusocial/lib/util/xmloutputter.php on line 141" while reading response header from upstream, client: ip_address, server: gnusocial.net, request: "POST /api/statuses/update.xml HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "gnusocial.net"</code> Could this be related to the message in the UI "File not found in the system"? Any hint to fix it?
- -----
- author: notabug.org
- time: Thu, 02 Apr 2020 16:23:02 UTC
- content: -----
- Just pushed a commit to experimental branch, can you try it?
- -----
- author: notabug.org
- time: Thu, 02 Apr 2020 16:39:28 UTC
- content: -----
- I just made the changes to xmloutputter.php; i'll report in some hours, to be sure it is fixed. Thanks!
- -----
- author: notabug.org
- time: Thu, 02 Apr 2020 16:46:53 UTC
- content: -----
- I just got this: <code>[error] 31910#31910: *1189565 FastCGI sent in stderr: "PHP message: PHP Warning: XMLWriter::startDocument(): xmlTextWriterStartDocument : not allowed in this context! in /var/www/gnusocial/lib/util/xmloutputter.php on line 94" while reading response header from upstream, client: ip_address, server: gnusocial.net, request: "POST /api/statuses/update.xml HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "gnusocial.net"</code>
- -----
- author: notabug.org
- time: Thu, 02 Apr 2020 22:16:59 UTC
- content: -----
- that error sounds different/unrelated, is it as frequent?
- -----
- author: notabug.org
- time: Thu, 02 Apr 2020 22:51:43 UTC
- content: -----
- Well, grepping "xmloutputter.php" from nginx's error log, i got the second log i've sent every 6-8 minutes, just the same amount as the first. I've reverted the changes, and the first error is back.
- -----
- author: notabug.org
- time: Thu, 02 Apr 2020 23:25:15 UTC
- content: -----
- so, fixing one error just triggered another one that is as frequent... nice..., did anything change in the UI after applying this commit?
- -----
- author: notabug.org
- time: Thu, 02 Apr 2020 23:52:21 UTC
- content: -----
- Okay, replaced that commit with one with a couple more changes, let's see if this helps :)
- -----
- author: notabug.org
- time: Fri, 03 Apr 2020 00:05:03 UTC
- content: -----
- No changes in UI as far as i know... I'm applying the changes now and will check in the morning. Good night :)
- -----
- author: notabug.org
- time: Fri, 03 Apr 2020 00:06:10 UTC
- content: -----
- -----
- author: notabug.org
- time: Fri, 03 Apr 2020 07:59:27 UTC
- content: -----
- Ok, i tried last night but i had to reverse the changes, because the UI was gone, only HTML was shown. If i get it right, i had to change xmloutputter.php and xmlstringer.php, right? The logs showed this (lots of times each): <code> #0 /var/www/gnusocial/lib/util/framework.php(145): require_once() #1 [internal function]: GNUsocial_class_autoload('HTMLOutputter') #2 /var/www/gnusocial/lib/action/action.php(45): spl_autoload_call('HTMLOutputter') [error] 15965#15965: *1265173 FastCGI sent in stderr: "PHP message: Uncaught Exception: Error: Class 'XMLOutputter' not found in /var/www/gnusocial/lib/util/htmloutputter.php:56 #3 /var/www/gnusocial/lib/util/framework.php(186): require_once('/var/www/gnusoc...') #4 /var/www/gnusocial/lib/util/common.php(27): require_once('/var/www/gnusoc...') #5 /var/www/gnusocial/public/index.php(171): require_once('/var/www/gnusoc...') #6 {main}" while reading upstream, client: ip_address, server: gnusocial.net, request: "POST /inbox.json HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "gnusocial.net" </code>
- -----
- author: notabug.org
- time: Fri, 03 Apr 2020 14:29:26 UTC
- content: -----
- All right, I replaced that commit with something new that, might not solve the issue, but should produce a more helpful error log, I hope; share with me the php errors and gnu social errors while trying please :)
- -----
- author: notabug.org
- time: Sat, 04 Apr 2020 19:21:26 UTC
- content: -----
- Ok, i just upgraded to experimental (i think...). Grepping "xmloutputter", a similar message appears on logs: <code>2020/04/04 21:05:33 [error] 15965#15965: *1625952 FastCGI sent in stderr: "PHP message: PHP Warning: XMLWriter::startDocument(): xmlTextWriterStartDocument : not allowed in this context! in /var/www/gnusocial/lib/util/xmloutputter.php on line 85" while reading response header from upstream, client: ip_address, server: gnusocial.net, request: "GET /api/statuses/home_timeline.xml?count=20 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "gnusocial.net"</code> It seems to have changed from "on line 94" to "on line 85". (Edit) Comparing "xmloutputter.php" from nightly and experimental, the line has changed positions, but it is the same: "$this->xw->startDocument('1.0', 'UTF-8');" Besides that, a new one: <code>PHP Fatal error: Declaration of Atom10Feed::getString() must be compatible with xmlstringer::getString(): string in /var/www/gnusocial/lib/feeds/atom10feed.php on line 49</code> This is in nginx error log; can't find anything on gs logs.
- -----
- author: notabug.org
- time: Sat, 04 Apr 2020 19:59:57 UTC
- content: -----
- fixed the xmlstringer issue. do as suggested in irc and find what plugin is bugging xml headers :)
- -----
- author: notabug.org
- time: Tue, 07 Apr 2020 02:35:51 UTC
- content: -----
- updates on this?
- -----
- author: notabug.org
- time: Tue, 07 Apr 2020 09:49:46 UTC
- content: -----
- Sorry, I wanted to wait a bit just in case the error re-appeared. Yes, it is fixed! :)
- -----
|