Project:Support desk

About this board

Welcome to the MediaWiki Support desk. This is a place where you can ask any questions you have about installing, using or administrating the MediaWiki software.

( Read this message in a different language )

See also

Before you post

Post a new question

  1. To help us answer your questions, please indicate which version of MediaWiki you are using, as found on your wiki's Special:Version page:
  2. If possible, add $wgShowExceptionDetails = true;error_reporting( -1 );ini_set( 'display_errors', 1 ); to LocalSettings.php in order to make MediaWiki show more detailed error messages.
  3. Please include the web address (URL) to your wiki if possible. It's often easier for us to identify the source of the problem if we can see the error directly.
  4. To start a new thread, click the box with the text " Start a new topic ".
2409:4063:4280:31CF:0:0:11DE:28AD ( talk contribs )
Reply to "Page Statistics"

Error 1264: Out of range value for column 'pp_page' at row 1

1
Kghbln ( talk contribs )
Reply to "Error 1264: Out of range value for column 'pp_page' at row 1"

[RESOLVED] Warning: is_executable(): open_basedir restriction in effect

11
Cavila ( talk contribs )

Since I've started a data refresh process that's necessary for Semantic MediaWiki, I'm seeing the following error message at the bottom of every page:

Warning: is_executable(): open_basedir restriction in effect. 
File(/usr/bin/php) is not within the allowed path(s): 
([...]/:/tmp/) in [...]/includes/Wiki.php on line 655 

Line 655 refers to something beginning

if ( !wfShellExecDisabled() && is_executable( $wgPhpCli ) )

No shell access as I'm on a shared host (with Suhosin enabled). Decreasing JobRunRate from "1" to e.g. "0.5" helps somewhat to reduce occurrences of the error message, but it does not solve the issue, let alone speed up the process.

With some googling you'll find a variety of solutions for PHP configuration issues involving "open_basedir restriction in effect", but almost none of them seems to cover this specific situation. The exception may be here , where the third suggestion about setting $wgPhpCli to a dummy value (?) might or might not be helpful in my case.

Any idea what could be done about it?

Cavila ( talk contribs )

Some additional notes. The problem persists even if the refresh process has been cancelled. I also noticed that a lot of wikis are affected by the same issue, although no bugzilla report has been submitted yet.

Cavila ( talk contribs )

OK, this may be a bug in MW 1.22:

  • $wgPhpCli used to have a default value of 'php', without any requirement to set it explicitly in LocalSettings.php.
  • In MW 1.22, the default value appears to have become '/usr/bin/php', pointing to a file which does not exist, hence the error message above. Explicitly reverting to a value of 'php' woukd appear to solve the issue.

Is that correct?

Ciencia Al Poder ( talk contribs )

It was changed to /usr/bin/php even before than 1.19.

You can change $wgPhpCli in your LocalSettings if you need to, that's fine if that solves your problem.

Cavila ( talk contribs )

Thanks for responding. There have not been any issues on my MW 1.19.7 installation, so something else must be involved. But at least the error message no longer shows up.

Sophivorus ( talk contribs )

Had the same problem in 1.23alpha installations and fixed it by setting $wgPhpCli = 'php';

122.101.20.5 ( talk contribs )

Thanks for Fix it.

Before:global $wgJobRunRate, $wgPhpCli, $IP;   ... 639 Line
After:global $wgJobRunRate, $wgPhpCli, $IP;    ...639 Line
             $wgPhpCli = 'php';               ...640 Line
Benby ( talk contribs )

Adding $wgPhpCli = 'php'; to /wiki/LocalSettings.php worked on my configuration as well. Thanks for sharing.

(In my LocalSettings.php I actually had to add a new line for $wgPhpCli. Searching for that variable only gave me occurences in DefaultSettings.php - just an addition which may help other MediaWiki newbies like me.)

Cavila ( talk contribs )

There may be a catch though. I now have a job queue of well over a million. Does MW somehow need this to run jobs?

Cavila ( talk contribs )
Narcisgarcia ( talk contribs )

MWException: PEAR mail package is not installed even after installing it and checking include path - fedora server (using dnf package)

4
Reesericdotci ( talk contribs )

I am getting a strange pear mail error after installing it on Fedora Server and checking the include path through following the checklist on PEAR's site. Here's all the debug info I got:


Webpage:

[3b4977d818b6fe8f04e8b74a] /index.php?title=Special:ConfirmEmail MWException: PEAR mail package is not installed

Backtrace:

from /usr/share/mediawiki/includes/mail/UserMailer.php(369)

# 0 /usr/share/mediawiki/includes/mail/UserMailer.php(173): UserMailer::sendInternal()

# 1 /usr/share/mediawiki/includes/user/User.php(3068): UserMailer::send()

# 2 /usr/share/mediawiki/includes/user/User.php(3042): User->sendMail()

# 3 /usr/share/mediawiki/includes/specials/SpecialConfirmEmail.php(145): User->sendConfirmationMail()

# 4 /usr/share/mediawiki/includes/htmlform/HTMLForm.php(729): SpecialConfirmEmail->submitSend()

# 5 /usr/share/mediawiki/includes/htmlform/HTMLForm.php(619): HTMLForm->trySubmit()

# 6 /usr/share/mediawiki/includes/htmlform/HTMLForm.php(635): HTMLForm->tryAuthorizedSubmit()

# 7 /usr/share/mediawiki/includes/specials/SpecialConfirmEmail.php(118): HTMLForm->show()

# 8 /usr/share/mediawiki/includes/specials/SpecialConfirmEmail.php(79): SpecialConfirmEmail->showRequestForm()

# 9 /usr/share/mediawiki/includes/specialpage/SpecialPage.php(701): SpecialConfirmEmail->execute()

# 10 /usr/share/mediawiki/includes/specialpage/SpecialPageFactory.php(1428): SpecialPage->run()

# 11 /usr/share/mediawiki/includes/MediaWiki.php(316): MediaWiki\SpecialPage\SpecialPageFactory->executePath()

# 12 /usr/share/mediawiki/includes/MediaWiki.php(904): MediaWiki->performRequest()

# 13 /usr/share/mediawiki/includes/MediaWiki.php(562): MediaWiki->main()

# 14 /usr/share/mediawiki/index.php(49): MediaWiki->run()

# 15 /usr/share/mediawiki/index.php(45): wfIndexMain()

# 16 {main}


pear version:

PEAR Version: 1.10.15

PHP Version: 8.2.18

Zend Engine Version: 4.2.18

Running on: Linux localhost.localdomain 6.8.9-200.fc39.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May? 2 18:44:19 UTC 2024 x86_64


pear list:

Installed packages, channel pear.php.net:

=========================================

Package ? ? ? ?? Version State

Archive_Tar ? ?? 1.5.0 ? stable

Auth_SASL ? ? ?? 1.2.0 ? stable

Console_Getopt ? 1.4.3 ? stable

Mail ? ? ? ? ? ? 2.0.0 ? stable

Mail_Mime ? ? ?? 1.10.12 stable

Net_SMTP ? ? ? ? 1.12.1? stable

Net_Socket ? ? ? 1.2.2 ? stable

PEAR ? ? ? ? ? ? 1.10.15 stable

PEAR_Manpages ?? 1.10.0? stable

Structures_Graph 1.1.1 ? stable

XML_Util ? ? ? ? 1.4.5 ? stable


ls -lah on /usr/share/pear:

drwxrwxr-x.? 11 caddy apache 4.0K May 20 20:59 pear

ls -lah on /usr/share/pear/

drwxrwxr-x. ? 2 caddy apache? 162 May 20 20:59 Mail


php.ini

;;;;;;;;;;;;;;;;;;;;;;;;;

; Paths and Directories  ;

;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX : "/path1 : /path2"

include_path = ".:/usr/share/pear/"


the pear bool was true when checking, and the include path included pear when using check_php

Samwilson ( talk contribs )

@ Reesericdotci : You shouldn't install PEAR globally for it to be used by MediaWiki, it's in the MW vendor / directory already along with all other PHP dependencies. How did you install MediaWiki? You may need to either make sure you've downloaded all submodules, or run composer update -- no - dev - o .

Reesericdotci ( talk contribs )

I installed MediaWiki using `sudo dnf install mediawiki` - I can try symlinking to vendor maybe?

Reesericdotci ( talk contribs )

Alright, running composer update --no-dev -o in /var/www/wiki worked for me - thank you!

Wladek92 ( talk contribs )

i activate numbering of paragraphs in my user preferences. Then when displaying the page itself numbering is:

Sommaire
1 2 Welcome to MediaWiki.org help pages
2.1Reading
2.2Editing
2.3Advanced editing
2.4Collaboration
2.5Personal customization
2.6Wiki administration

Strange: There is nothing between level 1 and level 2 on first line and all is under level 2.

Then making modify source + preview with a forced TOC, all is under level 1:

Sommaire
1Welcome to MediaWiki.org help pages
1.1Reading
1.2Editing
1.3Advanced editing
1.4Collaboration
1.5Personal customization
1.6Wiki administration

Can someone analyse and correct the display  ? Thanks. -- Christian ???? FR ( talk ) 09:04, 18 May 2024 (UTC)

Malyacko ( talk contribs )

What "page itself"? Please provide clear and full steps to reproduce something somewhere, including URLs.

Wladek92 ( talk contribs )

it is written in the title, read the complete topic please. -- Christian ???? FR ( talk ) 08:39, 20 May 2024 (UTC)

TheDJ ( talk contribs )

This might have something to do with the change of the heading structure that is rolling out. Although I have proper spacing between the numbers and the titles. I suggest we wait a week or so more, before fixing this to allow changes to settle down.

Wladek92 ( talk contribs )

thanks sometimes things appear strange to me, so I just warn. --Christian ???? FR (talk) 10:18, 21 May 2024 (UTC)

Reply to "strange section indentation Help:Contents"

Error after update MW: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s)

3
Summary by Fanatikvoice

Specify for PHP processing which method to use in your control panel - Apache or CGI. If it is Apache, select CGI.

Fanatikvoice ( talk contribs )

Hi, i update MW and moved the site from hosting to VDS. Now i get this is error: I moved the site from Warning: is_dir(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/var/www/www-root/data:.) in =/var/www/www-root/data/www/ih1344788.vds.myihor.ru/includes/libs/filebackend/fsfile/TempFSFile.php on line 90

How the fixed error? I've read about this PHP parameter and can't figure out what to do.

Fanatikvoice ( talk contribs )

Problem Fixed.

Results: Specify for PHP processing which method to use in your control panel - Apache or CGI. If it is Apache, select CGI.

Reply to "Error after update MW: open_basedir restriction in effect. File(/tmp) is not within the allowed path(s)"

upload_tmp_dir - MediaWiki ignores php specified path

8
Arkasha ( talk contribs )

MediaWiki 1.17wmf1
PHP 5.2.12 (apache)
MySQL 5.0.90-log

There is a problem with a temporary folder path resolving.
Php on server side sets this directive as following:
upload_tmp_dir = /home/XXXXX/hdlwiki.com/tmp
and
open_basedir = /home/XXXXX/
However Wiki ignores these directives and tries to use /var/tmp
which is out of the allowed path.
This warning I received during Wiki installation:

     Warning: is_dir() [function.is-dir]: open_basedir restriction in effect.

File(/tmp) is not within the allowed path(s): (/home/XXXXX/) in /home/XXXXX/hdlwiki.com/www/config/Installer.php on line 474 Warning: Your session.save_path value (/tmp) appears to be invalid or is not writable.
PHP needs to be able to save data to this location for correct session operation.

As a result I cannot upload files by url. The system returns an error:

     Warning:  tempnam() [<a href='function.tempnam'>function.tempnam</a>]: open_basedir restriction in effect.

File(/var/tmp/) is not within the allowed path(s): (/home/XXXXX/)in/home/XXXXX/hdlwiki.com/www/includes/upload
/UploadFromUrl.php on line 101

What can be a solution for such problem.

Bawolff ( talk contribs )

Set the TMP (or TEMP or TMPDIR) environment variables for what you want your temp directory. (for the upload by url error)

For the install error, this can be caused if php is configured to store session files in the temp directory (sesssion.save_path in your php.ini). This should cause logins to not work at all, but perhaps only mediawiki is dissallowed, and php session handlers don't have the open_basedir restriction. If you get that warning when installing, but can still log in after the install is done, then the warning is in error, and is a bug in the installer (should probably file a bug about it).

Arkasha ( talk contribs )

Where should I set TMP variable? I have these in my LocalSettings.php

$wgEnableUploads  = true;
$wgAllowCopyUploads = true;
$wgUploadPath = "{$wgScriptPath}/images";
$wgUploadDirectory = "{$IP}/images";
$wgTmpDirectory = "{$wgUploadDirectory}/temp";

$wgGroupPermissions['sysop']['upload_by_url'] = true;

and I still have the above mentioned error. The folders for uploads are all writable. The Special:Upload shows Could not create temporary file. in red.

Bryan ( talk contribs )

putenv("TMP={$wgUploadDirectory}/temp");

UploadFromUrl appears to not support wgTmpDirectory, I believe this is a bug.

Bawolff ( talk contribs )

Really I'd consider it a bug in wfTempDir() function. Imports, and diffs (depending on config) are also affected.

Arkasha ( talk contribs )

Thank you! This solved the problem. Can it be fixed in the following MW release?

Bryan ( talk contribs )

Dunno if the fix will make it into 1.17, but in 1.18 it most likely will.

Narcisgarcia ( talk contribs )

I still see the problem in MediaWiki 1.41.1

The only workaround is to add

$wgTmpDirectory = ini_get('upload_tmp_dir');

to LocalSettings.php

Reply to "upload_tmp_dir - MediaWiki ignores php specified path"

Can't create MediaWiki:Common.css

2
83.253.138.162 ( talk contribs )

I'm having issues creating the common css, or any other css for that matter, I get this error:

Fatal error: Cannot declare class FileContentHandler, because the name is already in use in /var/www/domain123.com/domainxyz.com.com/fruitwiki/includes/content/CssContentHandler.php on line 0 *

  • domain names have been changed

The wiki works otherwise well, editing, loging in, history, etc, I assume this is some sort of php error (from research), but where do I solve it? I should also point out that this is an older wiki 1.35.0.

83.253.138.162 ( talk contribs )

No one? Was it that specific?

Reply to "Can't create MediaWiki:Common.css"

some problem with rank, it shows 1 rank which is incorrect. i tried to log in/off, but didnt help

2
95.10.1.54 ( talk contribs )

it shows 1 rank which is incorrect. i tried to log in/off, but didnt help

Samwilson ( talk contribs )

What rank are you talking about?

Reply to "some problem with rank, it shows 1 rank which is incorrect. i tried to log in/off, but didnt help"

How to remove discussion tab (timeless skin)

2
AlexMeneghin ( talk contribs )

What I need to do remove or hide the discussion tab  ?

thanks

Samwilson ( talk contribs )
Reply to "How to remove discussion tab (timeless skin)"