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

XMLRPC does not work anymore since Release “Frusterick Manners” #1947

Closed
NDee303 opened this issue Apr 11, 2017 · 7 comments
Closed

XMLRPC does not work anymore since Release “Frusterick Manners” #1947

NDee303 opened this issue Apr 11, 2017 · 7 comments
Labels

Comments

@NDee303
Copy link

@NDee303 NDee303 commented Apr 11, 2017

Since the last update the XML-RPC API does´nt work anymore. With "Elenor of Tsort" everything was working fine.

For example the following Request gets an "500 internal Server Error" in the REST-Client and the ssl_access.log shows "POST /dokuwiki/lib/exe/xmlrpc.php HTTP/1.1" 500 - "-" too

<methodCall>
 <methodName>wiki.getPage</methodName>
 <params>
 <param>
 <value>    
 <string>bookmarks</string>
 </value>
 </param>
 </params>
 </methodCall>
  • Linux version 2.6.32-573.22.1.el6.x86_64 (mockbuild @ x86-029.build.eng.bos.redhat.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) # 1 SMP Thu Mar 17 03:23:39 EDT 2016
  • Apache/2.2.15 (Red Hat) DAV/2 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips PHP/5.3.3
  • Dokuwiki Release 2017-02-19b “Frusterick Manners”
@smhaller
Copy link

@smhaller smhaller commented Apr 26, 2017

same here: not working with

  • Dokuwiki: 2017-02-19b "Frusterick Manners"
  • Apache/2.2.15
  • PHP 5.3.3
    but working with e.g.:
  • an older Dokuwiki Version
@smhaller
Copy link

@smhaller smhaller commented Apr 26, 2017

quick fix:
in lib/exe/xmlrpc.php

change line 7 to:

if(!$conf['remote']){
        $IXRErr =  new IXR_Error(-32605, "XML-RPC server not enabled."); 
        die($IXRErr->getXml());
}

The short version:

if(!$conf['remote']) die((new IXR_Error(-32605, "XML-RPC server not enabled."))->getXml());

can only be used in PHP 5.4 and later.

@smhaller smhaller mentioned this issue Apr 26, 2017
@splitbrain
Copy link
Owner

@splitbrain splitbrain commented Apr 26, 2017

@smhaller thanks for figuring this out. I recommend to upgrade to a newer PHP release.

@splitbrain splitbrain added the Bug label Apr 26, 2017
@NDee303
Copy link
Author

@NDee303 NDee303 commented Apr 26, 2017

I've seen on dokuwiki.org that the requirements have been recently adjusted on php 5.6. minimum. So we will update this shortly and test. If it works with php 5.6 than a non-functionality under php 5.3.3 would not be a bug in my opinion.

@NDee303
Copy link
Author

@NDee303 NDee303 commented Apr 27, 2017

@smhaller : I just tried your workaround/fix and it works perfekt. thx

@sheesupport
Copy link

@sheesupport sheesupport commented May 25, 2018

Some platforms where dokuwiki runs (like here) have a long support window. Like the initial reporting by NDee303 shows - the used platform (e.g. os/php/httpd) have support for PHP 5.3 at least until 2020 (RHEL/CentOS6). So, for the enterprise usage it would be make sense to provide a hotfix release for "Frusterick Manners" - at least I would appreciate it, thanks!

--- dokuwiki-2017-02-19e/lib/exe/xmlrpc.php  2017-05-13 18:50:04.463008471 +0200
+++ dokuwiki-2017-02-19e/lib/exe/xmlrpc.php  2018-05-25 19:13:16.507941703 +0200
@@ -4,7 +4,10 @@
 require_once(DOKU_INC.'inc/init.php');
 session_write_close();  //close session
 
-if(!$conf['remote']) die((new IXR_Error(-32605, "XML-RPC server not enabled."))->getXml());
+if(!$conf['remote']){
+    $IXRErr = new IXR_Error(-32605, "XML-RPC server not enabled.");
+    die($IXRErr->getXml());
+}
 
 /**
  * Contains needed wrapper functions and registers all available
@phy25 phy25 added the won't fix label Mar 22, 2020
@phy25
Copy link
Collaborator

@phy25 phy25 commented Mar 22, 2020

I would close this because the mentioned PHP version is not supported by newer DokuWiki anymore, but anyone that needs it to work can patch the code manually.

@phy25 phy25 closed this Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants