Manual talk:Installing MediaWiki
Jump to navigation Jump to search
Reply to "Separate articles for Installation Guide and Installing MediaWiki"
Reply to "[Resolved] Blank page"
Reply to "Webserver configuration"
Reply to "MSSQL Table Creation"
Reply to "Raspbian"
Reply to "unclear"
Reply to "Prepare the directories"
Reply to "php"
Reply to "Composer"
Reply to "Auto-installer issues with MySQL1"
About this board
Separate articles for Installation Guide and Installing MediaWiki
[Resolved] Blank page
I'm trying to install a wiki on my server. I've been following the instructions on the installation and configuration pages, however, when I navigate to the wiki mainpage (the server IP) I receive the following error:
MediaWiki 1.21.2 LocalSettings.php not found. Please set up the wiki first.
When I clicked the link for setup (run the ms-config/index.php script) the page is completely blank.
I tried running the script manually through SSH and found I was experiencing this error "Fatal error: Class 'DOMDocument' not found in xxxxxxxx/Preprocessor_DOM.php on line nnn". I found the solution to be that my server did not have a XML module that was needed, so I installed that and now the script appears to work through SSH, however, I still see the page that tells me to setup the wiki and I still see a blank page when I click the link. Since there is no error here or on the SSH side, I'm not sure where to go from here. Any help would be greatly appreciated.
Turns out all I needed to do was restart apache after downloading the module!
Which XML package did you install?
Same problem, the module was php-xml
Configuring your webserver to correctly and securely serve MediaWiki scripts is a minor but often challenging detail during installation. I find myself visiting the same pages such as Apache_configuration, and doing web searches for Nginx configuration, specifically to copy and paste the contents of config files. It would be more convenient if we provided those examples somewhere on this site and linked from the installation page.
MSSQL Table Creation
I finished entering parameters and began installation in the mw-config process, which then stalled during "creating tables..." Following the error messages back to maintenance/mssql/Tables.sql and running it manually I found several errors:
- Several instances of attempting to create tables with 'unsigned' integer columns. MSSQL does not support unsigned integers; I removed the 'unsigned' keyword.
- slots, slot_roles, content, and content_models were defined in the wrong order based on their dependencies.
- In the externallinks definition, the default for el_index needed to be converted to varbinary
- image_comment_temp attempts to define a foreign key on image(imagecomment_name), which doesn't exist. After comparing it with the same table definition in the Oracle file, I changed it to image(img_name)
- CONSTRAINT FK_fa_description occurs twice; I changed the constraint name in fa_description_id to FK_fa_description and removed the second reference
- comma missing after definition of rc_patrolled
I saved the Tables.sql file, dropped the database, deleted .mdf and .ldf files for the database, and resumed the installation. Unfortunately after that the installation stopped before producing LocalSettings.php with an error "page already exists". There wasn't enough information in the error message to troubleshoot, so I'll have to go code-diving to find the cause of this.
Changes to the /mssql/tables.sql have been uploaded to https://phabricator.wikimedia.org/T202637#4873863
This section seems to be rather negative, with more comments on potential difficulties than a single simple solution. As usual we are plagued with differing hardware, distros and versions- the classic way forward is first cut out the complexity and document one fixed platform, using one fixed lamp stack and then write the appendices for other configs.
In parallel the BCS has published a case study of computerising rural pharmacies in Cote d'Ivoire with RaspberriPi 3s: here the only way to access the internet is by tethering, and electricity comes from a generator. If you wanted to open a school or college there- you would need to put media -wiki on a lamp stack on a Raspbian with a large USB disk.
If would seem sensible to release an essay on the installation of one flavour of R(L)AMP. then one flavour of Media Wiki, with an concluding example of a simple wiki, and an example of a fr-lang wikipedia mirror.
If you untar the archive as root, the files will end up owned as user # 1000???
If you untar the archive as root, You will end with files owned by root.
On my Fedora Core system, the first standard user I created ended up with UID 1000. I think that's fairly standard. --~~~~
This is the standard linux behaviour. That is exactly the question. When you untar an archive as root, the files will end up owned by root and not by a normal user (the first one has 1000). Which means that "If you untar the archive as root ... will not end up owned as user # 1000".
Prepare the directories
I found the explanations under the heading Prepare the directories insufficient. Since I failed to update existing Wikis, after a change of the provider, I tried to make fresh installations of MediaWiki 1.20 and failed again. Following the recommendation: "Depending on the server configuration, in some cases you have to check all boxes (777) in FileZilla, to be able to run the installer." I got the error message:
Please check and correct - File permissions to chmod 644 (for all files php, html, etc.) - Directory permissions to chmod 755 / html / * - Owner and group webX (your account - for example, web1) - Hosting Control Panel -> httpd-spezial -> mod-rewrite -> On - .htaccess file for typographical errors or incorrect commands.
This was the hint to success. On the server in question, it was chmod 755 instead of chmod 777 and for the files chmod 644. Hope, this is helpful to others.
I noticed on Manual:Installation guide that PHP is a requirement, but no mention of it is on this page. A section on installing for Windows and *nix would be helpful.
PHP is mentioned in Manual:Installation requirements with all the needed versions and modules. Apart from that, installation of PHP is out of scope here since it's a generic piece of software and php.net website has updated manuals about its installation on different platforms.
Shouldn't this page at least mention Composer? Having Composer installed seems to be a requirement for running update.php in MediaWiki now.
I added mention of Composer and try to organize the info for developers a bit better.
Shouldn't this page mention, which external dependencies are needed to be installed or at least link to somewhere, where it's written. I'm struggeling with this right now!
Auto-installer issues with MySQL1
not sure this is the proper way to report an issue -- please please point me to the right direction if not. I'm trying to install Mediawiki on CPanel (Apache, PHP 5, MySQL 5.5), and I have the following issues with 1.23.8 and 1.24.0.
The first issue is a variable not instantiated in the SQL install script, generating the error:
A database query error has occurred. This may indicate a bug in the software.
CREATE TABLE `user` (...) ENGINE=, DEFAULT CHARSET=binary
I shortened the SQL query intentionally, showing only that the issue is the missing ENGINE value. When I correct the maintenance/tables.sql script to replace /*$wgDBTableOptions*/ by "ENGINE=MyISAM, DEFAULT CHARSET=Binary, the script runs correctly.
The second issue comes right after, in the form of an error 500, no trace in the apache error_log. I tried fixing permissions on the imgages folder, to no avail. I'll try to debug further, and will post back here if I find anything, but any help would be appreciated. Thanks
As the comment says, you need to set $wgDBTableOptions. This is done by the installer: if you used a CPanel install process, please report the bug to them.
No, I didn't use the CPanel install process, just the classic mw-config script.
Thanks. Installer is a semi-abandoned component, so we have chances to get this fixed but only if you file a good report (against #MediaWiki-Installer), detailing exactly what LAMP stack you're using, what steps you followed and what's the resulting LocalSettings.php file. This is typically easier if you try to follow the steps from the beginning and write them down in the process.