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

Open
NDee303 opened this Issue Apr 11, 2017 · 6 comments

Comments

Projects
None yet
4 participants
@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

This comment has been minimized.

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

This comment has been minimized.

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 added a commit to smhaller/dokuwiki that referenced this issue Apr 26, 2017

xmlrpc
Fix php parse syntax error (unexpected T_OBJECT_OPERATOR) for php version < 5.4 splitbrain#1947

@smhaller smhaller referenced this issue Apr 26, 2017

Closed

xmlrpc #1958

@splitbrain

This comment has been minimized.

Owner

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

This comment has been minimized.

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

This comment has been minimized.

NDee303 commented Apr 27, 2017

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

@sheesupport

This comment has been minimized.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment