Topic on Project:Support desk

[RESOLVED] Odd occurrence when viewing Special:Version

6
Summary by Ciencia Al Poder
Schiffy (talkcontribs)

So every so often when I load up my own Special:Version page, I get a warning at the top of the page that looks like this:

Warning: is_file(): open_basedir restriction in effect. File(/usr/bin/git) is not within the allowed path(s): (/home/:/usr/lib/php:/usr/local/lib/php:/tmp:/usr/local/apache/htdocs) in /.../includes/GitInfo.php on line 132

It's repeating 9 times at the top of the page, overlapping with the logo and causing the special page cactions tab to separate from the rest of the page's actual content. After refreshing the warning goes away, and this only ever happens on this Special page to my knowledge.

The only thing I can think of is when I've updated my version in the past (using doteasy's softaculous), the final step (going to /mw-config/) doesn't seem to complete when trying to update the tables. It seems to stop midway with errors, but I'm not entirely sure if that's the reason, since everything else in 1.23.5 works normally.

88.130.115.61 (talkcontribs)

This error happens, because $wgGitBin is set to /usr/bin/git and because this path is not within those paths, which are allowed by open_basedir. So either you allow access to this path by adding it to open_basedir or you change $wgGitBin to a path, to which the user does have access. Or finally you can make your installation no git checkout, meaning you could remove the folder .git, which then stops MediaWiki from trying to get information about the Git repo.

Schiffy (talkcontribs)

I'm gonna have to inquire about all three solutions:

  1. Where is open_basedir so I can add it?
  2. Does the path that I change $wgGitBin to matter? Could I set it to something like 'none'?
  3. I can't even find the .git folder.
Florianschmidtwelzow (talkcontribs)
  1. You can read the answer to this and pick the way you want (or you can do).
  2. I don't know, what happens then, but MW expect an executable bin, so maybe it will cause an error. If you want: Just try it.
  3. It's a hidden folder, so if you want to see it via the terminal use the -a option of ls, if you access the server with an FTP client, you have to activate, that the client should force to view hidden folders.
Ciencia Al Poder (talkcontribs)

Try setting $wgGitBin = false; in LocalSettings.php

Schiffy (talkcontribs)

I can really only assume it worked, since it wasn't really causing anything other than that line showing up. Thanks.