Survey not accessible - error open_basedir Twig_Loader_Filesystem.php

More
6 months 4 weeks ago #179472 by celchuv
Hello,

I have a problem since this morning.

I can access to Limesurvey with my login (admin and normal user) but it is impossible to preview a survey or to answer to it (for the participants).

Each time I try to open a Survey, I get this message :

Erreur interne du serveur
is_file(): open_basedir restriction in effect. File(/usr/local/php56/pear/Twig_Loader_Filesystem.php) is not within the allowed path(s): (/home/iumspch2:/tmp:/var/tmp:/usr/bin:/bin:/home/suspended:/usr/share/phpMyAdmin:/dev/urandom)


I've contacted the support of the server, and they said to me that I have to change the script. But I don't know wich script is involved in this process and if in find it I don' know what to write, because the file "Twig_Loader_Filesystem.php" doesn't exist in my folders.


I've updated Limesurvey 1-2 weeks ago, it runs now on version 3.15.6+190180. The problem didn't seem to be there at this time but I'm not 100% sure.
I have a duplicate of the software (with less surveys) with runs on the same version and doesn't show the same problem.

Do you have idea on how to fix this problem ?
Thank you

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
6 months 4 weeks ago - 6 months 4 weeks ago #179484 by DenisChenu

celchuv wrote: …
I've contacted the support of the server, and they said to me that I have to change the script. But I don't know wich script is involved in this process and if in find it I don' know what to write, because the file "Twig_Loader_Filesystem.php" doesn't exist in my folders.

They lie : it's a server issue.

1 : they set the include_path to load file in /usr/local/php56/pear/ (it's not you, it's the server config)
2 : they forbid the server to read in /usr/local/php56/pear/ (same : server config)

It's a server issue. You can try to fix it yourself updating condig.php and add this at top :
set_include_path(".");

But it still a server issue.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .
Last edit: 6 months 4 weeks ago by DenisChenu.
The following user(s) said Thank You: LouisGac

Please Log in or Create an account to join the conversation.

More
6 months 4 weeks ago #179488 by celchuv
Hi DenisChenu,

Thank you very much. I've modified config.php and it worked.
I will contact the support of the server to ask them to make the modification right in the server.

Thank you again
Have a nice day
Céline
The following user(s) said Thank You: LouisGac

Please Log in or Create an account to join the conversation.

More
6 months 4 weeks ago - 6 months 4 weeks ago #179494 by jelo

DenisChenu wrote: 2 : they forbid the server to read in /usr/local/php56/pear/ (same : server config)

Perhaps related to the news that pear website was hacked. Not sure what is no longer save. The repository seems to be clean, but the website is currently down.



If the news are correct, the go-pear.phar was manipulated.

BTW: Why is it not possible to post a twitter link? I put a space " " between https:// and twitter.com.

https:// twitter.com/pear/status/1086634389465956352


The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Attachments:
Last edit: 6 months 4 weeks ago by jelo.
The following user(s) said Thank You: LouisGac

Please Log in or Create an account to join the conversation.

More
6 months 4 weeks ago - 6 months 4 weeks ago #179497 by DenisChenu

jelo wrote:

DenisChenu wrote: 2 : they forbid the server to read in /usr/local/php56/pear/ (same : server config)

Perhaps related to the news that pear website was hacked. …

No,

Totally unrelated here :).

It's a server config issue :
include_path have /usr/local/php56/pear/ but server disable reading in /usr/local/php56/pear/ …

Edited :
It's something like that in general:

1st : search in current folder if you find your file Twig_Loader_Filesystem.php
2nd : find in include_path set by server if you find Twig_Loader_Filesystem.php (here /usr/local/php56/pear/)
3rd : find in added path by tool if you find Twig_Loader_Filesystem.php (we need this one)

Here it broke because at step 2 : server say : hey : you look at /usr/local/php56/pear/ but i don't want you look here …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .
Last edit: 6 months 4 weeks ago by DenisChenu. Reason: Edited

Please Log in or Create an account to join the conversation.

More
6 months 4 weeks ago #179501 by jelo

DenisChenu wrote: Totally unrelated here :).
It's a server config issue :
include_path have /usr/local/php56/pear/ but server disable reading in /usr/local/php56/pear/ …

Well, I don't have a crystal ball. But if this is a shared hosting environment with a a global pear installation, we don't know how they installed and updated the local pear repository.

Temporary disabling access is no that uncommon, when you hear of a hacked project which is distributing a repository of code.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in or Create an account to join the conversation.

More
6 months 4 weeks ago #179502 by DenisChenu

jelo wrote: …
Well, I don't have a crystal ball. But if this is a shared hosting environment with a a global pear installation, we don't know how they installed and updated the local pear repository.

I don't care about pear or anything else here, the fact is

1. The server say to PHP: look in this directory when you search a file : .,/here/,/hereto/
2. When PHP look at /here/ the server broke an, say : «You don't have the right to look at /here/»

It's a server issue , a dumb sysadmin issue.

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand .
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: LouisGac

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!