A lot of clients request having an accessibility checker function within Sitecore, so i thought i’d add another optional step in this series of blogs on Sitecore PaaS.
The Accessibility Checker module for sitecore (https://marketplace.sitecore.net/en/Modules/A/Accessibility_Checker.aspx) is a modified version of the achecker website (http://achecker.ca/checker/index.php) that you’ll need to install on a server. It requires PHP and MySQL, so your options in Azure are to either spin up a linux VM and install the LAMP stack or to use a Web App with MySQL Azure.
I’ll cover the Web App approach here:
1) Login to Azure and select the Browse option in the left hand menu
2) Search for MySQL and install an instance of it.
3) Create a new Web App; ensure that you have PHP version 5.4 set.
4) Download the achecker TAR file from here to get the base achecker website:
http://www.atutor.ca/achecker/download.php
5) FTP into the Web App and upload the base achecker website under wwwroot folder.
6) Download the “Achecker API enhancements“ from the Sitecore marketplace (https://marketplace.sitecore.net/services/~/download/CD83ED46D91D4BE89932917B5C02DB67.ashx?data=achecker&itemId=e312134a-b6c4-422d-8b39-42b1b0407154)
7) Upload these “Achecker API enhancements“ files into the Web App.
8) Achecker by default expects you to have mySQL installed on the same server; to get around this you will need to update the connection strings in these two files of the root of the web app:
dump_schema.php
dump_lang.php
9) Change dump_schema.php as follows:
$host = ‘yourmysqlHostname.cloudapp.net:3306’;
$mysql_user = 'yourmysqlUser’;
$mysql_password = 'yourmysqlPassword’;
$db = 'yourmysqlDatabaseName’;
10) Change dump_lang.php as follows:
$lang_db = mysql_connect('yourmysqlHostname.cloudapp.net:3306’,
'yourmysqlUser’, 'yourmysqlPassword’);
mysql_select_db('yourmysqlDatabaseName’, $lang_db);
11) Open the Install/index.php file and turn off the SQL checks by commenting out the $no_good = TRUE in these two places:
<td><kbd>mysql</kbd></td>
<td><?php if (extension_loaded('mysql’)) {
echo 'Enabled</td><td align=“center”>’;
echo $good;
} else {
echo 'Disabled</td><td align=“center”>’;
echo $bad;
//$no_good = TRUE;
} ?></td>
and also here:
<td>MySQL 4.1.10+</td>
<td><?php if (defined('MYSQL_NUM’)) {
$mysql_version = mysql_get_client_info();
echo 'Found Version ’.$mysql_version.’</td><td align=“center”>’;
echo $good;
} else {
echo 'Not Found</td><td align=“center”>’;
echo $bad;
//$no_good = TRUE;
} ?></td>
12) Create a “temp” folder in the Web App.
13) Navigate to http://yourwebapp.azurewebsites.net/install/
14) Step through the wizard.
15) The tool was developed for PHP 5.3, while Azure only supports PHP 5.4 and up; this is an issue due to changes in passing references: http://stackoverflow.com/questions/8971261/php-5-4-call-time-pass-by-reference-easy-fix-available
You will need to modify the “include/classes/BasicChecks.class.php” file; go to line 700 and remove the “&” character from in front of “$header_array” to get this:
BasicChecks::find_all_headers($e->children(), $header_array);
16) Navigate to http://yourwebapp.azurewebsites.net
Login using the account you setup during the install, click on the Profile menu option and take note of the Web Service ID.
17) Install the Sitecore module into Sitecore.
18)
In the Sitecore Content Editor naviagate to the Accessibility Checker Settings
and enter the Web Service ID into the configuration.