CodeIgniter Forums
website is getting blank when upload to server of codeigniter 4 application - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forum-30.html)
+--- Thread: website is getting blank when upload to server of codeigniter 4 application (/thread-79035.html)



website is getting blank when upload to server of codeigniter 4 application - webdeveloper011 - 04-11-2021

Hi
I have built a website using CodeIgniter 4 and uploaded it to my server. But once I upload it, It is showing the blank white page without displaying anything. 

This is where I uploaded it. 
dnationsoft.com

I have checked my error log. The error log report is:

[12-Apr-2021 10:23:07 Asia/Dhaka] PHP Fatal error:  Uncaught ErrorException: Cannot modify header information - headers already sent by (output started at /home/dnations/app/Config/Events.php:27) in /home/dnations/system/Debug/Exceptions.php:162
Stack trace:
#0 [internal function]: CodeIgniter\Debug\Exceptions->errorHandler(2, 'Cannot modify h...', '/home/dnations/...', 162, Array)
#1 /home/dnations/system/Debug/Exceptions.php(162): header('HTTP/1.1 500 In...', true, 500)
#2 [internal function]: CodeIgniter\Debug\Exceptions->exceptionHandler(Object(ErrorException))
#3 {main}
  thrown in /home/dnations/system/Debug/Exceptions.php on line 162



I have search on google and stackoverflow to find any solution, But I could not. Can anyone please help me why is this happening? and how to solve it?


RE: website is getting blank when upload to server of codeigniter 4 application - John_Betong - 04-11-2021

Have you made the online ../writable folder writable by setting permissions to 0777?

Upload ../env file to the server and temporarily rename to .env and add the following line then check your log file again:

Code:
CI_ENVIRONMENT = development
logger.threshold = 5



RE: website is getting blank when upload to server of codeigniter 4 application - webdeveloper011 - 04-12-2021

(04-11-2021, 10:36 PM)John_Betong Wrote: Have you made the online ../writable folder writable by setting permissions to 0777?

Upload ../env file to the server and temporarily rename to .env and add the following line then check your log file again:

Code:
CI_ENVIRONMENT = development
logger.threshold = 5

Hi
Yes I have make that online and given the permission of the writable folder 0777. Also I have renamed the .env file temporarily. Added the logger.threshold = 5 as well.
So after doing everything, it is not yet working.
Please help if any more idea?
Thank you


RE: website is getting blank when upload to server of codeigniter 4 application - demyr - 04-12-2021

You can also focus on 500 errors on Google. You can see lots of possible reasons for them including htaccess.


RE: website is getting blank when upload to server of codeigniter 4 application - John_Betong - 04-12-2021

Unfortunately the errors produced by Kint are misleading and unhelpful. Also I have not found any way to eliminate Kint because it is far too deeply embedded.

The normal PHP errors have always been adequate and also accurate as far as breaking on errors and showing helpful messages. The PHP error system has been refined over twenty years and is very good especially with xdebug.

It looks as though it is necessary to add manual breakpoints to pinpoint the problem


RE: website is getting blank when upload to server of codeigniter 4 application - John_Betong - 04-13-2021

@webdeveloper011

I just noticed your site is now rendering OK.

For the benefit of others and me please post the errors that you had to fix in order for the site to load.