dokuwiki-plugin-sync
dokuwiki-plugin-sync copied to clipboard
"transport error - Premature End of File (socket) while reading headers" after upgrading Remote Wiki to PHP 8.1
I`d upgraded my Local and Remote Wikis to PHP 8.1 and started receiving the following error when selecting a Wiki profile and clicking on "Select" button into the Remote Wiki:
Failed to talk to remote wiki. Make sure the remote wiki allows XMLRPC requests and that you set up the endpoint URL correctly. transport error - Premature End of File (socket) while reading headers
After downgrading the Remote Wiki to PHP 7.4, the plugin worked as expected.
I get the same error. My local wiki is on PHP 7.4 (DokuWiki's MicroApache) and the remote server is using PHP 8.1.
I get the same error.
Both wikis are on PHP 7.4 (Apache) on Docker, both are on release 2024-02-06a "Kaos". On the server side, xmlrpc is activated, and not restricted to a specific user.
xmlrpc is installed and activated. With a xmlrpc-test-script from the internet, it was possible to establish a connection and transmit data.
On the first try, I typed a wrong password in the sync-profile, and got an error that my credentials are wrong. When I typed in the correct password, I got the error message which is in the topic.
EDIT: I checked the code and have the following suspicion:
If the credentials are correct, the function "dokuwiki.getXMLRPCAPIVersion" is called. This function was moved from the file inc/RemoteAPICore.php to the file inc/Remote/LegacyApiCore.php in Kaos. Maybe this causes the error because something doesn't work as expected?
I was able to overcome this issue by using https://github.com/splitbrain/dokuwiki-plugin-sync/tree/refactor that is the new upcoming version of this plugin. It's still a little bug and has some issues. Most of them (at least the critical ones) were fixed by this PR: https://github.com/splitbrain/dokuwiki-plugin-sync/pull/74 that you'll need to apply after using the refactor. All plugin development is now moved to there, according to splitbrain (main plugin developer).
Thank you for your hint and that you provide a PR. I've tried to use your version, but when I try to start the synchronization after choosing the profile, the page underneath the synchronization headline remains empty and nothing happens (see attached screenshot).
Thanks again for your help!
Can you provide your local Wiki logs on Manage > View Logs? On your remote wiki, which PHP version you're using? The server side seems to be troublesome on PHP 8+ yet. My remote wiki still runs PHP 7 because of that.