Enabling Tabs On Mediawiki

Robert L Cochran cochranb at speakeasy.net
Sat Sep 5 07:08:26 UTC 2009


On 09/04/2009 08:16 PM, Aldo Foot wrote:
> On Fri, Sep 4, 2009 at 4:53 PM, Robert L Cochran<cochranb at speakeasy.net>  wrote:
> <...snip...>
>    
>> Aldo, thank you for making me aware of this. I'm going to work on installing
>> from the Mediawiki source just as you have. As I want to try to save the one
>> wiki page that I've spent hours working on, I'm going back up my database
>> and configuration files and see if I can treat this as an "upgrade". That
>> requires an AdminSettings.php file to be present in the wiki root. There is
>> an /usr/share/mediawiki/AdminSettings.sample which can be copied to the wiki
>> root. The file is needed for scripts in the maintenance directory to run. I
>> didn't know any of these details until I started looking at the "upgrade"
>> page here:
>>
>> http://www.mediawiki.org/wiki/Manual:Upgrading
>>
>> I will let you know how things go. I'll also file bugs as needed to get this
>> issue of no tabs resolved in the Fedora version of mediawiki. Perhaps some
>> needed installation files were left out of the binaries.
>>
>> Bob
>>      
> ________
>
> I like the "Alternative 2: Re-run the installer". Since I know
> the usernames, passwords and initial dbase name it could be
> as simple as re-typing them. I'll try to find some time and rerun
> my install just to test this. It could be a lifesaver for a
> future upgrade.
>
> Who knows... perhaps there is a yum package in some repo to add tabs.
> The manual method is just not efficient compared to installing from source.
>
> BTW, thanks for that link to the manual upgrade.
>
> ~af
>    

Hi Aldo,

I figured out the problem and got the beautiful Mediawiki "Monobook" 
skin to finally show up, using the Fedora-packaged mediawiki code. The 
key to solving the problem was constantly checking out 
/var/log/httpd/error_log, which hundreds if not thousands of entries 
like these:

[Sat Sep 05 02:25:05 2009] [error] [client 127.0.0.1] File does not 
exist: /var/www/html/w/skins/common, referer: 
http://deafeng3.signtype.info/wiki/Main_Page
[Sat Sep 05 02:25:05 2009] [error] [client 127.0.0.1] File does not 
exist: /var/www/html/w/skins/common, referer: 
http://deafeng3.signtype.info/wiki/Main_Page

I'm running httpd -- the Apache web server. This message means the 
server couldn't find a file being requested. In this case, it was trying 
to fetch the stuff needed to show the default Monobook skin. My document 
root is /var/www/html, and within that, I set up the wiki root which is 
/var/www/html/w. Inside that is an empty directory named 'skins'. And 
httpd couldn't find skins/common.

With more reading of documentation, I realized something was wrong with 
my /etc/httpd/conf.d/mediawiki.conf file. Specifically, my Alias 
statements were not set up correctly. Here is the Alias statement that 
fixes the error messages above:

Alias /w/skins /usr/share/mediawiki/skins

After which running

apachectl configtest
service httpd restart

magically got the beautiful Monobook skin to work!

The next step was to get Short URLs to work. That meant reading this 
MediaWiki article:

http://www.mediawiki.org/wiki/Short_URL

and adding these lines to LocalSettings.php in /var/www/html/w :

# Virtual path. This directory MUST be different from the one used in 
$wgScriptPath
$wgArticlePath      = "/wiki/$1";
# Enable use of pretty URLs
$wgUsePathInfo      = true;


I put these right below this line:

$wgScriptPath       = "/w";

And then I needed one more Alias entry in /etc/httpd/conf.d/mediawiki.conf:

Alias /wiki /var/www/html/w/index.php

Save the file, test the configuration, restart httpd, and pow! URLs like 
this should work:

http://localhost/wiki/Chigger_Bites

I hope this helps you. I think these changes now allow what I want to 
see. I've learned a thing or two about Mediawiki and Apache, and also of 
backing up my wiki files properly.

Oh, a few final bits. Every time you see a reference to giving the 
webserver write access to some resource, that means basically doing this:

chown apache.apache /path/to/file

Be careful that AdminSettings.php is not world-readable if you create it 
in your wiki root.

Thanks

Bob




More information about the fedora-list mailing list