Moodle 1.4.1 giving errors with PHP 5.0.2

Re: Moodle 1.4.1 giving errors with PHP 5.0.2

by Martin Millmore -
Number of replies: 0

I have done a lot of debuging, and found a solution. I am sharing the solution here in case anyone else needs it in future.

I would also appreciate it if anyone could shed some light on why this works - it seems wrong to me, and I still wonder if my service provider has set up their system wrong.

The problem is with adodb. In the file lib/adodb/adodb.inc.php, there are the following lines;

 if (PHP_VERSION < 5) include_once(ADODB_DIR.'/adodb-php4.inc.php');
 else include_once(ADODB_DIR.'/adodb-iterator.inc.php');

I commented out these 2 lines, and replaced it with just the PHP4 import;

include_once(ADODB_DIR.'/adodb-php4.inc.php');

and it now works fine again.

What I don't understand is why it works on PHP5 with the PHP4 import, but not the PHP5 import. Does this mean that there is some problem inconsistency on the server, or does it just mean that adodb is not really compatible with PHP5? If it's the server one, I would like to be able to beat up my service provider about it smile