Blank page on the web server - 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: Blank page on the web server (/showthread.php?tid=76105) |
Blank page on the web server - PHS - 04-14-2020 I uploaded my project to the web server, Following the security recommendations, I placed the codeigniter 4 files in the server's non-public directory: Code: /home/user/project And in the public directory: Code: /home/user/public_html I left the codeigniter's public archives: index.php .htaccess robots.txt In the index.php file, I set the path to the codeigniter's root directory: PHP Code: $pathsPath = FCPATH. '../project/app/Config/Paths.php'; After these settings I see a blank page! What else should I do to make the system work properly? RE: Blank page on the web server - John_Betong - 04-14-2020 @PHS, > What else should I do to make the system work properly? I would add this line to index.php and ensure it is being called: file: index.php Code: <?php RE: Blank page on the web server - PHS - 04-15-2020 The index and Paths.php file are recognized and are being called! The subdirectories in the project are with permission 755, and the files with permission 644 RE: Blank page on the web server - John_Betong - 04-15-2020 Have you tried setting the environment to 'development' and... ./app/Config/Logger.php->public $threshold = 3; // 0..9 (none...all messages) then check the following which should show progress and where the failure occurrs ./writable/logs/log-2020-04-15.log RE: Blank page on the web server - PHS - 04-15-2020 These errors are returning: PHP Code: <?php defined('SYSTEMPATH') || exit('No direct script access allowed'); ?> RE: Blank page on the web server - John_Betong - 04-15-2020 (04-15-2020, 10:29 AM)PHS Wrote: These errors are returning:Error logs usually look far worse because the errors are cumulative. Clear the first error and the rest disappear. The very first error concerns something is being written before ini_set(); Search for ini_set(), add the following script and examine what is being written and clear the problem. Code: ini_set(); Also note if the error log is deleted it will be regenerated until all errors and warnings are cleared. Far easier to only have a few errors showing. RE: Blank page on the web server - PHS - 04-17-2020 According to information in the error log, the error is in the file: PHP Code: vendor/codeigniter4/framework/system/Session/Handlers/FileHandler.php(101): ini_set('session.save_pa ...', '/home/user/pr...') I went to the file and found this: PHP Code: ini_set('session.save_path', $config->sessionSavePath); Problem finding the directory path to save the session. I did a test and did a clean install of codeigniter 4 and had the same problem! Can it be VPS server configuration? RE: Blank page on the web server - maxxd - 04-17-2020 Check the `Config/App.php` file - $sessionSavePath is right around line 187 - make sure the defined path actually exists on your server. RE: Blank page on the web server - PHS - 04-18-2020 There is no problem with the directory path. I checked and they are right. I still think it is some server configuration, because I installed the clean codeigniter in a subdomain and the same problem also occurs. The point is, I'm not sure if it's a problem with the server or some codeigniter configuration. RE: Blank page on the web server - PHS - 04-21-2020 Hi, I came back here because I still couldn't solve this problem. I reinstalled the codeigniter and reconfigured the settings, but I still get a blank page that can be viewed here: I created a subdomain where I placed index.php. The files remain outside the public_html directory. I am not receiving error logs. I configured Logger.php to show me all system messages: PHP Code: public $ threshold = 9; But I get just that: Code: INFO - 2020-04-21 16:39:58 -> Controller "App\Controllers\Home" loaded. So, I think it must be some simple configuration I am not finding where to do it. |