Cant detect SimpleXML

Pre-requisites, Installation Instructions and Implemenation Assisstance
Post Reply
au_chrismor
Posts: 1
Joined: Wed Jun 24, 2020 2:47 pm

Cant detect SimpleXML

Post by au_chrismor » Wed Jun 24, 2020 2:52 pm

We're installing 4.3.5 (also tried 4.4) on CentOS 7 with PHP 7.3, and the installer fails to detect SimpleXML.

The modules are enabled and are reported by a call to phpinfo(), and in spite of a complete re-installation I still get:

SimpleXML status Disabled. SimpleXML, libxml and xml PHP libraries are required.

But everything else is green.

Can I turn up any logging, etc to understand what is going wrong?

rajitha
Posts: 32
Joined: Tue Feb 11, 2020 9:54 am

Re: Cant detect SimpleXML

Post by rajitha » Tue Jun 30, 2020 4:10 am

Hi,
Can you check loaded modules by running php -m
In my environment below XML related libraries are enabled. Your environment should have SimpleXML(https://www.php.net/manual/en/book.simp ... .simplexml), libxml(https://www.php.net/manual/en/book.libx ... ook.libxml).

[PHP Modules]
...
libxml
...
SimpleXML
...
xml
xmlreader
xmlwriter
xsl


If your problem not resolved you can remove validation from this file <OrangeHRM>/installer/environmentCheck/SystemValidator.php
Find in that file

Code: Select all

public function isSimpleXMLEnabled()
{
        if (
            $this->hasExtensionEnabled('SimpleXML') &&
            $this->hasExtensionEnabled('libxml') &&
            $this->hasExtensionEnabled('xml')
        ) {
            return true;
        } else {
            return false;
        }
}
and replace with

Code: Select all

public function isSimpleXMLEnabled()
{
       return true;
}
But this is not recommended for production.

Post Reply