Hi,
I dig into this and found that the "
$this->loader->locateFile" is raising exception in
System/View/View at line: 222
PHP Code:
if (! is_file($this->renderVars['file']))
{
$this->renderVars['file'] = $this->loader->locateFile($this->renderVars['view'], 'Views', empty($fileExt) ? 'php' : $fileExt);
}
Here are values I collected here:
----------------------------------------------------------------------
$this->renderVars['view']: R1/My/my_view.php
----------------------------------------------------------------------
$this->viewPath: /app/Config/../Views/
----------------------------------------------------------------------
$this->renderVars['file']: /app/Config/../Views/R1/My/my_view.php
----------------------------------------------------------------------
$this->loader->locateFile($this->renderVars['view']:
Result assigned at line 222 is BLANK which raises exception
----------------------------------------------------------------------
Still I am unable to conclude why its happening as its working at local machine? Why
locateFile is unable to locate views? Do i need to change .htaccess. Following is what I have now:
IndexIgnore *
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/system.*
RewriteRule ^(.*)$ index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?/$1 [L]
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php72” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
# Add Font Types
AddType application/vnd.ms-fontobject .eot
AddType font/truetype .ttf
AddType font/opentype .otf
AddType font/opentype .woff
AddType font/opentype .woff2
AddType image/svg+xml .svg .svgz
<FilesMatch ".(eot|ttf|otf|woff|woff2|svg|svgz)">
Header set Access-Control-Allow-Origin "http://www.your_website.com"
</FilesMatch>
Note: zlib output compression is turned off & I am using PHP 7.2