PHP warning

is_file(): open_basedir restriction in effect. File(/survey/questions/answer/file_upload/config.xml) is not within the allowed path(s): (/var/www/html/:/var/www/tmp/:/usr/share/php/)

/var/www/html/application/models/QuestionTemplate.php(268)

256 
257     /**
258      * In the future, could retrieve data from DB
259      */
260     public function setConfig()
261     {
262         if (!isset($this->oConfig)) {
263             $oQuestion                    = $this->oQuestion;
264             $sTemplatePath                = $this->getTemplatePath();
265             $sFolderName                  = self::getFolderName($oQuestion->type);
266             $this->sTemplateQuestionPath  = $sTemplatePath . '/survey/questions/answer/' . $sFolderName;
267             $xmlFile                      = $this->sTemplateQuestionPath . '/config.xml';
268             $this->bHasConfigFile         = is_file($xmlFile);
269 
270             if ($this->bHasConfigFile) {
271                 $sXMLConfigFile               = file_get_contents(realpath($xmlFile)); // Entity loader is disabled, so we can't use simplexml_load_file; so we must read the file with file_get_contents and convert it as a string
272                 $this->xmlFile                = $xmlFile;
273                 $this->oConfig                 = simplexml_load_string($sXMLConfigFile);
274 
275                 $this->bLoadCoreJs             = $this->oConfig->engine->load_core_js;
276                 $this->bLoadCoreCss            = $this->oConfig->engine->load_core_css;
277                 $this->bLoadCorePackage        = $this->oConfig->engine->load_core_package;
278                 $this->bHasCustomAttributes    = !empty($this->oConfig->attributes);
279 
280                 // Set the custom attributes

Stack Trace

#0
+
 /var/www/html/application/models/QuestionTemplate.php(268): is_file("/survey/questions/answer/file_upload/config.xml")
263             $oQuestion                    = $this->oQuestion;
264             $sTemplatePath                = $this->getTemplatePath();
265             $sFolderName                  = self::getFolderName($oQuestion->type);
266             $this->sTemplateQuestionPath  = $sTemplatePath . '/survey/questions/answer/' . $sFolderName;
267             $xmlFile                      = $this->sTemplateQuestionPath . '/config.xml';
268             $this->bHasConfigFile         = is_file($xmlFile);
269 
270             if ($this->bHasConfigFile) {
271                 $sXMLConfigFile               = file_get_contents(realpath($xmlFile)); // Entity loader is disabled, so we can't use simplexml_load_file; so we must read the file with file_get_contents and convert it as a string
272                 $this->xmlFile                = $xmlFile;
273                 $this->oConfig                 = simplexml_load_string($sXMLConfigFile);
#1
+
 /var/www/html/application/models/QuestionTemplate.php(76): QuestionTemplate->setConfig()
71     {
72         self::$instance = new QuestionTemplate();
73         self::$instance->oQuestion = $oQuestion;
74         self::$instance->aViews    = array();
75         self::$instance->getQuestionTemplateFolderName(); // Will initiate $sTemplateFolderName and $bHasTemplate.
76         self::$instance->setConfig();
77         return self::$instance;
78     }
79 
80     /**
81      * Get the current instance of template question object.
#2
+
 /var/www/html/application/helpers/qanda_helper.php(151): QuestionTemplate::getNewInstance(Question)
146         ,'input_error_class'  => ''              // provides a class.
147         ,'essentials'         => ''
148     );
149 
150     $oQuestion = Question::model()->findByPk($ia[0]);
151     $oQuestionTemplate = QuestionTemplate::getNewInstance($oQuestion);
152     $oQuestionTemplate->registerAssets(); // Register the custom assets of the question template, if needed
153     $oRenderer = $oQuestion->getRenderererObject($ia);
154     $values = $oRenderer->render();
155 
156 
2021-12-07 20:40:39 Apache Yii Framework/1.1.24-dev