PHP Fatal error: Class 'DOMDocument' not found

The above error is appears to be a common occurrence when you upgrade your Mediawiki installation from version 1.11 to 1.12. To fix this you need to have your system administrator do the following:

yum -y install php-xml
service httpd restart

The installs the XML modules into PHP. Restarting httpd allows the web server, in this case Apache, to load the new modules.

This solution came from the Mediawiki Support Desk.

Share

WordPress Permalinks

Since I setup the webserver myself, I have total control. Because of this, there are occasional permission issues that I run into. Yesterday this happened with WordPress Permalinks.

To change Permalinks, you do so under Control Panel -> Options -> Permalinks. The best choice is Date and Name based, This is better for SEO (Search Engine Optimization). Unless you are familiar with wordpress paramaters, I would stay away from the custom choice.

Once you choose the option you want click “Update Permalink Structure”. You should see a message at the top saying “Permalink structure updated.” My first issue was that the .htaccess file was not writable. You can read more about these at httpd.apache.org/docs/1.3/howto/htaccess.html. I won’t get into the discussion of whether these files are good or bad at this time. Simply put they are required for wordpress blogs if you do not control your own server.

.htaccess files (or “distributed configuration files”) provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof.

I created the .htaccess file in my root web directory and make it writable by the web server, i.e. on linux it is 664. This time when I clicked update the file was saved and the Rewrite Rules were written into the .htaccess file. Here is a sample of what it wrote:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

I still had a problem though. The permalinks still did not work. Since I was controlling the apache configuration I tend to keep it more locked down. So I went to my configuration include file for this domain and made the following additions:

Options Indexes FollowSymLinks
AllowOverride FileInfo Options

These were added inside the tags. I then restarted the apache service. Everything now worked.

I am planning on taking you through the entire process of setting up WordPress and even a web server as I have time.

Share