Topic on Project:Support desk

Installation problems: 1.30.0

12
FoulFoot (talkcontribs)

When I reach the environmental checks page, I get this:

PHP 7.0.27 is installed.

Warning: Could not find APCu, XCache or WinCache.

Object caching is not enabled.

GNU diff3 not found.

Could not find GD library or ImageMagick.

Image thumbnailing will be disabled.

Git version control software not found.

The only true statement there is that PHP 7.0.27 is indeed installed. However, it is correctly configured with APCu, Zend OpCache, diff3, and ImageMagick. I run separate software that utilizes all these extensions just fine; somehow, MediaWiki can't find them.

The only setting in LocalSettings.php that seems to reference an extension is:

$wgImageMagickConvertCommand = '/usr/bin/convert';

... and that indeed is the path to imagick.

Any ideas what I'm doing wrong here?

Scott

星耀晨曦 (talkcontribs)

Please use phpinfo(); to check you really installed these things. These warnings shouldn't affect normal installation.

FoulFoot (talkcontribs)

Yep, phpinfo confirms they are installed, and as I mentioned, they're working with other software.

I'm actually upgrading this MediaWiki (from 1.28.0), and these things didn't work then either. I've just decided to try and figure out what's wrong. As you said, MediaWiki will install okay, it's just slow because of no caching and no imagemagick.

Scott

2001:16B8:106C:FA00:65D2:7044:189B:5A70 (talkcontribs)

Without ImageMagick, MediaWiki will not be able to create thumbnails. Actually, I believe that MediaWiki is only searching some default paths for ImageMagick; it will not find the installation, if it in fact is at another place.

See Manual:$wgImageMagickConvertCommand for more information. You might be able to figure the correct path to ImageMagick using which -a convert on the shell.

2001:16B8:106C:FA00:65D2:7044:189B:5A70 (talkcontribs)
FoulFoot (talkcontribs)

Yeah, I've already checked all that. Imagemagick is in the standard place, and the path is correctly set in LocalSettings.php : $wgImageMagickConvertCommand = '/usr/bin/convert'

There's something bigger going on, because MediaWiki can't see any of those other extensions (APCu, diff, etc) that are built-in to the PHP install. It's as if MediaWiki is unable to access directories above the public_html directory. Does MediaWiki need to be uploaded using the root user? (I wouldn't think so, but I'm running out of ideas here).

Scott

2001:16B8:106C:FA00:65D2:7044:189B:5A70 (talkcontribs)

> Does MediaWiki need to be uploaded using the root user?

No, normally it is working if uploaded as any normal user as well.

I would now check the debug log. See Manual:How to debug for information on how to enable it!

Afterwards, I would again visit a page inside the Image namespace, where MediaWiki would normally try to create a thumbnail, if using ImageMagick in fact is activated.

I expect the debug log to afterwards contain the ImageMagick command used - and also the return code in case of an error...

FoulFoot (talkcontribs)

OK, I fixed this. What a mess.

As recommended in the documentation, I had turned on FastCGI PHP handler (PHP-FPM). When you do this, certain PHP functions are automatically disabled: proc_open(), exec(), and shell_exec(). Without these, MediaWiki won't use ImageMagick or diff. Editing php.ini has no effect; the functions are disabled elsewhere.

The instructions here will show you how to get those functions enabled: https://forums.cpanel.net/threads/enabling-php-fpm-forces-disable_functions.590799/

Now, all these functions are a security risk, and are recommended to be disabled. Why MediaWiki feels the need to use shell_exec() to access ImageMagick, I don't know; it doesn't need to do that. /rant off

Thank you for your assistance and attention!

Scott

星耀晨曦 (talkcontribs)

Because ImageMagick is an external program.

TheDJ (talkcontribs)

Yes MediaWiki might have to use lots of external programs to do all the things it can do. This is because some of those tools are sometimes simply better than what PHP can deliver. Within the Wikipedia/Wikimedia world, this isn't such a problem, because we have lots of seasoned system administrators, who know what they are doing.

Having these things off in default PHP installations is however not a bad default, I have to agree. It just makes it a little bit more difficult to setup MediaWiki unfortunately. Maybe we should have some sort of detection logic for such disable_functions, to make it easier to complete the MediaWiki installation.

77.191.87.141 (talkcontribs)

Hello there,

i am trying to install Mediawiki , but I have this problem at creating databases name and users name and the along password:


Cannot access the database: :real_connect(): (HY000/1045):


could anyone please help me how to deal with this error ?


thanks in advanced

星耀晨曦 (talkcontribs)

Make sure your database is already started.

Reply to "Installation problems: 1.30.0"