Jump to content
  • 0
Sign in to follow this  
Carey

Editing the Index page

Question

Hi! I am trying to edit code on the home page. The code on the page says (with "enable edit") that the code is on the index.php page, as you would expect. But when I open the page in an editor (I tried Sublime and Komodo), I get a page that does not have much code but instead has this written at the top.

This is the main web entry point for MediaWiki.
 *
 * If you are reading this in your web browser, your server is probably
 * not configured correctly to run PHP applications!
 *
 * See the README, INSTALL, and UPGRADE files for basic setup instructions
 * and pointers to the online documentation.

I have read the readme, install, and upgrades files, and searched around in databases, but I can't figure out how to get to the code that apparently is on this page. 

What am I doing wrong? 

Thanks,

-Carey

Later Addition to this question/ post:

As I keep digging into this, I have a suspicion that I have been sent in the wrong direction with the statement "your server is probably not configured to correctly run PHP applications", as the message says. I suspect that the real issue is that the code for the Index page (and likely most of the pages) is WRAPPED/protected and therefore not able to be directly edited in any way, no matter what I do or how I configure my server. I suspect that the only way to "edit" these pages is to add on script that can be read along with the wrapped code, and the media-wiki community calls these add-on codes "applications", which explains why everything has to be done with applications that someone else has pre-created or you create yourself instead of just messing with the page code. IS THIS ACCURATE?

Thanks, 

-Carey

 

Edited by Carey (see edit history)

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Do not edit any of the .php files that MediaWiki ships with. If you want to edit the content of your wiki pages, make use of the "Edit" tab while logged into your wiki.

If you want to implement custom code, write or install an extension. In any case, never edit the core .php files -- doing so will make future upgrades incredibly difficult as any custom modifications to core .php files are completely lost on upgrades and need to be reapplied (unlike extensions, which stick around). Furthermore, the core code changes in structure a lot between versions, and unless you're keeping up with MediaWiki development, your custom hack that works in one version may not work in the next one without significant rewrites.

Edited by Skizzerz (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.