Project:Support desk

Jump to: navigation, search

About this board

vde   Welcome to MediaWiki.org's Support desk, where you can ask MediaWiki questions!

There are also other places where to askCommunication: IRCCommunication#Chat, mailing listsMailing lists, Q&A etc.

Before you post

Post a new question

  1. To help us answer your questions, please always indicate which versions you are using (reported by your wiki's Special:Version page):
    • MediaWiki
    • PHP
    • Database
  2. Please include the URL of your wiki unless you absolutely can't. It's often a lot easier for us to identify the source of the problem if we can look for ourselves.
  3. To start a new thread, click "Start a new topic".
By clicking "Add topic", you agree to our Terms of Use and agree to irrevocably release your text under the CC BY-SA 3.0 License and GFDL
89.123.241.143 (talkcontribs)

Is there a way for blocked accounts to have the 'read' permission revoked?

Ciencia Al Poder (talkcontribs)

no, and this would make no sense. Most you can do is create a new user group and revoke the read rights for it, and adding those blocked users to the new group, but that wouldn't make more sense anyway, since users can just logout to see the content

87.123.58.199 (talkcontribs)

What Ciencia says is right. You would need a setup, where users cannot see anything, if they are not logged in. Otherwise it would not make sense to revoke read rights from certain accounts.

89.123.241.143 (talkcontribs)

Hm. Is it possible to work for IPs then? That's what I meant to ask initially. I don't think IPs can be added to groups, can they?

87.123.58.199 (talkcontribs)

They cannot. IPs can be blocked, but they cannot be added to groups (at least not by default and I don't know of an extension, which would change that).

Note that what you want in fact _is_ possible: You can configure MediaWiki in such a way that as long as the user is not logged in, only access to a few pages is possible, e.g. to the Main Page and to the login page. All other pages would then be forbidden as long as the user is not logged in. If you then blocked a user, you will effectly also take his read rights away. However, I am not sure, if this solution really is what you want: After all, this takes read rights away from _each and every_ IP. I am aware that this is not what you asked for...

89.123.241.143 (talkcontribs)

Yes. I would only like for any blocked IP/account to have their 'read' rights revoked.

89.123.241.143 (talkcontribs)

Well, mostly for IPs.

87.123.14.60 (talkcontribs)

I know. That's how I understood your question. ;-)

89.123.241.143 (talkcontribs)

So.. there's really no workaround to it? No extension? No setup? I figured it should be something mediawiki had bundled.

87.123.14.60 (talkcontribs)

A setup without extension definitely not.

Groups currently are assigned based on the user ID, which is linked to the account in the user table.

The following would be needed in order to be able to assign groups also to IPs: Group membership should not only be addable for certain user IDs, but also for user ID 0 in combination with the IP address as username. This would need according changes in the MediaWiki database layout and the addition of according code. As far as I can tell, neither of this is currently existing.

Reply to "Blocked users permissions"

Changing $wgserver is not updating the url for my wiki

12
24.77.173.145 (talkcontribs)

Hello there,

  • Apache/2.2.16 (Debian)
  • MySQL client version: 5.1.49
  • MediaWIki 1.20.3 (it appears)

So I have recently joined a volunteer group where I was to help develop and improve their wiki. On almost my first day the server partition (/var) where the wiki was being developed filled up. Talking the the server administrator caused me to now become the server administrator. I have experience coding but not with wiki's or with server administration.

Here is what I have done. I backed up the sql database, which in my case was called hertiage_media and created a duplicate of it, heritage_media_old. I took my site and changed the wgdbname from the former database to my heritage_media_old database. I then used rsync to duplicate the entire /var/www directory to /home/www where I have a lot more space to play. I then changed the wgserver on my first site from "http://heritage.apegm.mb.ca" to "http://heritage.apegmold.mb.ca" and the used "http://heritage.apegm2.mb.ca" for the wgserver variable on my new, synchronized location at /home/www. Neither of the urls i have created work, and the original site url of "http://heritage.apegm.mb.ca" is still there but with broken formatting.

What have I missed? I just want to get the wiki at the /home directory to work so i can delete the old directory at /var and get back to developing functionality.

Thanks for reading and for your help and time,

Trent

87.123.40.18 (talkcontribs)

> Talking the the server administrator caused me to now become the server administrator.

Haha, I know that one!

MediaWiki configuration is only one part of your question.

If you have different folders, which both should be accessible from the web, then you need to configure Apache accordingly. Basically, you need a virtual host pointing to each of the two folders. That way, each of them should be available under _some_ URL.

Currently, I cannot call the URLs with "old" and "2" in it at all. I get a server error. No MediaWiki involved here. It seems, like the Apache configuration (or anything else, I am not an expert here) for these two virtual hosts is wrong. Or: Did you create Apache configuration for the according directories at all? (_Missing_ configuration could also be the reason for this.)

Coming to MediaWiki, the value of $wgServer always needs to be the URL, under which the page should be reachable. Basically for each host this is the URL, which you have configured in the Apache configuration. So in case of the URL _without_ old in it, this "old" also should not be in $wgServer.

For the URL _with_ old in its name, this "old" also needs to be in $wgServer.

Whytekong (talkcontribs)

Ok I was wondering about apache but don't really know wanything about it. So there would have originally been an apache configuration somewhere for the original site, if i find it and set the url to "old" like wgserver than that url should work. So then i would need to create and new apache configuration for the new location correct? Does it need to be in the same directory as the /www ?

Whytekong (talkcontribs)

Also the only place I can find an apache2.conf file is in /etc/apache2. Does that sound right?

87.123.40.18 (talkcontribs)

> So there would have originally been an apache configuration somewhere for the original site, if i find it and set the url to "old" like wgserver than that url should work.

Yes, I think so. On the page, which currently is available under the URL _without_ old, $wgServer already seems to be set that way. At least certain internal links inside MediaWiki contain that "old" already.

> So then i would need to create and new apache configuration for the new location correct?

Right, I think what you want to create is a virtual host. Basically like the one, which currently is configured for the URL without "old" in it.

> Does it need to be in the same directory as the /www ?

The _configuration itself_ always needs to be stored at the place where such configuration is stored. I think that is in the same folder as the configuration of the other host is as well.

The _web root directory_ can then be anywhere. It can e.g. be /home/www while for the other virtual host it is somewhere different. It does not have to be the same folder as for the other host.

87.123.40.18 (talkcontribs)

apache2.conf might be such a file. httpd.conf might be another file name. Also, there might be a folder called something like "sites-available". This might also be the place for the configuration. In order to take effect, changes to Apache configuration files usually need an Apache restart.

Whytekong (talkcontribs)

Ok i believe that i got my apache problems fixed. I believe that my virtual host is now pointing at my new website directory. Now im having an issue where when i upload files to my website, its saving the files at the old var/www directory.

Any thoughts?

Ciencia Al Poder (talkcontribs)

You may need to change other configuration settings in LocalSettings.php related to upload directory, etc

Whytekong (talkcontribs)

It doesn't look like there are any configuration settings in my LocalSettings.php related to upload directory. Just to enabling uploading and file extensions. Forgive the inexperienced question but how does MediaWiki upload? Does uploading files utilize mySql in anyway or does LocalSettings direct the uploads directly to /images? Would any of my extensions or mySql have a configuration option that would still be pointing back to /var/www/wiki/images instead of /home/www/wiki/images?

87.123.58.199 (talkcontribs)

File uploads in fact use both: The file system _and_ the database. An overview is available here Manual:Configuring_file_uploads#Upload_directory. Especially $wgUploadPath will be the variable to look into.

Whytekong (talkcontribs)

Ok thanks. Ill take a look into this after work.

Whytekong (talkcontribs)

ok one last question. It appears my last statement was incorrect. For some reason when I upload a file, both my /var directory and /home directory are both increasing in size according to df. When i updated mysql conf file i only changed the data directory variable. Would this issue be a result of that or did i do something else thats causing my /var directory to still take on data?

Reply to "Changing $wgserver is not updating the url for my wiki"
Adam artist (talkcontribs)

I created an OSJ admin account, did some setup work, logged in and out a couple of times, then my log in stopped working. When I try to log in OSJ just takes me back to the log in fields, no error message. I reset my password a couple of times (which still works), I get the password reset e-mails and the system password - I change it and still can't log in - tried a couple of times. Also rebooted browser (Chrome and IE) and rebooted the computer.

Could it have anything to do with changing my profile? How do I get back in?

Thanks!

This comment was hidden by Adam artist (history)
Reply to "suddenly I can't log in"

Binary file upload save with a wrong extension

3
Gtehrani (talkcontribs)

Hi,

I added $wgFileExtensions in LocalSettings.php to allow uploads of Microsoft Office files i.e. ppts, docx, xlsx. The problem is that when I upload a file with pptx, the upload tool insists on saving it as a docx file. PDf files seem to be immune but not Office files.

Appreciate your help,

George

87.123.14.60 (talkcontribs)

I don't get it. Do you say that, when you have a pptx file and you upload it, the resulting file name ends in docx? Where does this happen? I mean, you can explicitly define the file name you want, right?

Gtehrani (talkcontribs)

Yes, it happened when I used the upload tool to upload a pptx file. I tried twice with the same result. 3 hours later I tried again after checking my scripts, and viola! It's working! Must have been solar flares.

Reply to "Binary file upload save with a wrong extension"

Connect to https wiki-site api with wikitools.py

3
Carchaias (talkcontribs)

I try to create a little python script and have problems to connect my Wiki .

from wikitools import * 
s = wiki.Wiki('https://aquanautweb.de/testwiki/api.php') 

results in

==== RESTART: C:\Users\XXXXXXX\test_wikitools.py ==== 
URLError: <urlopen error EOF occurred in violation of protocol (_ssl.c:590)> trying request again in 5 seconds 
URLError: <urlopen error EOF occurred in violation of protocol (_ssl.c:590)> trying request again in 10 seconds 

It works with https://en.wikipedia.org or other wikipedia pages. The API on my wiki is turned on so I can send requests via the browser. It works further with another wiki that has no TLS. I think someting is going wrong on the server-side but I have no idea what.

Ciencia Al Poder (talkcontribs)

Your server seems to use TLSv1.0, and that python lib seems to use 1.2 by default. See this SO question

Carchaias (talkcontribs)

Hm, this may be the source. But I can't see where wiki.py from wikitools uses requests

But I not experienced with that.

Reply to "Connect to https wiki-site api with wikitools.py"
194.183.0.100 (talkcontribs)

Hi,

i'm trying to install mediawiki on our centralized mysql database. During wizard i choose mysql and insert all the parameters but i receive: DB connection error: Can't connect to MySQL server on 'MYDBSERVER' (13) (MYDBSERVER).

Is there something i need to configure before or after wizard?

Thanks

Ciencia Al Poder (talkcontribs)

Maybe you have SELinux enabled and it's blocking external connections from apache? See this SO question

194.183.0.100 (talkcontribs)

Thanks Ciencia, you're right. Disabled SELinux but now i'm encountering another issue: DB connection error: Authentication plugin 'dialog' cannot be loaded: /usr/lib64/mysql/plugin/dialog.so: cannot open shared object file: No such file or directory

87.123.14.60 (talkcontribs)

That is a problem with MySQL. Obviously the dialog.so plugin cannot be loaded, because it is not present at /usr/lib64/mysql/plugin/.

194.183.0.100 (talkcontribs)

you're right, indeed i'm using mariadb and i really don't know if that's the issue or the compatibilty on redhat

87.123.14.60 (talkcontribs)

So obviously you either want to add that plugin so that it can be found, or - if you don't use it - you should remove it from MariaDB's plugin list so that MariaDB no longer tries loading it.

See https://mariadb.com/kb/en/mariadb/uninstall-plugin/

194.183.0.100 (talkcontribs)

i think i need it in order to let app to connect to db....where can i download it?

87.123.14.60 (talkcontribs)

Up to a few hours ago, I didn't even know that MySQL/MariaDB has support for something called plugins. According to this plugin comes with the MariaDB distribution. It should then be part of the MariaDB installation process to install it, I think.

Reply to "installation issue with MariaDB"
178.24.167.81 (talkcontribs)

if I use http://simpsonspedia.net/index.php?title=Simpsonspedia I got this error, but if I use http://simpsonspedia.net/index.php?title=Simpsonspedia&mobileaction=toggle_view_desktop this site works.

what is the reason? have anyone an idea?

best regards

s.net

178.24.167.81 (talkcontribs)
MediaWiki 1.24.2
PHP 5.4.16 (cgi-fcgi)
MariaDB 5.5.44-MariaDB
TheDJ (talkcontribs)

You can put anything behind the URL and it seems to work. Possibly there is some sort of caching occurring on that URL, and this cache is not being purged for some reason, so that you are seeing an old version of this page from a time where it was actually showing the error ? If that's not it, then I suggest you start looking at debug logs.

195.50.155.96 (talkcontribs)

I use the magic quote __NOCACHE__, so cache shouldn't use.

I'll check the cache and if I find an cached html for this side, I'll delete this file.

best regards

s.net

87.123.14.60 (talkcontribs)

You should add

$wgShowExceptionDetails = true;
$wgShowSQLErrors = true;
$wgShowDBErrorBacktrace = true;

to LocalSettings.php and see, what the actual error is.

Reply to "database error"

Not exceeding the CPU quota limit

6
Summary by Stranger195

That host sucks.

Stranger195 (talkcontribs)

Hostinger Philippines suspended TME's hosting account because it "exceeded allowed 70% CPU quota limit for more than 21 times." How do I make so that MediaWiki doesn't exceed this limit?

TheDJ (talkcontribs)

There is a $wgMemoryLimit, but no cpu limit. Also, that isn't really a common limitation to be applied by hosters for these kinds of services. Limits like these are much more common. I would ask them what this is about, since CPU limit is not something you can easily enforce yourself from PHP.

Stranger195 (talkcontribs)

This was the full reason for suspending my account:

Account themultilingualencyclopedia.16mb.com exceeded allowed 70% CPU quota limit for more than 21 times. This is considered abnormal as it causes a high server load and overall slowdown. Website must be secured and optimized or removed form the server (Account themultilingualencyclopedia.16mb.com exceeded allowed 70% CPU quota limit for more than 21 times. This is considered abnormal as it causes a high server load and overall slowdown. Website must be secured and optimized or removed form the server)
Ciencia Al Poder (talkcontribs)

Get a better hosting company, basically. That's what you get for a free/cheap hosting

Stranger195 (talkcontribs)

Good answer...

87.123.14.60 (talkcontribs)

If I was Sheldon Cooper, I would now ask "Irony?".

But no, that is no irony at all. Bad hosts offer bad services. I am not saying _your_ host is bad. All I see is that what this host offers obviously is not enough even for the standard functions of MediaWiki. Or let me put it that way: Your host wants to have more money or they will no longer allow you to use MediaWiki in that hosting account. And compared to other systems, MediaWiki is even frugal. With a reasonable host this most likely would _not_ have happened.

Colleax (talkcontribs)

Hi,

After upgrading our WIKI page has no lay-out, only text, on the login pages and certain special pages.

I searched in Localsettings.php and CSS directories for answers.

The option to show CSS on all pages does not work: $wgAllowSiteCSSOnRestrictedPages.

I changed the localhost as shown in other solutions on similar problems, in Localsettings.php.

?

87.123.14.60 (talkcontribs)

See Manual:Load.php!

Reply to "Lay-out logonpages not visible"

Why can I not use /FAQ as a URL? MediaWiki is stealing it!

1
GodsDead (talkcontribs)

It just displays:

The MediaWiki FAQ can be found at: https://www.mediawiki.org/wiki/Manual:FAQ 

Which isn't very helpful, as I cant change this. I dont want to have to use Faq as my URL.

Reply to "Why can I not use /FAQ as a URL? MediaWiki is stealing it!"