#198 PHP Warning: parse_url() expects parameter 1 to be string - File_redirection.php on line 370

Open
opened 3 years ago by aab · 3 comments
aab commented 3 years ago

I have some of these since yesterday (every 10-12 minutes, different ip)

Nginx logs:

2020/08/06 09:03:16 [error] 829#829: *897994 FastCGI sent in stderr: "PHP message: PHP Warning: parse_url() expects parameter 1 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 370

PHP message: PHP Warning: explode() expects parameter 2 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 372

PHP message: PHP Warning: ltrim() expects parameter 1 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 399" while reading response header from upstream, client: 116.203.145.105, server: gnusocial.net, request: "POST /inbox.json HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "gnusocial.net"

GS debug logs

2020-08-06 07:03:16 LOG_INFO: [gnusocial.net:28642.9518a166 POST /inbox.json] HTTPClient: HTTP GET https://blobcdn.blob.cat/blobcatfiles/39e86bf39d9716dfa91cc8d17114a0fade4f84$

2020-08-06 07:03:16 LOG_DEBUG: [gnusocial.net:28642.9518a166 POST /inbox.json] Filename of file id==2792739 is not null ('313539363639373338333137322e706e67-39e86bf39d9716dfa9$

2020-08-06 07:03:16 LOG_DEBUG: [gnusocial.net:28642.9518a166 POST /inbox.json] The Redis queue for distrib has length 2

I have some of these since yesterday (every 10-12 minutes, different ip) Nginx logs: 2020/08/06 09:03:16 [error] 829#829: *897994 FastCGI sent in stderr: "PHP message: PHP Warning: parse_url() expects parameter 1 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 370 PHP message: PHP Warning: explode() expects parameter 2 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 372 PHP message: PHP Warning: ltrim() expects parameter 1 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 399" while reading response header from upstream, client: 116.203.145.105, server: gnusocial.net, request: "POST /inbox.json HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "gnusocial.net" GS debug logs 2020-08-06 07:03:16 LOG_INFO: [gnusocial.net:28642.9518a166 POST /inbox.json] HTTPClient: HTTP GET https://blobcdn.blob.cat/blobcatfiles/39e86bf39d9716dfa91cc8d17114a0fade4f84$ 2020-08-06 07:03:16 LOG_DEBUG: [gnusocial.net:28642.9518a166 POST /inbox.json] Filename of file id==2792739 is not null ('313539363639373338333137322e706e67-39e86bf39d9716dfa9$ 2020-08-06 07:03:16 LOG_DEBUG: [gnusocial.net:28642.9518a166 POST /inbox.json] The Redis queue for distrib has length 2
Diogo Cordeiro commented 3 years ago
Owner

Hopefully fixed with current experimental. Re-open if it persists in beta.

Hopefully fixed with current experimental. Re-open if it persists in beta.
aab commented 2 years ago
Poster

I'm afraid it is back in beta, but gs log changes:

Nginx log:

2021/07/25 14:45:02 [error] 28711#28711: *630903 FastCGI sent in stderr: "PHP message: PHP Warning: parse_url() expects parameter 1 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 370 PHP message: PHP Warning: explode() expects parameter 2 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 372PHP message: PHP Warning: ltrim() expects parameter 1 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 399" while reading response header from upstream, client: 2.68.95.102, server: gnusocial.net, request: "POST /notice/new HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "gnusocial.net", referrer: "https://gnusocial.net/goldbrush1"

GS-debug log:

2021-07-25 12:45:54 LOG_DEBUG: [gnusocial.net:944.156b1194 GET /goldbrush1] File id==5771684 isn't a non-fetched remote file ('69736b616666652e77656270-f4b15b5a8c9985379077d08a84f866808108d2c6fabffe192d73cb1b8ef6d190'), so nothing StoreRemoteMedia should handle.

2021-07-25 12:45:54 LOG_DEBUG: [gnusocial.net:944.156b1194 GET /goldbrush1] File of id==5771684 is local (filename: '69736b616666652e77656270-f4b15b5a8c9985379077d08a84f866808108d2c6fabffe192d73cb1b8ef6d190'), so nothing Embed should handle.

2021-07-25 12:46:08 LOG_DEBUG: [gnusocial.net:946.17e77dd6 GET /goldbrush1?page=8] action.php - User error '404' on 'showstream': No such page.

2021-07-25 12:46:08 LOG_ERR: [gnusocial.net:946.17e77dd6 GET /goldbrush1?page=8] Handled clientError (404) but cannot output into desired format (NULL): 'No such page.'

I'm afraid it is back in beta, but gs log changes: Nginx log: 2021/07/25 14:45:02 [error] 28711#28711: *630903 FastCGI sent in stderr: "PHP message: PHP Warning: parse_url() expects parameter 1 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 370 PHP message: PHP Warning: explode() expects parameter 2 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 372PHP message: PHP Warning: ltrim() expects parameter 1 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 399" while reading response header from upstream, client: 2.68.95.102, server: gnusocial.net, request: "POST /notice/new HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "gnusocial.net", referrer: "https://gnusocial.net/goldbrush1" GS-debug log: 2021-07-25 12:45:54 LOG_DEBUG: [gnusocial.net:944.156b1194 GET /goldbrush1] File id==5771684 isn't a non-fetched remote file ('69736b616666652e77656270-f4b15b5a8c9985379077d08a84f866808108d2c6fabffe192d73cb1b8ef6d190'), so nothing StoreRemoteMedia should handle. 2021-07-25 12:45:54 LOG_DEBUG: [gnusocial.net:944.156b1194 GET /goldbrush1] File of id==5771684 is local (filename: '69736b616666652e77656270-f4b15b5a8c9985379077d08a84f866808108d2c6fabffe192d73cb1b8ef6d190'), so nothing Embed should handle. 2021-07-25 12:46:08 LOG_DEBUG: [gnusocial.net:946.17e77dd6 GET /goldbrush1?page=8] action.php - User error '404' on 'showstream': No such page. 2021-07-25 12:46:08 LOG_ERR: [gnusocial.net:946.17e77dd6 GET /goldbrush1?page=8] Handled clientError (404) but cannot output into desired format (NULL): 'No such page.'
aab reopened 2 years ago
aab commented 2 years ago
Poster

One more example today. The notice originating this is https://gnusocial.net/notice/9784101. The last lines seem ok (i've left them to get the whole picture), but look at the webfinger ID lines.

From nginx:

2021/07/29 18:06:18 [error] 14573#14573: *561261 FastCGI sent in stderr: "PHP message: PHP Warning: parse_url() expects parameter 1 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 370PHP message: PHP Warning: explode() expects parameter 2 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 372PHP message: PHP Warning: ltrim() expects parameter 1 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 399" while reading response header from upstream, client: 185.213.155.164, server: gnusocial.net, request: "POST /notice/new HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "gnusocial.net", referrer: "https://gnusocial.net/simsa04/all"

And from gs-debug:

2021-07-29 16:06:17 LOG_DEBUG: [gnusocial.net:873.ba9eb0d0 POST /user/176220/inbox.json] ActivityPub Inbox: HTTP Signature: Authorized request. Will now start the inbox handler.

2021-07-29 16:06:17 LOG_DEBUG: [gnusocial.net:873.ba9eb0d0 POST /user/176220/inbox.json] The Redis queue for distrib has length 1

2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] Found 2 matches for WebFinger IDs: array ( 0 => array ( ), 1 => array ( ), )

2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] Found 2 matches for WebFinger IDs: array ( 0 => array ( ), 1 => array ( ), )

2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] Found 2 matches for profile URL mentions: array ( 0 => array ( ), 1 => array ( ), )

2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] Found 2 matches for WebFinger IDs: array ( 0 => array ( ), 1 => array ( ), )

2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] Found 2 matches for profile URL mentions: array ( 0 => array ( ), 1 => array ( ), )

2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] The Redis queue for distrib has length 2

2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] File id==5843224 isn't a non-fetched remote file ('696f2e77656270-eb91e9a93d080f21a335b5ebe1c3ce0a88c14597eb4b7fd3e5496920626780fb'$

2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] File of id==5843224 is local (filename: '696f2e77656270-eb91e9a93d080f21a335b5ebe1c3ce0a88c14597eb4b7fd3e5496920626780fb'), so nothing Embed should handle.

2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] Generating a thumbnail of File id=5843224 of size 450x573

2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:894.ab46c76b GET /thumbnail/5843224?w=450&h=573] File id==5843224 isn't a non-fetched remote file ('696f2e77656270-eb91e9a93d080f21a335b5ebe1c3ce0a88c14597eb4b7fd3e5496920626780fb'), so nothing StoreRemoteMedia should handle.

2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:894.ab46c76b GET /thumbnail/5843224?w=450&h=573] File of id==5843224 is local (filename: '696f2e77656270-eb91e9a93d080f21a335b5ebe1c3ce0a88c14597eb4b7fd3e5496920626780fb'), so nothing Embed should handle.

One more example today. The notice originating this is https://gnusocial.net/notice/9784101. The last lines seem ok (i've left them to get the whole picture), but look at the webfinger ID lines. From nginx: 2021/07/29 18:06:18 [error] 14573#14573: *561261 FastCGI sent in stderr: "PHP message: PHP Warning: parse_url() expects parameter 1 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 370PHP message: PHP Warning: explode() expects parameter 2 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 372PHP message: PHP Warning: ltrim() expects parameter 1 to be string, object given in /var/www/gnusocial/classes/File_redirection.php on line 399" while reading response header from upstream, client: 185.213.155.164, server: gnusocial.net, request: "POST /notice/new HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.3-fpm.sock:", host: "gnusocial.net", referrer: "https://gnusocial.net/simsa04/all" And from gs-debug: 2021-07-29 16:06:17 LOG_DEBUG: [gnusocial.net:873.ba9eb0d0 POST /user/176220/inbox.json] ActivityPub Inbox: HTTP Signature: Authorized request. Will now start the inbox handler. 2021-07-29 16:06:17 LOG_DEBUG: [gnusocial.net:873.ba9eb0d0 POST /user/176220/inbox.json] The Redis queue for distrib has length 1 2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] Found 2 matches for WebFinger IDs: array ( 0 => array ( ), 1 => array ( ), ) 2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] Found 2 matches for WebFinger IDs: array ( 0 => array ( ), 1 => array ( ), ) 2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] Found 2 matches for profile URL mentions: array ( 0 => array ( ), 1 => array ( ), ) 2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] Found 2 matches for WebFinger IDs: array ( 0 => array ( ), 1 => array ( ), ) 2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] Found 2 matches for profile URL mentions: array ( 0 => array ( ), 1 => array ( ), ) 2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] The Redis queue for distrib has length 2 2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] File id==5843224 isn't a non-fetched remote file ('696f2e77656270-eb91e9a93d080f21a335b5ebe1c3ce0a88c14597eb4b7fd3e5496920626780fb'$ 2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] File of id==5843224 is local (filename: '696f2e77656270-eb91e9a93d080f21a335b5ebe1c3ce0a88c14597eb4b7fd3e5496920626780fb'), so nothing Embed should handle. 2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:927.025c51b0 POST /notice/new] Generating a thumbnail of File id=5843224 of size 450x573 2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:894.ab46c76b GET /thumbnail/5843224?w=450&h=573] File id==5843224 isn't a non-fetched remote file ('696f2e77656270-eb91e9a93d080f21a335b5ebe1c3ce0a88c14597eb4b7fd3e5496920626780fb'), so nothing StoreRemoteMedia should handle. 2021-07-29 16:06:18 LOG_DEBUG: [gnusocial.net:894.ab46c76b GET /thumbnail/5843224?w=450&h=573] File of id==5843224 is local (filename: '696f2e77656270-eb91e9a93d080f21a335b5ebe1c3ce0a88c14597eb4b7fd3e5496920626780fb'), so nothing Embed should handle.
Sign in to join this conversation.
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.