Mobile app version of vmapp.org
Login or Join
Barnes591

: MediaWiki not creating a log file and cannot access the database I'm trying to set up MediaWiki on an Apache2 server. Currently, when I navigate to the directory where the wiki is stored in

@Barnes591

Posted in: #Apache2 #Mediawiki

I'm trying to set up MediaWiki on an Apache2 server. Currently, when I navigate to the directory where the wiki is stored in my web browser, I see the contents of LocalSettings.php dumped on the screen, as well as this error message:


Sorry! This site is experiencing technical difficulties.

Try waiting a few minutes and reloading.

(Cannot access the database)


I have double-checked the database name, username, and password in LocalSettings.php, and I am able to log in using these credentials on the web server. I am using a mysql database.

I have been trying to set up a debug log so that I can see a more detailed error message. Here's what I've added to my LocalSettings.php:

$wgDebugLogFile = "/var/log/mediawiki/debug-{$wgDBname}.log";


The directory /var/log/mediawiki has 777 permissions, but no log file is even created. I've tried restarting the Apache server, which doesn't help.

Why is MediaWiki not creating a debug log? Are there other logs that I should be looking at for more detailed error messages? What could the reason be for the error message that I'm getting?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Barnes591

1 Comments

Sorted by latest first Latest Oldest Best

 

@Connie744

As @Tgr mentioned in the comments, the problem was that I was missing <?php at the top of LocalSettings.php.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme