-
Notifications
You must be signed in to change notification settings - Fork 17
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
"transport error - Premature End of File (socket) while reading headers" after upgrading Remote Wiki to PHP 8.1 #68
Comments
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: #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). |
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. |
Unfortunately, I too have been struggling with the same problem for a long time. From the synchronization behavior I can observe it seems that synchronization does not work with PHP version 8 and higher. To verify this, I set up two identical environments with two instances of Dokuwiki using two independent Raspberry Pi 5, both in the same local network segment. Here is the configuration:
Both Dokuwiki's have synchronization enabled and configured correctly. The test scenario consists of synchronizing the playground namespace between the two dokuwikies. If we try to select a synchronization profile on the synchronization page, this error occurs: 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 Everything should be clearly visible from the screenshots: However, the strange thing is that this error does not always occur. By retrying the profile selection, in one case out of many, this error does not occur and synchronization can be started. However, then again this same error is visible: Logs:
Deprecated warnings: |
I figure out that using the refactory branch with bugfixes applied (#74) does make the migration more stable. This issue still occurs to me, but less than before, at least I'm able to sync my Wikis. One is running PHP 8 (the wiki with the remote plugin) and the other one is running PHP 7.4 (the remote wiki). |
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:
After downgrading the Remote Wiki to PHP 7.4, the plugin worked as expected.
The text was updated successfully, but these errors were encountered: