Page MenuHomePhabricator

On last line of index.php, please add exit();
Closed, DeclinedPublic

Description

Author: kirbylover4000

Description:
Hello,
I have recently had problems with my MediaWiki where my web host has set up Apache to automatically append a JavaScript to the end of every PHP script, which breaks my wiki's JavaScript and CSS (generated by MediaWiki:Common.js, etc).
To resolve this, I have added exit(); to the last line of my wiki's index.php, which prevents the counter script being appended, but I would like to ask if exit(); can be added to the last line of index.php in the next SVN revision of MediaWiki, after $mediaWiki->restInPeace() is called.
Thanks.


Version: unspecified
Severity: minor

Details

Reference
bz22415

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 10:52 PM
bzimport set Reference to bz22415.
bzimport added a subscriber: Unknown Object (MLST).

Resolving WONTFIX.

This is an issue related to local configuration and your host's setup. For what it's worth, removing a host's injected ads (most likely) violates your Terms of Service. In addition, there are other entry points (api.php, thumb.php) would need exit() calls as well. Finally, this may (unlikely, but may...) break things.

As a general recommendation, we do not suggest running MediaWiki on free hosts, as they typically do not have the resources required to run MediaWiki. Of course if you're happy with your host you're welcome to continue using them, but you will need to maintain your exit() patch yourself.