Closed (fixed)
Project:
Services
Version:
6.x-2.0-beta1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Feb 2010 at 23:12 UTC
Updated:
25 Feb 2010 at 15:47 UTC
I have implemented a version of the php node.save example at http://drupal.org/node/585014 (I just needed to remove "new xmlrpcval($sessid)" from user.login as otherwise the login failed and the lines for extra content fields). Unfortunately though I get access denied. I've enabled all of the content creation and access permissions, along with service ones, and tested the role with an admin and non-admin user. I've tried both the dev and beta versions of services with drupal 6.15. I'm using xmlrpclib 3.0.0.beta.
An error occurred on node.save: Access denied
Any help would be greatly appreciated.
Comments
Comment #1
P.Smith commentedI was able to create a node using node.save in the browser (through drupal's interface).
I used the following serialized php (same fields as what the xmlrpc client is trying to send):
But there is a message (also happens when using JSON too):
I'm not sure if this is related or helps in anyway?
Comment #2
P.Smith commentedThe access denied occurs when the following is placed into the service browser (it's the contents of $access_arguments):
The code from services.module:
If I reduce the contents of $access_arguments to:
then it works. What was removed from the beginning:
a:2:{i:0;s:32:"6f20cebece2192b9ce6c8f036a10c12a";i:1;removed from the end:
}Comment #3
P.Smith commentedThe problem on line3 148 does indeed not appear to be related. See: http://drupal.org/node/710590
I made the changes but still getting access denied. The module doesn't like the contents of $sessid?
Comment #4
waldmanm commentedNot sure if this will help, but if you're using an API key, make sure you enable node.save in that key configuration. That bit me once.
Comment #5
Maitreya commentedAlso check whether the client you run on has the same time/date as the service server. I had a different timezone and thus my sessions always expired.
Comment #6
P.Smith commentedHi,
I don't use a key. I'm in a different time zone but I can't really change that on the server (it's shared hosting).
This can be closed. No idea why the beta version won't work but the last stable one does using the very same client code.