Topic on Project:Support desk

fileinfo - MW 1.34 internal error

15
DOSSOD (talkcontribs)

I'm receiving a MW 1.34 internal error; required components "fileinfo"

FileInfo folder containing Fileinfo.php, FileInfoi18nmagic.php are under the wiki/ extensions location and the php_fileinfo.dll extension in php.ini is enabled. I'm not sure what else I'm missing.


MS Visual C++ 2019

PHP 7.2.31

MySQL 5.7.17

Ciencia Al Poder (talkcontribs)

Look at the output of phpinfo(); as described in Manual:php.ini, to see if it's really enabled and on which php.ini.

DOSSOD (talkcontribs)

I have made a search and found, php.ini.

I also looked at the phpinfo.php via browser. The Configuration File (php.ini) path only says: C:\Windows, where the loaded configuration path actually shows where the pp.ini file is located.


the following are set:

extension_dir= "ext"

extension=fileinfo


looks like that's all what is needed but I'm still getting a error, even when I cmd > iisreset

Ciencia Al Poder (talkcontribs)

phpinfo also displays the list of loaded extensions. If fileinfo is not listed as installed, something is not set correctly in your php.ini.

Note that you may need to restart the webserver in order to changes to php.ini files take effect

DOSSOD (talkcontribs)

FileInfo was not listed, WinCache was also not listed. Not sure but I'll look over it again .... otherwise there shouldn't be anything else outside the phpini that needs to be set, correct?


Interesting is when I delete all WikiMedia 1.34. files and copy WikiMedia 1.25 file into the wiki folder, the fileinfo error doesn't appear and I see the wikimedia installation page.

DOSSOD (talkcontribs)

Do I need the GNU file package for windows from here: http://gnuwin32.sourceforge.net/downlinks/file-bin-zip.php


The Instructions says to extract the folder from the archive called shared\file which contains 4 magic files (magic, magic.mgc, magic.mime, magic.mime.mgc) but there are only two files in the zip file (FileInfo.i18n.magic.php, FileInfo.php)...

Ciencia Al Poder (talkcontribs)
DOSSOD (talkcontribs)

Ok. I'm going to reinstall PHP again then. For MW 1.34, what PHP version would you recommend then?

Ciencia Al Poder (talkcontribs)
DOSSOD (talkcontribs)

I followed these instructions.

MS Visual C++ 2019

PHP 7.3.20

MySWL 5.7.17

MW 1.34.1


opening the wiki media installation page, tells me "required components missing (mbstring, fileinfo)

These dll's are in the ./ext folder. Do I have to install them manually? php.ini shows them as enabled.

    • mbstring (required since 1.27, recommended for earlier versions)
    • fileinfo (required since 1.30)
  • Note that all of these are enabled in PHP by default.
Ciencia Al Poder (talkcontribs)

Look at the output of phpinfo(); as described in Manual:php.ini, to see if they're really enabled and on which php.ini. If MediaWiki can't detect them, they're not enabled, despite the manual page saying they're enabled by default.

DOSSOD (talkcontribs)

There are 3 PHP files in the PHP folder.

1) php. ini (here are the extensions enabled)

2) php.ini-production

3) php.ini-development


Do I have to modify the php.ini-production as well? The PHP output (http://localhost/phpinfo.php) PHP 7.3.20 shows the loaded configuration file >> 1) << which shows the mbstring and fileinfo not listed. So, there are not loaded, even when the php.ini file shows them as enabled with the correct path to the ./ext folder. All info I find just repeats the same steps which I've followed numerous times.

Ciencia Al Poder (talkcontribs)

php.ini-production and php.ini-development are sample files. They're not meant to be loaded directly.

phpinfo doesn't lie. If the php extension is not listed as loaded, it's not loaded.

Be sure the line where the extension is supposed to be loaded is not commented out.

DOSSOD (talkcontribs)

I've verified this numerous times. I just looked at it again and extension=fileinfo and extension=mbstring are not commented out.

I also looked at extension = "C:\Program Files (x86)\PHP\ext\" which points to the library file.

DOSSOD (talkcontribs)

I finally fixed it. The PHP folder is under C:\Program Files (x86)\PHP --- I moved it out directly under C:\PHP modify the php.ini file with the updated path and all worked. Crazy.


Thanks for all the help!