Tomcat setup on Amazon Web Services (AWS)

Assumptions:

1. Steps are being done on a Unix box (e.g. Mac or linux). Similar steps can also be followed from a Windows machine but will obviously be different and will require additional apps (e.g. ssh clients) to be installed.

 

Prerequisites:

1. AWS account

2. EC2 instance running some linux flavour (64bit Amazon Linux was used in this case)

3. Have the PEM file that  you received when setting up the EC2 instance

(more…)

Read More

Setting up short urls for Mediawiki

Assumptions:

1. You have already installed Mediawiki on your Apache server on a linux box.

2. Mediawiki is installed in the folder called ‘w‘ e.g. /var/www/html/w

 

Prerequisites:

1. The folder in which Mediawiki is located should have any other name except ‘wiki‘. Preferably would be named ‘w‘ or some other short name.

2. You must have access to your ‘httpd.conf‘, ‘/var/www/html‘ and the ‘w‘ folder.

(more…)

Read More

Using SFTP on FileZilla to access AWS EC2

Assumptions:

1. Steps are being done on a Unix box (e.g. Mac or linux). Similar steps can also be followed from a Windows machine but will obviously be different and will require additional apps (e.g. ssh clients) to be installed.

 

Prerequisites:

1. AWS account

2. Have the PEM file that  you received when setting up the EC2 instance

3. FileZilla Client Software is installed on your machine

 

(more…)

Read More

PHP Fatal error: Class ‘DOMDocument’ not found (LocalSettings.php not found.)

Problem:

Navigating to the index page of Mediawiki results in the message below being shown:

LocalSettings.php not found.

Please set up the wiki first.

Clicking on the link just leads to a blank page. Subsequently, an error message like the one below will be logged to /var/log/httpd

PHP Fatal error:  Class 'DOMDocument' not found in /var/www/html/w/includes/cache/LocalisationCache.php on line 650, ...

 

Quick Solution:

Install the php-xml module to your machine  and restart the Apache server.

yum install php-xml
service httpd restart

 

Read More

Setting up WordPress and Mediawiki on Amazon Web Services (AWS)

Assumptions:

1. Steps are being done on a Unix box (e.g. Mac or linux). Similar steps can also be followed from a Windows machine but will obviously be different and will require additional apps (e.g. ssh clients) to be installed.

 

Prerequisites:

1. AWS account

2. EC2 instance running some linux flavour (64bit Amazon Linux was used in this case)

3. Have the PEM file that  you received when setting up the EC2 instance

(more…)

Read More

JQuery events stop working after an AJAX request?

Problem:

When using JQuery for the client side scripting, events defined for elements that will appear after an Ajax request fail to execute.

Cause:

The primary reason why the events stop working is because they are registered for elements that currently exists not for elements that will appear later on after an Ajax request.

Solution:

The work around to this is to use the JQuery ”.on()” method. For example,

Original event code:

 

$("a.mymoto").click(function(){ alert("I am the greatest!"); });

 

Refactored event code:

 

$(document).on("click", "a.mymoto", function(){ alert("I am the greatest!"); });

Read More