Jump to content

MediaWiki 1.39 internal error - Installing some PHP extensions is required.


Recommended Posts

I installed Ubuntu 24.04 Desktop on a miniPC,

I installed Apache2

I installed PHP8

I installed MediaWiki

Then I got this error on my first logon to MediaWiki:

Quote

MediaWiki 1.39 internal error - Installing some PHP extensions is required.

 

What I know bout PHP could fit on a postage stamp.  

I installed the missing extensions (mbstring and intl) using sudo apt install.

Now, how do I get PHP to recognize the plugins?

 

mw error.jpg

Link to comment
Share on other sites

Thanks. Your assistance is appreciated.

Easy to do, but which php.ini file?

/etc/php/8.1/apache2/php.ini
/etc/php/8.1/cli/php.ini

I edited both php.ini files and rebooted the server, but the problem persists.

Just to be certain I installed them with:
 

sudo apt update
sudo apt install php-mbstring
sudo apt install php-intl

What did I miss?

Link to comment
Share on other sites

2 hours ago, Barand said:

The output from phpinfo() will tell which php.ini is being used

image.png.78f9b25f9eb9f88708ee3f009ed092ab.png

In the php.ini file there will be a line defining the folder where it expects the extensions to be stored

image.png.4860107c24a3c341e3f2e1dd98b36d75.png

Check that is where the new extensions were installed.

Well, you have just quadrupled my knowledge of PHP.

 

My extension_dir is /usr/lib/php/20210902, but the extensions aren't there.

I do find them, however in two other directories:

/usr/lib/php/20160303/mbstring.so
/usr/lib/php/20220829/mbstring.so
/usr/lib/php/20160303/intl.so
/usr/lib/php/20220829/intl.so

Can I simply copy the files into the directory that php.ini says it's supposed to be in?

After which, do I need to run 

sudo phpenmod mbstring intl

as suggested by kicken?

Edited by SteveRMann
Link to comment
Share on other sites

15 minutes ago, requinix said:

If you were able to install the mbstring and intl extensions through apt then you should have been able to install Apache and PHP that way too.

Did you? Or did you install them some other way?

Thanks, this is how I installed Apache and PHP

sudo apt install apache2
sudo apt install imagemagick php php-{fpm,intl,xml,curl,gd,mbstring,mysql,apcu,zip}

 

Can I simply copy the mbstring.so and intl.so into the directory that php.ini says it's supposed to be in, or did I do something wrong with the install?

Link to comment
Share on other sites

You have multiple versions of PHP installed. One will be from apt, but the other is probably a manual install or something you got from another repository. Or maybe you installed from apt once, did something with your system setup, and then installed another.

The easiest thing to do will be to remove all of your PHP and Apache stuff completely, make sure you're set up to be able to install the version of PHP you need, then install just that one. You should have one directory with all the extensions and they should be all available without having to edit any INI files.

  • Great Answer 1
Link to comment
Share on other sites

PHP is mostly forward-compatible. Mostly. But PHP does use new major versions to make big, incompatible changes to some aspects.

Short of checking DokuWiki's documentation about itself, where it will likely say something like "requires PHP 7+" and maybe even "...up to PHP 8.x", the most effective way to find out if it will work is to run it and see if it works.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.