selfoss icon indicating copy to clipboard operation
selfoss copied to clipboard

Internal Server Error: Fatal error: Module 'imagick' already loaded

Open desbest opened this issue 2 years ago • 12 comments

This is what I see when a load the page.

Internal Server Error
Fatal error: Module 'imagick' already loaded

Then when I refresh the page it disappears with the page finally loading. But then the error appears again once I refresh the page again.

I'm using Selfoss 2.18

desbest avatar Feb 10 '22 18:02 desbest

That sounds like issue with your server config. What operating system (Linux distribution) do you use? On most Linux distros extensions are enabled in separate ini files so you should not have extension=imagick.so in php.ini.

jtojnar avatar Feb 10 '22 18:02 jtojnar

Sorry for the late reply. My laptop was faulty for 2 weeks. It's using Cloud Linux which is based on CentOS. It's using Image Magick 3.4.4 See the attached screenshot.

CF2D5D3E-A85D-4150-8F4C-7DA226BB39C6

desbest avatar Feb 24 '22 16:02 desbest

Could you check the php.ini file contents?

jtojnar avatar Feb 24 '22 20:02 jtojnar

The php.ini file does not exist anywhere on my website in the file-folder structure either in the home directory or any subfolders (eg. selfoss/) However the web host I'm using does virtually generate a php.ini file with some settings already filled in by default, for security, resource allocation management and performance reasons.

multi php ini editor cpanel for desbest portfolio

desbest avatar Feb 27 '22 12:02 desbest

There must be a php.ini somewhere on the system (e.g. /etc/php.ini according to https://www.rootusers.com/where-is-the-php-ini-configuration-file-in-centos/). You can also try to look at the “editor mode” on the web page.

On Sun, Feb 27 2022 at 04:53:02 -0800, desbest @.***> wrote:

The php.ini file does not exist anywhere on my website in the file-folder structure either in the home directory or any subfolders (eg. selfoss/) However the web host I'm using does virtually generate a php.ini file with some settings filled in by default as a preset, for security reasons.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you commented.Message ID: @.***>

jtojnar avatar Feb 27 '22 13:02 jtojnar

I've looked at the editor mode and the text box is blank. By the way, that MultiPHP INI Editor feature in Cpanel, it automatically detects every php.ini file stored on my website.

I don't have root access to the server as I'm using a reseller account, not a vps. If you're looking for something specific in advance, can you let me know what that is?

Screenshot 2022-02-27 at 13-47-39 cPanel - MultiPHP INI Editor

desbest avatar Feb 27 '22 13:02 desbest

The error sounds like you have extension=imagick.so line in both /etc/php.ini and /etc/php.d/imagick.ini. So without a root access, you might need to contact your host.

Alternately, you might want to try the nightly build of selfoss – it handles improperly configured web server more gracefully.

jtojnar avatar Feb 27 '22 14:02 jtojnar

It looks like you've provided the wrong hyperlink on your readme. Why does the "download latest" link go to the nightly build of 3 months ago, while the "nightly list" link goes to the full listing with the latest being 3 days ago?

desbest avatar Feb 27 '22 14:02 desbest

It looks like Cloudsmith is buggy again. I will have to contact support.

jtojnar avatar Feb 27 '22 15:02 jtojnar

Look at this cloudsmith bug.

cloudsmith bug with selfoss nightly versions packages

desbest avatar Feb 27 '22 15:02 desbest

I've just tried it in Selfoss 2.19 nightly and it works with no error.

desbest avatar Feb 27 '22 15:02 desbest

Yeah, it contains a change that ignores the error but that does not mean the error is not still there. It is better to have your host fix the php.ini settings since it can potentially cause issues to other apps as well.

jtojnar avatar Feb 27 '22 15:02 jtojnar