1 message in com.mysql.lists.eventum-develCLI not working (authenticate problem)
FromSent OnAttachments
Greg Rundlett11 Apr 2007 07:56 
Subject:CLI not working (authenticate problem)
From:Greg Rundlett (greg@oasis-open.org)
Date:04/11/2007 07:56:02 AM
List:com.mysql.lists.eventum-devel

Using 1.7.1, I've followed all the INSTALL directions for setting up the CLI, yet it does not work. Below are the details, which track the problem down to the function authenticate() in /rpc/xmlrpc.php

I turned on error_reporting(E_ALL); in /rpc/xmlrpc.php The version of include/pear/XML_RPC/Server.php is * @version CVS: $Id: Server.php,v 1.29 2005/08/14 20:25:35 danielc Exp $ In misc/cli/eventum (which I copied locally to ~/bin/cli/eventum), I uncommented $client->setDebug(1); so that I received all the XML_RPC communication details back and forth.

eventum --help works fine eventum 1 gives the following error: Error - Authentication failed for greg@oasis-open.org.

This user (me) has administrator role and I can see that the password is correct from the debug output.

By turning up the error reporting and checking the log, I can see a couple problems with variable scoping (because variables are not defined which should be defined).

[11-Apr-2007 09:58:09] PHP Notice: Undefined variable: XML_RPC_String in /var/www/eventum-1.7.1/rpc/xmlrpc.php on line 156 [11-Apr-2007 09:58:09] PHP Warning: Header may not contain more than a single header, new line detected. in /var/www/eventum-1.7.1/include/pear/XML_RPC/Server.php on line 394 [11-Apr-2007 09:58:10] PHP Notice: Undefined variable: XML_RPC_erruser in /var/www/eventum-1.7.1/rpc/xmlrpc.php on line 50 [11-Apr-2007 09:58:10] PHP Warning: Header may not contain more than a single header, new line detected. in /var/www/eventum-1.7.1/include/pear/XML_RPC/Server.php on line 394

I can further pinpoint the issue to be related to the undefined variables in the authenticate method by bypassing the method:

When I change the authenticate method to simply

function authenticate($email, $password) { createFakeCookie($email); return true; }

then the CLI works.

I'm not sure where to make XML_RPC_String global, or to import it into the scope of this function. Does Eventum require that register globals be 'on'?

Figuring this must be fixed in some newer version of the code, I've tried to pull code from the svn browser to see how this particular file might be updated, but the svn browser errors with 'Bad Gateway!' http://svn.mysql.com/fisheye/browse/eventum-gpl Bad Gateway!

The proxy server received an invalid response from an upstream server.

The proxy server could not handle the request GET /fisheye/browse/eventum-gpl.

Reason: Error reading from remote server

If you think this is a server error, please contact the webmaster. Error 502 svn.mysql.com Wed Apr 11 16:31:54 2007 Apache/2.2.3 (Linux/SUSE)

I did pull down a copy of the 2.0-Beta 1 and compared the xmlrpc files. There are some differences, but nothing in the area this bug is concerned with. At this point I can only assume that I must turn on register_globals. Any advice?

Thanks