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>
same here: not working with
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 thanks for figuring this out. I recommend to upgrade to a newer PHP release.
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.
@smhaller : I just tried your workaround/fix and it works perfekt. thx
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
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.