using my library method in XML-RPC - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: using my library method in XML-RPC (/showthread.php?tid=7566) Pages:
1
2
|
using my library method in XML-RPC - El Forum - 04-15-2008 [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'); using my library method in XML-RPC - El Forum - 04-15-2008 [eluser]kylehase[/eluser] Fixed syntax in post above but that wasn't the problem. using my library method in XML-RPC - El Forum - 04-15-2008 [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... using my library method in XML-RPC - El Forum - 04-15-2008 [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. using my library method in XML-RPC - El Forum - 05-08-2008 [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. using my library method in XML-RPC - El Forum - 05-17-2008 [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 using my library method in XML-RPC - El Forum - 05-17-2008 [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? using my library method in XML-RPC - El Forum - 05-22-2008 [eluser]Derek Jones[/eluser] Just checking up to see if you've gotten this working, Elliot? using my library method in XML-RPC - El Forum - 05-22-2008 [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. using my library method in XML-RPC - El Forum - 05-22-2008 [eluser]Derek Jones[/eluser] The aforementioned fix is indeed in 1.6.2. http://dev.ellislab.com/svn/CodeIgniter/tags/v1.6.2/system/libraries/Xmlrpcs.php |