Sorry, I think this is a mistake on my part.
I am trying to convert a local plugin from Moodle 1.9 to Moodle 2. One of the scripts includes "/pear/HTML/AJAX/JSON.php", which in turn tries to load the missing file.
I'm told that Moodle 2 is PHP5 only, so the built in jason_encode() function should be available for all Moodle2 users. In turn, that means I don't need to include "/pear/HTML/AJAX/JSON.php" – thus the missing file doesn't matter. Indeed, I since commented out the require_once line for that file, and it's working fine with PHP's built-in json_encode.
However, it does beg the question as to why the old PHP4 JSON compatibility file is still there if it shouldn't be used. I suppose it should be removed, as well as the other file that's already gone, thus breaking it anyway.
I'm not sure if this is related, but I noticed on the latest update to 1.8.6 (October 8th) that when you tried to go to groups, there was an error message (with debug on):
Warning: require_once(HTML/AJAX.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/moodle-18/lib/pear/HTML/AJAX/JSON.php on line 14
I remarked out line 14 and then 776-801 in JSON.php, and groups worked. I'm not sure why it is asking for AJAX.php, but no such file exists. I assume it means just the directory HTML/AJAX?
I found this on a few client machines and my test server.