A2HostingEnvironment
a2Hosting MediaWiki Environment
Tests and Lessons in 2021
June 4

I successfully uploaded the "r-mode image" — shown here, on the right — from my Mac to the a2Hosting file system.
- I pointed my browser to the URL: Tohline.education/SelfGravitatingFluids; this opened the "Main Page" of my MediaWiki app
- I logged into the MediaWiki site; as a result, the "Upload file" link was added to the left-hand menu
- Clicking on this "Upload file" link, a familiar MediaWiki page opened; it allowed me to upload a selected r-mode image from my Mac
- From the a2Hosting's cPanel, I double-clicked on the "File Manager"; I located the file under public_html/SelfGravitatingFluids/images/3/3b
June 5
I found this URL useful as I attempted to change my MediaWiki Logo image.
Via a cPanel-Terminal session, I changed directory to "~/public_html/SelfGravitatingFluids" and …
- Found index.php; its contents were not immediately useful.
- Found LocalSettings.php
- $wgServer = "https://tohline.education"
- $wgScriptPath = "/SelfGravitatingFluids"
- $wgResourceBasePath = $wgScriptPath
- $wgLogos = [ '1x' => "$wgResourceBasePath/resources/assets/wiki.png" ];
I realized that, when using the cPanel-File_Manager, I must click on the **name** (e.g., SelfGravitatingFluids) of a directory folder as well as the tiny folder icon in order to see all of the directory's files and sub-directories.

I successfully uploaded the "r-mode image" — shown here, on the right — from my Mac to the a2Hosting file system.
- It is 135 x 135 pixels, which is the size used for the replacement MediaWiki Logo; actually, what is displayed here is a 300 x 300 pixel image.
- From the a2Hosting's cPanel, I double-clicked on the "File Manager"; I located the file under public_html/SelfGravitatingFluids/images/8/8b; actually, the displayed image is in ~/images/9/97
- Now, let's try opening the LocalSettings.php file and changing the $wgLogos specification to read:
$wgLogos = [ '1x' => "$wgResourceBasePath/images/8/8a/RmodeHBookImage6.png" ]; - That did not work, but the following did:
$wgLogos = [ '1x' => "images/8/8a/RmodeHBookImage6.png" ]; - I added the "Self-Gravitating Fluids" label to the same image, then repeated the above-enumerated upload steps. Now the appropriate Logo can be found at the following location:
$wgLogos = [ '1x' => "images/d/d3/RmodeImage8.png" ];
Where do new MediaWiki pages get stored?
- Looks like one test example is at: ~/www/SelfGravitatingFluids/tests/phpunit/includes/page/
- Perhaps the real thing is at: ~/www/SelfGravitatingFluids/includes/page/
- Even more likely to be useful: ~/www/SelfGravitatingFluids/includes/content/
88% into TextContent.php … "Generates an HTML version of the content, for display. Used by fillParserOutput() to provide HTML for the ParserOutput object."
June 8
SSH and SFTP.
- After reading this document, I learned how — from my iMac — to log into the a2Hosting linux servers via a secure shell (SSH; port 7822) session.
- After reading a separate document, I followed a2Hosting's advice and installed FileZilla on my iMac. This allows me — via a very pleasant "windowed" interface — to establish and use SFTP to transfer files from the iMac to my account on a2Hosting servers.
Contemplate installation of "Math" extension.
- Consider reading www.mediawiki.org/wiki/Manual:Configuration_settings
- Steps drawn from: Extension:Math#Installation
- Download and place the file(s) in a directory called Math in your extensions/ folder.
- Add the following code at the bottom of your ~/SelfGravitatingFluids/LocalSettings.php:
- wfLoadExtension( 'Math' );
- Run the update script which will automatically create the necessary database tables that this extension needs. According to this documentation, updating involves the following: (1) Change to the maintenance directory, then at the command-line prompt, type php update.php.
June 9
Download and Install Extension:Math
- From Safari on my iMac, I went to the page titled, Download MediaWiki extension; this means that the downloaded file(s) will initially end up on my iMac, under folder … ~/myMediaWiki/Math
- It asked for MediaWiki version number …
- Under the Tools subsection of the Main_Page sidebar, click on special pages;
- Then, under the Data & Tools subheading, click on Version.
- ANS: the a2Hosting installation was Version = 1.36.0, which is the version number labeled "latest stable MediaWiki" on the extension download page.
- I directed the "snapshot URL" download link to put the ~.tar.gz file directly into the ~/myMediaWiki/Math folder on my iMac. From the command line of my iMac's terminal screen I typed: tar -xzvf Math-REL1_36-8c7c35b.tar.gz. Looks like this file was unwrapped properly; the unpacking involved (1) creation of a subfolder named "Math" and (2) storing all files in this newly created folder. Note that, since the unpacking self-generated the new "Math" subfolder, I ended up with a ~/Math/Math/ folder construction.
- Using FileZilla on my iMac, I transferred (via SFTP) the original ~.tar/gz file into the extensions subfolder of my SelfGravitating wiki site on the a2Holding server. Then, using the cPanel terminal app, I changed into the ~/SelfGravitatingFluids/extensions folder and typed the same command, namely: tar -xzvf Math-REL1_36-8c7c35b.tar.gz. A new "Math" subfolder was created within the "extensions" subfolder and all of the "unpacked" files appear to have been properly stored there.
-
Carry out the last couple of 8 June contemplated steps.
- Add the following code at the bottom of your ~/SelfGravitatingFluids/LocalSettings.php:
- wfLoadExtension( 'Math' );
- Run the update script which will automatically create the necessary database tables that this extension needs. According to this documentation, updating involves the following: (1) Change to the maintenance directory, then at the command-line prompt, type php update.php.
- Add the following code at the bottom of your ~/SelfGravitatingFluids/LocalSettings.php:
-
HOORAY!! As is illustrated in Table 1, the LaTex instructions appear to work: (left) a few lines of plain text, and (right) the "Extension:Math" rendering results. NOTE: These (admittedly simple) math expressions are not embedded .png images but, rather, have each letter placed individually; this is illustrated by the fact that the light-blue background color is able to color throughout the expressions.
Table 1 Plain Text Rendering I'm just testing to see if I'm properly editing. <math> E = mc^2 </math> <div align="center"> <math>H = \int\frac{dP}{\rho}</math> . </div>I'm just testing to see if I'm properly editing.
.
|
Appendices: | VisTrailsEquations | VisTrailsVariables | References | Ramblings | VisTrailsImages | myphys.lsu | ADS | |