I have two Moodle-Sites on the same server (i.e. same IP), but with different domains. I followed the instructions (several times), but whenever I click on the remote servers name in the network block I get the following error (on both sites):
RPC auth/mnet/user_authorise:Payload not encryptedERROR 1:1:Payload not encrypted
Moodle: 1.8.2+, exactly the same version for both sites
Server: Linux, Apache, MySQL 4.1.22, PHP 4.4.4
I read all the other threads in this forum, in two of them the same error was mentioned, but no solution. Unfortunately not that many people seem to be testing MNET, but help would really be appreciated!
Paul
RPC enrol/mnet/available_courses:ERROR 1:Payload not encrypted
when I try to enrol users in remote courses.
You say that you get this error when you try to enrol users in remote courses... does that mean that the earlier stages of MNet setup all worked ok?
If that's the case then all the criteria on this page:
/admin/environment.php
...should be reporting Status: Ok.
So... when you get to this page:
/admin/mnet/mnet_services.php?step=list&hostid=3
...you should see a 'tick' symbol beside at least one of the Publish or Subscribe options for Moodle Networked Enrolment.
It will be really useful for me to know if you can see a tick beside either of these options on either of your hosts.
(Note - in the URL above, I'm guessing the hostid to be 3, which is the default for the first new host that you add to your site.)
When you visit this page at each of your Moodle hosts:
/admin/mnet/peers.php?step=update&hostid=3
...can you make sure that you don't get the message "The public key you are holding for this host is different from the public key it is currently publishing." This message is usually accompanied by another public key printed underneath.
Sorry that MNet isn't working cleanly for you - I'd really appreciate your help in diagnosing this problem!
Thanks - Donal
I checked everything you mentioned on both servers - ticks everywhere, everything seems fine. Unfortunately I cannot change to PHP5, currently I've got PHP4.4.4
As I mentioned there are two similar errors:
When a user tries to roam to the other server, I get the "Payload not encrypted" with auth/mnet/user_authentication.
When I as an admin I try to enrol users in remote courses, I get the "Payload not encrypted" with enrol/mnet/available_courses.
Up to those two points everything worked just as mentioned in the docs.
And btw, I'm not frustrated but I'm really looking forward to MNet working also on my servers!

Paul
Unfortunately no progress! I set up a third moodle in the meantime and tried to connect it to either of the two, but I still get the same error messages ("payload not encrypted") on any of my moodles.
I learned quite a lot by my investigations into the code and even found where the error message is triggered, but I'm still far too clumsy afa PHP is concerned to find WHY the error message is triggered.
So I'm still hoping for help!
Paul
Paul
Can you confirm that you're seeing ticks (actually the square-root symbol) beside the service names, as shown in the attached image?
I just realised that what I wrote earlier could be mistaken for the ticks in the checkboxes themselves.
The reason I'm asking is that it would be really strange if you're seeing those square-root signs, but still getting the 'not encrypted' error.
Thanks!
Donal

Hi Donal,
you're right, I misunderstood. There are no ticks!
Paul
I upgraded to 1.8.3 today but nothing changed. I still get the same errors (payload not encrypted).
Paul
Thanks
Tim Brown
Sorry it was a typo - we are at 1.9.3 now - not 1.9.2 - I would love to know the solution to this!
Thanks
Tim
You may want to try turning debugging on to see if an error is being generated.
=M
I-ve got this error message Payload not encrypted when I work with my 2 peers
I could't see the "tick symbol beside at least one of the Publish or Subscribe options for Moodle Networked Enrolment"
What's wrong?
Moodle 1.8
:-?
___
ramon loureiro
as you could see, I had the same problem. After discovering a file permissions problem when connecting wordpress to flickr, I had an idea, which helped.
I put a .htaccess file with
<Files client.php>
SecFilterInheritance Off
</Files>
<Files server.php>
SecFilterInheritance Off
</Files>
<Files xmlparser.php>
SecFilterInheritance Off
</Files>
into my public_html directory and the ticks were there and roaming is now possible. I'm quite sure that not all three files need to be mentioned in the .htaccess but I didn't have time for testing up to now. If this works for you maybe you can find it out and tell me.

Paul
Thanks for the response.
But nothing new has happened with this .htaccess file.

In fact, before changing that, one of the peers was showing me the ticks BUT with that file I've loose them!
BTW, what exactly the system checks to put the tick?
Ramon
<Files xmlparser.php>
SecFilterInheritance Off
</Files>
is not necessary.
Paul
I can't fix the problem for you but I might be able to point you in the general direction if you feel confident delving into code. This error generally occurs because the message (payload) from the remote server has had something added, usually but a php echo statement. This causes the above error because all content returned must be encrypted and when it's output outside the usual boundaries the message contains both encrypted and non encrypted text.
Fixing this issue is the fun (aka awkward) part because you need to find out which line of code causes the issue. The main way I address this is to knock up a dev page which calls the necessary function and outputs its response so I can see what is being returned. Then I comment out or short circuit parts of the code until I narrow down which parts are causing the issue to a few lines. Once I know the lines causing the error it often becomes obvious.
any way I hope this provides some clarity if only a little.

Thanx a lot, Colin, nevertheless. I'm afraid, my coding skills are not really adequate for this. And I do not yet know how to make this function spit out its response in a visible form, but at least I have something like an aim now.
What I wonder, if it is something like a bug in the code, how can MNET be working with all the other people testing or using it? Or is noone?
Paul
Hi Paul,
I am receiving the same error "RPC .... payload not encrypted" and thought it resolved when I realized that the machine moodle is on didn't actually have the proper domain name. (during development I used an IP so it was a non-issue). Did you have any luck yet?
I must have introduced another error as I stopped receiving the above and when trying to go to the networked server:
RPC auth/mnet/user_authorise:User with ID 0 attempted to call unauthorised method auth/mnet/auth.php/user_authorise on hostERROR 7:7:User with ID 0 attempted to call unauthorised method auth/mnet/auth.php/user_authorise on host
which I isolated to a line in auth/mnet/land.php where $remotewwwroot was set but the value was in my query string for 'idp', mind you it was "localhost" which I don't think was correct but am unsure where that was set.
anyone with ideas for us?
Thank you,
Heather
The error you're reporting only occurs at that point in the code where Moodle checks to see what you've enabled.
I think that MNet is causing frustration for people who are having problems with it, because it's pretty difficult to diagnose exactly what's going wrong. This is partly because there are so many different elements that could break, and it's partly because the error reporting could be a lot better.
In testing, MNet works for me 100% of the time.... even when I'm demoing it to clients!
It's worth noting that I've done all my development and most of my testing on PHP5, and I'd recommend that you use PHP5 if you have the choice. I know that lots of Moodle users are unable to do that, and we certainly don't try to exclude PHP4 users, but PHP5 is the most used and tested configuration, both for MNet and (I think) other parts of Moodle core.
It's worth noting that I've done all my development and most of my testing on PHP5
Don't beat yourself about it - it's not that bad In fact. I was doing my part of the coding mostly on PHP4, and actually we regularly demo mnet on PHP4. My coding on mnet was mostly at the beginning of the project, but we've kept demoing it regularly, so we would have seen any serious PHP4 gotcha.
There are several things that can go wrong. Sometimes it's hard to diagnose what is misconfigured, but once everything is in its right place... mnet in itself just works.
Heather - I posted a couple of weeks ago explaininig a few network configuration issues that can make mnet fail. Might be a good idea to check other discussion threads and see what solutions and diagnostics we suggested to other people who were seeing trouble.
it's me again. I updated two of my sites (my production site to 1.8.3+ and my test site to 1.9 beta 2). I still get no ticks next to the checkboxes of the peer services and when I try to roam from one of those sites to the other one (either way it's the same) I get the following (new) error message:
RPC auth/mnet/user_authorise:XML Parse error in payload: syntax error At line number: 1 Which reads: ERROR 3:3:XML Parse error in payload: syntax error At line number: 1 Which reads:
Any ideas? I'm beginning to think that mnet just doesn't want me as much as I want it!
Paul
mnet is still not working for me. Is it possible that my provider's opsenssl version (OpenSSL 0.9.7a Feb 19 2003) is just too old for mnet? It seems a bit outdated to be, but my moodles both report o.k. for openssl.
To be honest, I still got no idea why I get
RPC auth/mnet/user_authorise:XML Parse error in payload: syntax error At line number: 1 Which reads: ERROR 3:3:XML Parse error in payload: syntax error At line number: 1 Which reads:
Paul
Hi again,
there is not much change so far. In the meantime I updated to PHP 5.2.4, but when I try to roam from one site to the other I still get:
RPC auth/mnet/user_authorise:XML Parse error in payload: SYSTEM or PUBLIC, the URI is missing At line number: 1 Which reads: ERROR 3:3:XML Parse error in payload: SYSTEM or PUBLIC, the URI is missing At line number: 1 Which reads:
(which is just a little bit different from what I got lately)
I also want to mention, that my Moodles do not update their public keys when validity is over. Maybe this is a hint for anyone willing to help me????
Although so far noone seems to be able to help me, I will go on writing about my experiences - for the sake of documentation
Paul
Btw, if you wanna have a look at my current server php configuration, check this!
I don't know if you have solved the problem your were having back in January (if so, it would be interesting to know how), but I see that you are using the Zend Optimizer on your site. I've seen this cause problems before with some parts of Moodle ... can you try disabling it to see if it fixes the problem?
Mat