Welcome Guest, Not a member yet? Register   Sign In
Blank page on the web server
#17

It is not easy trying to find errors when nothing is showing so I force errors and ensure something is shown and not a blank page.

Make sure the following points are noted:

1. add this line to ./app/Views/welcome_message.php -> <?php echo $bad_value/$bad; ?>
2. set index.php -> $_SERVER['CI_ENVIRONMENT'] = 'development';

I have set the above and the results can be found here and errors are showing:

https://ci4-strict.tk/admin/index-development.php

Here are the changes made to index.php
Code:
...
...
unset($minPHPVersion);

// START NEW STUFF GOES HERE =========================================================
error_reporting(-1); // regardless

define('LOG_FILE',   '../writable/logs/log-' .date('Y-m-d') .'.php');
define('LOCALHOST', 'localhost'===$_SERVER['SERVER_NAME']);
if(LOCALHOST) :
  define('CI_DEBUG',  FALSE); // bypass (bool) app/Config/oot/development.php
  ini_set('display_errors', '1');

  $_SERVER['CI_ENVIRONMENT'] = 'production';  // bypass .env & .htaccess
  if(01):
    $_SERVER['CI_ENVIRONMENT'] = 'development'; // bypass .env & .htaccess
  endif;  
  $useKint =  FALSE;

# CLEANER -  only shows last error logs and debugbar JSON files
  $ok = @unlink(LOG_FILE);
  $ok = @array_map('unlink', glob("../writable/debugbar/*.json"));
else:  
  define('CI_DEBUG', FALSE); // bypass (bool) app/Config/oot/prdouction.php
  ini_set('display_errors', '1');
  # $_SERVER['CI_ENVIRONMENT'] = 'production'; // bypass .env & .htaccess
  $_SERVER['CI_ENVIRONMENT'] = 'development'; // bypass .env & .htaccess
  $useKint = FALSE;
endif;
// FINISH NEW STUFF GOES HERE =========================================================
Reply


Messages In This Thread
Blank page on the web server - by PHS - 04-14-2020, 06:48 PM
RE: Blank page on the web server - by John_Betong - 04-14-2020, 08:36 PM
RE: Blank page on the web server - by PHS - 04-15-2020, 06:39 AM
RE: Blank page on the web server - by John_Betong - 04-15-2020, 07:00 AM
RE: Blank page on the web server - by PHS - 04-15-2020, 10:29 AM
RE: Blank page on the web server - by John_Betong - 04-15-2020, 07:25 PM
RE: Blank page on the web server - by PHS - 04-17-2020, 07:13 AM
RE: Blank page on the web server - by maxxd - 04-17-2020, 03:31 PM
RE: Blank page on the web server - by PHS - 04-18-2020, 10:00 AM
RE: Blank page on the web server - by PHS - 04-21-2020, 02:55 PM
RE: Blank page on the web server - by John_Betong - 04-21-2020, 05:36 PM
RE: Blank page on the web server - by PHS - 04-21-2020, 07:23 PM
RE: Blank page on the web server - by John_Betong - 04-21-2020, 11:54 PM
RE: Blank page on the web server - by PHS - 04-22-2020, 07:09 AM
RE: Blank page on the web server - by John_Betong - 04-22-2020, 07:14 AM
RE: Blank page on the web server - by PHS - 04-22-2020, 07:25 AM
RE: Blank page on the web server - by John_Betong - 04-22-2020, 08:22 AM
RE: Blank page on the web server - by PHS - 04-22-2020, 11:26 AM
RE: Blank page on the web server - by John_Betong - 04-22-2020, 03:54 PM
RE: Blank page on the web server - by ivanfdr - 04-22-2020, 08:47 PM
RE: Blank page on the web server - by ivanfdr - 04-22-2020, 09:44 PM
RE: Blank page on the web server - by PHS - 04-23-2020, 07:12 AM
RE: Blank page on the web server - by John_Betong - 04-23-2020, 08:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB