Page 1 of 1

Module Manager error (CMSMS 1.10.)

Posted: Fri Nov 04, 2011 1:17 pm
by urheat
I have a clean 1.10 installation.

If I look at Module Manager, I can't see the listing of availabe modules. In Admin Log there is:

Code: Select all

ERROR DETECTED: Call to undefined function json_decode() at /var/www/html/modules/ModuleManager/lib/class.modmgr_utils.php:463
If I try to install a module via XML-file, nothing happes and Admin Log says:

Code: Select all

ERROR DETECTED: Class 'XMLReader' not found at /var/www/html/lib/classes/class.moduleoperations.inc.php:217
I've cleared CMSMS and browsers cache.

Everything else seems to work fine...

Re: Module Manager error (CMSMS 1.10.)

Posted: Fri Nov 04, 2011 2:22 pm
by calguy1000
This means your PHP version is either too old, or customized without some key and important libraries. You should contact your host.

Re: Module Manager error (CMSMS 1.10.)

Posted: Fri Nov 04, 2011 2:55 pm
by urheat
Thanks!

The PHP version is 5.2.8.

Re: Module Manager error (CMSMS 1.10.)

Posted: Fri Nov 11, 2011 9:30 pm
by jaslorax
Was there a change to the code regarding the parsing of XML in the last few iterations of CMSMS?

I'm not certain when it stopped working for me - I believe it to be recent, like 1.10 . . . I am currently on 1.10.1 with PHP 5.2.14, which is supposed to have the XML function enabled by default - I have my host looking into it but they haven't found anything yet.

My error in the CMS log:
ERROR DETECTED: Class 'XMLReader' not found at /www/lib/classes/class.moduleoperations.inc.php:217

In the Error Log:
PHP Fatal error: Class 'XMLReader' not found in /www/lib/classes/class.moduleoperations.inc.php on line 217, referer: http://www.x.com/admin/moduleinterface. ... uleManager

My system info in the CMS shows all green including the following line:
Basic XML (expat) support (xml_function) Success On (True)

Any thoughts or ideas?

I tried this simple code and got the same error:

Code: Select all

{php}
$xml = XMLReader::open('test.xml');

// You must to use it
$xml->setParserProperty(XMLReader::VALIDATE, true);

var_dump($xml->isValid());
{/php}

Re: Module Manager error (CMSMS 1.10.)

Posted: Fri Nov 11, 2011 9:34 pm
by calguy1000
The XMLReader class is a class that is included with PHP on standard installs of PHP since PHP 5.1.2

See here: http://www.php.net/manual/en/xmlreader.open.php

If your system does not support it, then your host is using a custom compile of PHP (this is supposed to be standard, so we don't even check it in the installer). I suggest you contact your host.

Re: Module Manager error (CMSMS 1.10.)

Posted: Fri Nov 11, 2011 10:08 pm
by jaslorax
Thanks for the reply - I understood that part and do have my host looking into it; but as it used to work for me I was wondering if there was a change in the way the module manager/module xml upload parses those files in the last year or so - did it use a different class before (besides XMLReader)?

Re: Module Manager error (CMSMS 1.10.)

Posted: Fri Nov 11, 2011 10:12 pm
by calguy1000
ModuleManager got a significant overhaul in CMSMS 1.10 ... it's in the release notes.

Re: Module Manager error (CMSMS 1.10.)

Posted: Fri Nov 11, 2011 10:19 pm
by jaslorax
OK, thanks calguy1000 - I know I read it, but it must not have stuck . . .

;)

For anyone else interested here are the relevant notes:

ModuleManager (and it’s partner server component ModuleRepository) have been significantly revised to use a RESTFUL interface rather than a SOAP interface (sorry for the geek talk). Which results in a dramatic reduction in memory requirements for downloading modules from our forge. Additionally, the XML parsing functionality has been rewritten to use memory more optimally, and there are functionality improvements as well. As a side benefit to this effort we were able to completely remove the nuSOAP module from our distribution.

Full release info here: http://forum.cmsmadesimple.org/viewtopic.php?t=57370

Re: Module Manager error (CMSMS 1.10.)

Posted: Sat Nov 19, 2011 3:54 pm
by proboscidian
What is the minimum PHP version? I am using 5.2.13 and getting the same error as in the first post:
ERROR DETECTED: Call to undefined function json_decode() at /var/www/html/modules/ModuleManager/lib/class.modmgr_utils.php:463
but I am able to install modules with the xml file without any problems.

Re: Module Manager error (CMSMS 1.10.)

Posted: Sat Nov 19, 2011 6:36 pm
by proboscidian
I upgraded to PHP 5.3, and it worked - but then a lot of other things on the server didn't (seems to have something to do with ioncube loaders) so until I get that straightened out I guess I'm stuck uploading modules through xml.