I'm trying to install Mediawiki 1.22.6 into a subdirectory /wiki/
of apache document root directory, which contains some other directories. When I try to open http://example.com/wiki or http://example.com/wiki/index.php for the very first time to generate LocalSettings.php, the script is not run; instead, a part of it is printed:
bar(), etc etc) which throw parse errors in # PHP 4. Setup.php and ObjectCache.php have structures invalid in PHP 5.0 and # 5.1, respectively. if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) { // We need to use dirname( FILE ) here cause DIR is PHP5.3+ require dirname( FILE ) . '/includes/PHPVersionError.php'; wfPHPVersionError( 'index.php' ); } # Initialise common code. This gives us access to GlobalFunctions, the # AutoLoader, and the globals $wgRequest, $wgOut, $wgUser, $wgLang and # $wgContLang, amongst others; it does not load $wgTitle require DIR . '/includes/WebStart.php'; $mediaWiki = new MediaWiki(); $mediaWiki->run();
Running the script with php -f index.php
produces the expected output.
There are no aliases or rewrite rules; mod_php seems to be enabled — Mediawiki works if installed as document root. In current install the document root is a symlink.
Virtual host is configured as follows:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/hell/public_html
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/hell/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
IndexOptions +ShowForbidden
</Directory>
<Directory /home/hell/public_html/private>
AuthType Basic
AuthName "Restricted Access"
AuthUserFile /home/hell/apasswords
Require user satan
</Directory>
# ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
# <Directory "/usr/lib/cgi-bin">
# AllowOverride None
# Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
# Order allow,deny
# Allow from all
# </Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
So there is no special configuration for Mediawiki.