DOM Error

Viewing 3 posts - 1 through 3 (of 3 total)
  • #22609
    sean.donoahue
    Participant

    Hi,

    I am trying to get this theme working and I am seeing this error when I try to load a page:

    Fatal error: Class ‘DOMDocument’ not found in /web/www/html/ourpower/wp-content/themes/enlightenment/core/functions/general.php on line 121

    Any ideas on how to fix this so that the theme works properly?

    If it helps at all the visual editor seems to brake when I activate this theme as well.

    Thanks,

    #22610
    Daniel Tara
    Keymaster

    That error it is because of your host server and not because of the theme. DOMDocument is a standard PHP class, you can read more about it here. If you get the error that it is not available it means your hosting provider deliberately disabled that class.

    If you have root access to your server, enabling it is pretty straightforward:

    For Debian, Ubuntu and other .deb based distributions:

    apt-get install php5-dom

    For RedHat, CentOS, Oracle Linux and other .rpm based distributions:

    yum install php-xml

    If you’re in a FastCGI environment, you need to restart the service after this:

    service php-fpm restart

    If you don’t have root access to your server you will need to ask your hosting provider to enable it for you. If you are on a shared hosting plan I doubt they will agree to do it and the only solution is to change your hosting provider.

    This is the first time I’m hearing of a PHP installation where the DOMDocument class had been deliberately disabled. I have made a mental note of this and will perform some checks in version 2.0 to avoid the theme from throwing a fatal error.

    #22611
    sean.donoahue
    Participant

    Hey

    Thanks for the quick response – I did some more Googling after I posted this and managed to figure out that I was missing the php-xml. We are hosting wordpress on our own Red Hat machines and had 4 or 5 other php packages installed but not this one.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.