SteveRMann Posted March 17, 2023 Share Posted March 17, 2023 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? Quote Link to comment https://forums.phpfreaks.com/topic/316014-mediawiki-139-internal-error-installing-some-php-extensions-is-required/ Share on other sites More sharing options...
Barand Posted March 17, 2023 Share Posted March 17, 2023 Edit your php.ini file and remove the ";" from the start of the lines specifying those extension EG ;extension=mbstring ^ remove Restart your server. Quote Link to comment https://forums.phpfreaks.com/topic/316014-mediawiki-139-internal-error-installing-some-php-extensions-is-required/#findComment-1606570 Share on other sites More sharing options...
SteveRMann Posted March 17, 2023 Author Share Posted March 17, 2023 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? Quote Link to comment https://forums.phpfreaks.com/topic/316014-mediawiki-139-internal-error-installing-some-php-extensions-is-required/#findComment-1606575 Share on other sites More sharing options...
Barand Posted March 17, 2023 Share Posted March 17, 2023 The output from phpinfo() will tell which php.ini is being used In the php.ini file there will be a line defining the folder where it expects the extensions to be stored Check that is where the new extensions were installed. Quote Link to comment https://forums.phpfreaks.com/topic/316014-mediawiki-139-internal-error-installing-some-php-extensions-is-required/#findComment-1606576 Share on other sites More sharing options...
kicken Posted March 17, 2023 Share Posted March 17, 2023 Try sudo phpenmod mbstring intl Then restart the server. Quote Link to comment https://forums.phpfreaks.com/topic/316014-mediawiki-139-internal-error-installing-some-php-extensions-is-required/#findComment-1606577 Share on other sites More sharing options...
SteveRMann Posted March 18, 2023 Author Share Posted March 18, 2023 (edited) 2 hours ago, Barand said: The output from phpinfo() will tell which php.ini is being used In the php.ini file there will be a line defining the folder where it expects the extensions to be stored 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 March 18, 2023 by SteveRMann Quote Link to comment https://forums.phpfreaks.com/topic/316014-mediawiki-139-internal-error-installing-some-php-extensions-is-required/#findComment-1606578 Share on other sites More sharing options...
requinix Posted March 18, 2023 Share Posted March 18, 2023 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? Quote Link to comment https://forums.phpfreaks.com/topic/316014-mediawiki-139-internal-error-installing-some-php-extensions-is-required/#findComment-1606579 Share on other sites More sharing options...
SteveRMann Posted March 18, 2023 Author Share Posted March 18, 2023 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? Quote Link to comment https://forums.phpfreaks.com/topic/316014-mediawiki-139-internal-error-installing-some-php-extensions-is-required/#findComment-1606580 Share on other sites More sharing options...
requinix Posted March 18, 2023 Share Posted March 18, 2023 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. 1 Quote Link to comment https://forums.phpfreaks.com/topic/316014-mediawiki-139-internal-error-installing-some-php-extensions-is-required/#findComment-1606581 Share on other sites More sharing options...
SteveRMann Posted March 19, 2023 Author Share Posted March 19, 2023 Thanks. This is a new computer and all I have installed was Home Assistant and Dokuwiki. One of them may have installed PHP. Is PHP likely upward compatible? I.E. if PHP7 was installed by DokuWiki, is it likely to work fine with PHP8? Quote Link to comment https://forums.phpfreaks.com/topic/316014-mediawiki-139-internal-error-installing-some-php-extensions-is-required/#findComment-1606607 Share on other sites More sharing options...
requinix Posted March 19, 2023 Share Posted March 19, 2023 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. Quote Link to comment https://forums.phpfreaks.com/topic/316014-mediawiki-139-internal-error-installing-some-php-extensions-is-required/#findComment-1606616 Share on other sites More sharing options...
SteveRMann Posted March 19, 2023 Author Share Posted March 19, 2023 On 3/18/2023 at 12:03 AM, requinix said: The easiest thing to do will be to remove all of your PHP and Apache stuff completely Thanks. Purged php (all three versions) and Apache. Reinstalled and everything is working now. Quote Link to comment https://forums.phpfreaks.com/topic/316014-mediawiki-139-internal-error-installing-some-php-extensions-is-required/#findComment-1606617 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.