CodeIgniter Forums
CI 4 Showing Blank Pages in ubuntu 20.04 LTS - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: CI 4 Showing Blank Pages in ubuntu 20.04 LTS (/showthread.php?tid=77256)



CI 4 Showing Blank Pages in ubuntu 20.04 LTS - psreejiths - 08-08-2020

Hi all
i did some pages in CI4 and hosted in Ubuntu 20.04 LTS desktop , but the pages are showing blank without any message.
i did many ways but the out put is same.

i tried the .htacess file as

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.)$ index.php/$1 [L]
RewriteCond %{HTTPS} !=on
RewriteRule ^(.
)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>


and enable rewrite_mod also .
please help if any solution for the same


RE: CI 4 Showing Blank Pages in ubuntu 20.04 LTS - paulbalandan - 08-08-2020

What CI4 version are you using?

This may be caused by php.ini setting zlib.output_compression turned on.


RE: CI 4 Showing Blank Pages in ubuntu 20.04 LTS - obstbude - 08-11-2020

Did you set the CI environment?
You can do this ether in public/.htaccess
Code:
SetEnv CI_ENVIRONMENT development
 
Or in apaches virtual host file (example below):
PHP Code:
<VirtualHost *:80>
        ServerName MYHOST.MYNETWORK
        DocumentRoot 
"PATH_TO_CI4/public"
        ErrorLog "/var/log/apache2/MYHOST_error.log"
        CustomLog "/var/log/apache2/MYHOST_access.log" common
        
#ServerAlias www.MYHOST.example.com

        SetEnv CI_ENVIRONMENT development

        
<Directory "PATH_TO_CI4/public">
            Require all granted
        
</Directory>
</
VirtualHost

Make sure that mod_php is enabled on Ubuntu:
Code:
a2enmod php
sudo systemctl restart apache2