Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Micropub requests returning 500 #11

Closed
gRegorLove opened this issue Nov 27, 2023 · 5 comments
Closed

Micropub requests returning 500 #11

gRegorLove opened this issue Nov 27, 2023 · 5 comments

Comments

@gRegorLove
Copy link

I tried anonymous commenting via commentpara.de + Quill and got an HTTP 500 in response to the Micropub request.

It looks like this line is hard-coded to always return 500, but the post was still created (Example: https://commentpara.de/comment/1408.htm)

@cweiske
Copy link
Owner

cweiske commented Nov 28, 2023

Please give details to the request you made (data you sent).

@cweiske
Copy link
Owner

cweiske commented Nov 28, 2023

The code initially sets a 500 error in case something goes wrong. When everything is fine, the status code is overridden later.

@gRegorLove
Copy link
Author

gRegorLove commented Nov 28, 2023

Quill doesn't display the raw request data unfortunately, but it was the request that generated 1408.htm, in case you have logs.

Generally I'm just using the defaults filled in by Quill: in-reply-to=https://gregorlove.com/2023/11/this-is-a-really/ and entering a short note in the content field. I just made another test post. It created https://commentpara.de/comment/1409.htm (found it via the Atom feed) and showed this error in Quill:

Something went wrong!
Your Micropub endpoint indicated that something went wrong creating the post.

Micropub Response

Below is the response from your Micropub endpoint. This may contain helpful information that can be used to troubleshoot the issue.

HTTP/1.1 500 Internal Server Error
Date: Tue, 28 Nov 2023 18:14:45 GMT
Server: Apache/2.4.56 (Debian)
Access-Control-Allow-Origin: *
Content-Length: 0
Connection: close
Content-Type: text/html; charset=UTF-8

I haven't used the header() replace functionality before. Maybe it's something with regard to the HTTP/1.0 in the code, but server responding with HTTP/1.1?

@cweiske
Copy link
Owner

cweiske commented Nov 30, 2023

Error log says:

[Tue Nov 28 19:14:45.061138 2023] [proxy_fcgi:error] [pid 3053788:tid 139884467582720] [client 173.230.155.197:57204] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function get_magic_quotes_runtime() in /home/cweiske/www/commentpara.de/vendor/pear/http_request2/HTTP/Request2.php:935\nStack trace:\n#0 /home/cweiske/www/commentpara.de/vendor/pear2/services_linkback/src/PEAR2/Services/Linkback/Client.php(126): HTTP_Request2->send()\n#1 /home/cweiske/www/commentpara.de/vendor/pear2/services_linkback/src/PEAR2/Services/Linkback/Client.php(97): PEAR2\Services\Linkback\Client->discoverServer()\n#2 /home/cweiske/www/commentpara.de/src/anoweco/Linkback.php(35): PEAR2\Services\Linkback\Client->send()\n#3 /home/cweiske/www/commentpara.de/www/micropub.php(90): anoweco\Linkback->ping()\n#4 /home/cweiske/www/commentpara.de/www/micropub.php(227): anoweco\handleCreate()\n#5 {main}\n thrown in /home/cweiske/www/commentpara.de/vendor/pear/http_request2/HTTP/Request2.php on line 935'

I've updated the libraries, and got a new PEAR/HTTP_Request2 package that should fix that.

@cweiske
Copy link
Owner

cweiske commented Nov 30, 2023

.. and we have a new error:

[Thu Nov 30 10:55:45.525657 2023] [proxy_fcgi:error] [pid 40356:tid 139885754316544] [client 173.230.155.197:42314] AH01071: Got error 'PHP message: PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in /home/cweiske/www/commentpara.de/vendor/pear/http2/HTTP2.php on line 501'

We need pear/http2 2.0.0 to fix that.

Fixed.

@cweiske cweiske closed this as completed Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants