Hi there,
First of all, thanks for making this api. It can be very usefull to me. However I run into a problem. If I just use the plain example from http://www.craigbras...-example-usage/ and change the username, pass and the require to the right info, I keep on getting the error:
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback
I'm sure the require is pointing in the right direction. I did had to use the full url since it's located on a subdomain (is that the problem maybe?)
Actually when I tried using SOAP it gave me a likewise error. It couldn't find the 'nusoap_client($url, 'wsdl')' class. Again all directions to the files are correct. I checked this by putting an invalid markup in the requested document. When you load it it will then also give an error on this invalid markup, proofing that the required file is loaded.
I just don't understand why it can't find the class in soap and why I get the error above in native php...
Ow and yes, I did set the config file but with these errors it doesn't even make it that far...
Any ideas?
Thanks in advance,
Ricky
Page 1 of 1
call_user_func_array() [function.call-user-func-array] error
#2
Posted 21 November 2009 - 01:48 PM
ricky, on 20 November 2009 - 05:20 PM, said:
I'm sure the require is pointing in the right direction. I did had to use the full url since it's located on a subdomain (is that the problem maybe?)
By that, do you mean you had to use something like this..?:
require "http://subdomain.example.com/helpdesk/integrationapi/lib/api.class.php";
If so, that won't work at all, no. The web server on subdomain.example.com will pass api.class.php to the PHP interpreter, and return the result of that (i.e. probably an empty string, since that file contains no echo statements or similar) to the PHP interpreter running your API-reading code, so you'll basically just be "require"ing an empty file (see the notes around Example 3 on the PHP "include" documentation). Try pointing your web browser to http://subdomain.exa...b/api.class.php (change that URL to fit your circumstances); what you see displayed is what your API client is including, which is likely absolutely nothing
I should remind you that the native PHP class method doesn't work properly on anything but the simplest of sites, so you'll need to be using the SOAP method, most likely. Try the SOAP method, but, for the same reasons as stated above, you'll have to make sure that the nusoap directory is directly accessible to your API client file, which in your case will likely involve you uploading the entire /integrationapi/ directory to your /helpdesk/ directory, and just the /nusoap/ directory to wherever you're running your API client.
Hope this helps.
Andrew Gillard
Lead Developer - Craig Brass Systems
Lead Developer - Craig Brass Systems
#3
Posted 21 November 2009 - 03:41 PM
Hi Andrew,
Thanks for your reply! As a moderate php developer and quite of a newbie to api's (never had to use any until now) I was already expecting a stupid failure from my side. Uploaded the nusoap folder to the folder where my php's are and now it works like a charm ;-) I'm now going to modify it to my needs. I don't hope I will need help again, but it wouldn't suprise me. The documentation to it is at least very good, so I don't expect to run in to troubles with that.
Don't know if you use a system like it, but this one can be marked as solved!
Thanks again!
Ricky
Thanks for your reply! As a moderate php developer and quite of a newbie to api's (never had to use any until now) I was already expecting a stupid failure from my side. Uploaded the nusoap folder to the folder where my php's are and now it works like a charm ;-) I'm now going to modify it to my needs. I don't hope I will need help again, but it wouldn't suprise me. The documentation to it is at least very good, so I don't expect to run in to troubles with that.
Don't know if you use a system like it, but this one can be marked as solved!
Thanks again!
Ricky
#4
Posted 21 November 2009 - 05:02 PM
Glad to hear it's fixed! I'm happy to help people with any problems they have with the API.
It was better before the forum upgrade from IPB 2 to IPB 3 broke all of our nicely-styled posts
ricky, on 21 November 2009 - 03:41 PM, said:
The documentation to it is at least very good
It was better before the forum upgrade from IPB 2 to IPB 3 broke all of our nicely-styled posts
Andrew Gillard
Lead Developer - Craig Brass Systems
Lead Developer - Craig Brass Systems
Share this topic:
Page 1 of 1
Sign In »
Register Now!
Help

Back to top








