using my library method in XML-RPC |
[eluser]kylehase[/eluser]
Getting the following error when trying to use a method in my library from XML-RPC. PHP Fatal error: Call to undefined function: test() in /system/libraries/Xmlrpcs.php on line 324 XMLRPC server code Code: <?php Accountmgr code (Accountmgr.php in system/application/libraries) Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
[eluser]kylehase[/eluser]
Fixed syntax in post above but that wasn't the problem.
[eluser]Seppo[/eluser]
That's funny... lines 325-327 are commented... I tried uncommenting them and commenting lines 323-324 and it works... I'm not sure if it's a bug or an intended behaviour, or the method must be defined inside the controller and the docs wasn't updated...
[eluser]kylehase[/eluser]
I saw those commented lines as well and thought that I had done that (though I rarely ever change core code) so I re-downloaded 1.6.1 to verify that those // are in the original code. Assuming that the core code was right and I was wrong, I didn't try uncommenting it.
[eluser]Derek Jones[/eluser]
Added an 'object' key to the XML-RPCS config that should take care of the problem. If you care to test it, it is available in the svn.
[eluser]Elliot Haughin[/eluser]
I think there is still an issue loading methods from another controller. I get 'not valid method' error using this code: Code: <?php and controllers/posts.php: Code: <?php
[eluser]Derek Jones[/eluser]
I replied to the bug tracker as well, but for sake of continuity: The object that you feed to $config[’object’] needs to be an instantiated class object that is callable via $OBJ->method_name(), so if you are feeding it $this, it would have to be a method within that class, in this case, the Api class. Make sense?
[eluser]Derek Jones[/eluser]
Just checking up to see if you've gotten this working, Elliot?
[eluser]kylehase[/eluser]
I've upgraded my project to 1.6.2 but it looks like this fix did not make that release. I haven't tried the SVN release yet.
[eluser]Derek Jones[/eluser]
The aforementioned fix is indeed in 1.6.2. http://dev.ellislab.com/svn/CodeIgniter/...mlrpcs.php |
Welcome Guest, Not a member yet? Register Sign In |