External db enrolment stopped working on 1.8.2 upgrade - help?

External db enrolment stopped working on 1.8.2 upgrade - help?

by Roger Emery -
Number of replies: 1
We've recently upgraded from 1.7.2 to 1.8.2+

The 1.7.2 has the external db enrolment working perfectly.
On 1.8.2 it doesn't!
The TNS names have been checked,
All the enrol settings are exactly the same (have checked a dozen times)
I;ve downloaded againt he latest set of enrol code and also accesslib.php just in case.

Only difference is that I'm getting this error messgase below on the 'my' page.

Any help gratefully received as I had enough problems getting this working in 1.7!!
Roger

Errors on my page and Code:

Notice: Trying to get property of non-object in /var/www/moodle/lib/accesslib.php on line 600

Notice: Trying to get property of non-object in /var/www/moodle/lib/accesslib.php on line 725

Notice: Trying to get property of non-object in /var/www/moodle/lib/accesslib.php on line 600

Notice: Trying to get property of non-object in /var/www/moodle/lib/accesslib.php on line 725

which relates to this code

case CONTEXT_BLOCK:
// not necessarily 1 to 1 to course.
$block = get_record('block_instance','id',$context->instanceid);
LINE 600 if ($block->pagetype == 'course-view') {
$courseinstance = get_context_instance(CONTEXT_COURSE, $block->pageid); // needs check
$parentcats = get_parent_cats($courseinstance, CONTEXT_COURSE);


and

case CONTEXT_BLOCK: // not necessarily 1 to 1 to course
$block = get_record('block_instance','id',$context->instanceid);
LINE 725 if ($block->pagetype == 'course-view') {
$parentcontext = get_context_instance(CONTEXT_COURSE, $block->pageid); // needs check
} else {
$parentcontext = get_context_instance(CONTEXT_SYSTEM);
}
$permission = capability_search($capability, $parentcontext, $capabilities, $switchroleactive);
break;



Average of ratings: -
In reply to Roger Emery

Re: External db enrolment stopped working on 1.8.2 upgrade - help?

by Roger Emery -
just to add to the above, I have checked my php info and noticed that on the 1.7x working build and 'Active Persistent Connections' and 'Active Connections' both register as 1 but on my 1.8x build these are registered as 0.

Does this indicate that the connection is not even opening?
I have ticked the box in the enrolment screen and have checked the settings are exactly the same.