Topic on Project:Support desk

[Solved] Forbidden You don't have permission to access /index.php - Ask your provider to disable Mod_security

31
Rainerhamm (talkcontribs)

Hello!

I hope anybody can help me. I am running Mediawiki 1.28.2 with PHP 5.6 on www.kempedia.de.

Yesterday I recognized, that I get an error when I want to preview or save a page that contains a colon at the begin of a line to produce an indentation.

The error is

Forbidden

You don't have permission to access /index.php on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

And the administration-panel shows the error

Cannot allocate memory (client: 78.46.16.76:xxxxx) Couldn't create child process opt/suphp/sbin/suphp for home/web1807/public_html/api.php

After searchin in the www I thought it is something regarding mod_security(what is that?) or anything else regarding apache. But the technical support said that it comes from the actual version of mediawiki. "In der aktuellen Version vom Wiki werden Sonderzeichen transformiert übersendet, was bei bestimmten Sonderzeichenkombinationen einen 404 Fehler im Browser verursacht". In English: In the actual version ... special characters are sent after transformation. That causes with special character combination a 404-error in the browser"

Can you confirm it? What can I do that my wiki runs like before?

Thanks and best regards

Rainer Hamm

24.39.1.139 (talkcontribs)

Chmod index.php to 755.

24.39.1.139 (talkcontribs)

Generally al, the MediaWiki files should be readable, writable, and exicutable by the user readable, and executable, by the group and readable, and exicutable by the world. Chmod equivalent is 755.

24.39.1.139 (talkcontribs)

As for the memory error, try increasing the memory limit in php.ini

Rainerhamm (talkcontribs)

Thank you!

index.php was on 754, and it worked in normal use.

Now I changed it ro 755. But that didn't change anything.

The error still appears.

I already had set the memory limit from 128 to 512M. No success.

Any other idea?

24.39.1.139 (talkcontribs)

What version of MediaWiki are you using?

Rainerhamm (talkcontribs)

Version 1.28.2

24.39.1.139 (talkcontribs)

Mod_security is an apache module that helps to protect your website from various attacks. It is used to block commonly known exploits by use of regular expressions and rule set

24.39.1.139 (talkcontribs)

Add the following to a file called .htaccess in the domains root directory.

<IfModule mod_security.c>

SecFilterEngine Off

SecFilterScanPOST Off

</IfModule>

Rainerhamm (talkcontribs)

OK. But that seems not to be the reason. I askes the technical support of my provider.

I think with mod_security for example words like Casino or Poker are forbidden. But I can write Casino into the script, and the preview works. If I set a colon at the begin of the line, I get the error message.

24.39.1.139 (talkcontribs)

That will disable mod_security

24.39.1.139 (talkcontribs)

Could you provide a link to your wiki.

Rainerhamm (talkcontribs)

.htaccess changed. No effect.

I tried a similar entry already yesterday after reading half of the net. :-)

Rainerhamm (talkcontribs)
Rainerhamm (talkcontribs)

Then I will search for a simple test.

24.39.1.139 (talkcontribs)

I can load your wiki just fine.

Rainerhamm (talkcontribs)

Please login with user "mediawiki" and the password "support".

Then open any page, for example "Burgwall" in the middle of the page (a street in our town) and add a line

": Test" Normally that would create an indentation

Then make a preview and you get the message.

Try the same without the line and it works.

Rainerhamm (talkcontribs)

Are you MacFan4000. How have you done it.

Normally you must answer a question regarding our city to create a new account.

You shouldn't know the answer. ??? Or do you have special possibilities? :-)

24.39.1.139 (talkcontribs)

I am MacFan4000, no In did get a 403 when trying to do that. I simply googled for translations and questions

Rainerhamm (talkcontribs)

I have seen: You changed "Umstraße 22". This is a small page and a good object to test as well.

Rainerhamm (talkcontribs)

Have you tried to add a line with a colon and save or preview?

24.39.1.139 (talkcontribs)
TheDJ (talkcontribs)
Rainerhamm (talkcontribs)

And have you got the error as well?

What shall I search in Errors ans symtoms.

It's a hard work for a non-specialist in IT and Mediawiki and a German with a bad English. :-)

Rainerhamm (talkcontribs)

But the colon is not in the URL. It is in the text at the begin of a line.

I can try to read it in English. But I don't know whether I will find a solution there.

Rainerhamm (talkcontribs)

A colon in the URL doesn't make a problem.

For example "index.php?title=Spezial:Spezialseiten" works with a colon. No problem.

Rainerhamm (talkcontribs)

Hello! Are you still busy with that issue?

It is not solved. Or do you think so?

Rainerhamm (talkcontribs)

However - from today the mistake doesn't appear anymore. I don't know what is changed.

I changed nothing - not in the wiki- and not in any other configuration.

????????????????????

Moscowdreams (talkcontribs)

Full message I received future for internet searches:


Forbidden

You don't have permission to access /index.php on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Moscowdreams (talkcontribs)

Change Mod_security with the administrator

Mod_security is an apache module that helps to protect your website from various attacks. It is used to block commonly known exploits by use of regular expressions and rule set