Editing mediawiki/index.php

I am trying to add some code to mediawiki/index.php and whenever I add any code, the rest of the page will not load. Even if I add a simple echo command to index.php, my main page will not open. How can I add features to index.php that will still allow me to view the main page? Should I be editing a different script? Thank you.

Editing mediawiki/index.php

Hi,
We don't support modifications to the application code. But I just edited /var/data/mediawiki/index.php and added

echo 'This is a test.';

at the very end. This printed out as I expected. There are a few gotcha's I can warn you about. Watch your bowser caching (especially if you are working with the JumpBox Navbar enabled) since you can occasionally miss changes because the browser has cached the page.

Also, while you are developing, you might want to change /etc/php5/apache2/php.ini from

error_reporting = E_ERROR

to

error_reporting = E_ALL

or something a little more informative. See the PHP docs on error_reporting for more details.

Good luck, you might also look around on the mediawiki site if you haven't already. They probably have developer information.

Austin

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.