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".

بودودة ريتاج

1
105.106.245.201 (talkcontribs)

انا من معجبين بكم

Reply to "بودودة ريتاج"

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

11
Cavila (talkcontribs)

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 (talkcontribs)

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 (talkcontribs)

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 (talkcontribs)

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 (talkcontribs)

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 (talkcontribs)

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

122.101.20.5 (talkcontribs)

Thanks for Fix it.

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

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 (talkcontribs)

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 (talkcontribs)
Narcisgarcia (talkcontribs)

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

4
Reesericdotci (talkcontribs)

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 (talkcontribs)

@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 (talkcontribs)

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

Reesericdotci (talkcontribs)

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

strange section indentation Help:Contents

5
Wladek92 (talkcontribs)

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 (talkcontribs)

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

Wladek92 (talkcontribs)
TheDJ (talkcontribs)

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 (talkcontribs)

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 (talkcontribs)

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.

Narcisgarcia (talkcontribs)
Fanatikvoice (talkcontribs)

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 (talkcontribs)

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 (talkcontribs)

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 (talkcontribs)

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 (talkcontribs)

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

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

Bawolff (talkcontribs)

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

Arkasha (talkcontribs)

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

Bryan (talkcontribs)

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

Narcisgarcia (talkcontribs)

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 (talkcontribs)

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 (talkcontribs)

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 (talkcontribs)

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

Samwilson (talkcontribs)

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 (talkcontribs)

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

thanks

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

Upgrade from 1.25: actor table missing error

2
Subfader (talkcontribs)

I'm trying to upgrade from MW 1.25 (yes…) to 1.41.1 and I get this error on the database tables upgrade (web frontend):

...index page_name_title already set on page table.
...skipping: index change_tag_rc_tag_id doesn't exist.
Converting djvu metadata...
An error occurred:
Error 1146: Table 'Foo.actor' doesn't exist
Function: RefreshImageMetadata::execute
Query: SELECT  img_name,img_size,img_width,img_height,img_metadata,img_bits,img_media_type,img_major_mime,img_minor_mime,img_timestamp,img_sha1,img_actor,image_actor.actor_user AS `img_user`,image_actor.actor_name AS `img_user_text`,comment_img_description.comment_text AS `img_description_text`,comment_img_description.comment_data AS `img_description_data`,comment_img_description.comment_id AS `img_description_cid`,img_metadata  FROM `image` JOIN `actor` `image_actor` ON ((actor_id=img_actor)) JOIN `comment` `comment_img_description` ON ((comment_img_description.comment_id = img_description_id))   WHERE img_major_mime = 'image' AND img_media_type = 'OFFICE'  ORDER BY img_name ASC LIMIT 1  

What can I do? The script doesn't create the table.

Subfader (talkcontribs)

I created it myself according to the Gerrit change. And all the other errors like img_actor, img_description_id, missing PRIMARY KEY on templatelinks etc.

Reply to "Upgrade from 1.25: actor table missing error"