Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

it seems that imagick is required, but imagick is not stable in PHP 7.2

  • zipmagic2008
  • zipmagic2008's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 6 months ago #188179 by zipmagic2008
My LimeSurvey version is 3.17.8-190722, installed on sugarhosts virtual host with php 7.2

When use resources function, I met such error:
Internal Server Error
is_file(): open_basedir restriction in effect. File(/opt/alt/php72/usr/share/pear/Imagick.php) is not within the allowed path(s): (/home/yffekupu:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp:/opt/alt/php52/usr/share:/opt/alt/php54/usr/share:/opt/alt/php55/usr/share:/opt/alt/php56/usr/share:/opt/alt/php70/usr/share)
An internal error occurred while the Web server was processing your request. Please contact the webmaster to report this problem.

I connected the tech support of sugarhosts, they told me that the imagick is not stable in PHP 7.2, so they disabled it, and suggest me to use GD instead. How can I fix the problem?

Thanks very much for any help.
The topic has been locked.
More
4 years 6 months ago #188184 by jelo

zipmagic2008 wrote: Internal Server Error
is_file(): open_basedir restriction in effect. File(/opt/alt/php72/usr/share/pear/Imagick.php) is not within the allowed path(s):


They block access to Imagick, but didn't removed or disabled it.
Check phpinfo() if GD is available in PHP. LimeSurvey requires a correct configured PHP.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • zipmagic2008
  • zipmagic2008's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 6 months ago #188185 by zipmagic2008
The GD is enabled.
Attachments:
The topic has been locked.
More
4 years 6 months ago #188186 by jelo
And Imagick will be shown too in the PHP info, right?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • zipmagic2008
  • zipmagic2008's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 6 months ago #188187 by zipmagic2008
No, Imagick is not shown in the PHP info.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago - 4 years 6 months ago #188190 by DenisChenu
Fix your opne_base dir before all : it's a server issue …

is_file(): open_basedir restriction in effect. File(/opt/alt/php72/usr/share/pear/Imagick.php) is not within the allowed path(s): (/home/yffekupu:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp:/opt/alt/php52/usr/share:/opt/alt/php54/usr/share:/opt/alt/php55/usr/share:/opt/alt/php56/usr/share:/opt/alt/php70/usr/share)

You ask the server to read on some directory but disable reading in this directory on the same time.

2 way to fix
1. Add /opt/alt/php72/usr/share/pear/ in allowed_path
OR
2. remove /opt/alt/php72/usr/share/pear/ from include_path


You can fix it (if server admin allow it)
Code:
if(!defined('YII_PATH')) {
    $tmpdir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();
    set_include_path('.');
    ini_set('open_basedir',$tmpdir.PATH_SEPARATOR.dirname(dirname(dirname(__FILE__))));
}
at start of config.php

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 4 years 6 months ago by DenisChenu.
The topic has been locked.
  • zipmagic2008
  • zipmagic2008's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 6 months ago #188236 by zipmagic2008
Thanks Denis for help. Did you mean that I should take the following 2 steps?
1、Add /opt/alt/php72/usr/share/pear/ in allowed_path OR remove /opt/alt/php72/usr/share/pear/ from include_path
2、Modify config.php
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago #188238 by DenisChenu
No,

Best solution : fix server (the 1)
Alternative solution : if you don't have server configuration access : do the 2.

The #2 is if you don't have complete access to your server. You must contact your hoster for this issue, and see if hacking your server configuration can fix the issue (it can work or not …).

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: zipmagic2008
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 6 months ago #188246 by tpartner
Or get another hosting service. :)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose