dataleim Posted April 1, 2023 Share Posted April 1, 2023 Hi, I have this error: AH01071: Got error 'PHP message: PHP Warning: file_exists(): open_basedir restriction in effect. File(/views/templates/hook/eventViewItem.tpl) is not within the allowed path(s): (/var/www/vhosts/xxxx.com/:/tmp/) in /var/www/vhosts/xxxx.com/httpdocs/classes/module/Module.php on line 2509' in the Module.php the line 2509 contains: !file_exists($template) Complete code: /** * @param string $template * @param string|null $cache_id * @param string|null $compile_id * * @return Smarty_Internal_Template */ protected function getCurrentSubTemplate($template, $cache_id = null, $compile_id = null) { if ($compile_id === null) { $compile_id = $this->getDefaultCompileId(); } if (!isset($this->current_subtemplate[$template . '_' . $cache_id . '_' . $compile_id])) { if (false === strpos($template, 'module:') && !file_exists(_PS_ROOT_DIR_ . '/' . $template) &&2509-> !file_exists($template) ) { $template = $this->getTemplatePath($template); } $this->current_subtemplate[$template . '_' . $cache_id . '_' . $compile_id] = $this->context->smarty->createTemplate( $template, $cache_id, $compile_id, $this->smarty ); } return $this->current_subtemplate[$template . '_' . $cache_id . '_' . $compile_id]; } Any ideas where can I search to fix this? Thanks! Link to comment Share on other sites More sharing options...
ps8modules Posted April 2, 2023 Share Posted April 2, 2023 Hi. Modify the open_basedir settings in your hosting and set them to none. 1 Link to comment Share on other sites More sharing options...
Federica99 Posted June 1, 2023 Share Posted June 1, 2023 I have the same warning... but I can't disable open_basedir for a security reason. Can anyone help me please? PHP Warning: file_exists(): open_basedir restriction in effect. File(/views/templates/hook/style.tpl) is not within the allowed path(s): (/home/cmrledsh/:/opt/cpanel/ea-php81/root/usr:/usr/local/lib/php:/tmp:/etc/pki/tls/certs/ca-bundle.crt:/var/cpanel/php/sessions:/usr/local/bin/wp) in /home/cmrledsh/public_html/classes/module/Module.php on line 2287 Link to comment Share on other sites More sharing options...
oktu.it Posted July 24, 2023 Share Posted July 24, 2023 same error , i can't import images in php 8.04 via CSV Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now