Welcome Guest, Not a member yet? Register   Sign In
Manual Install
#1

Hi.
I have done the manual installation, unzipped the folder at www/ci4. Assigned "chmod -R 755 ci4 /".
I use docker image "php: 7.4.4-apache" with volume to local folder.
When I run: http: // localhost: 8080 / ci4 / public
seen in browser:
Quote:Whoops!
We seem to have hit a snag. Please try again later...
I have also downloaded a udemy course and it is the same.
What I can do?
(I use Linux Mint)
Reply
#2

(This post was last modified: 04-11-2020, 07:08 PM by John_Betong.)

The ../writable needs to be writable with permission set to 0777

I am not sure how to change directory permissions using LinuxMint.

Ubuntu - open command window and enter the following:

sudo chmod -R 0777 writable
Reply
#3

Thanks for the reply.
In LinxuMint it is the same as ubunto. I have already done "chmod -R 777 ci4 / writable".
I have verified that the folder and all the content are really with write permission.

But the problem continues.
Reply
#4

Check the log files in the “writable” folder. It can be anything. Also, set the environnement to “development” in “.env” file. Instead of the generic message you will get detailed error messages.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#5

(This post was last modified: 04-12-2020, 08:40 PM by John_Betong.)

I prefer not to use the .env file. Without the leading period the env file settings are inactive.

Also as a temporary override I use the following:
File: index.php
Code:
<?php // declare(strict_types=1); // unfortunately CI4 fails validation

// Bypass htaccess setting of CI_ENVIRONMENT
// $_SERVER['CI_ENVIRONMENT'] = 'production';  // bypass .env & .htaccess
   $_SERVER['CI_ENVIRONMENT'] = 'development'; // bypass .env & .htaccess

// bypass (bool) app/Config/boot/development.php
   define('CI_DEBUG',  FALSE);
   error_reporting(-1); // regardless
   ini_set('display_errors', '1');

// disable Klint and prevent overriding page layout
// require '../system/ThirdParty/Kint/kint.php';
   $useKint =  FALSE;

  // remaining index.php content goes here
   $useKint =  FALSE;

and as @includebeer mentioned:
Don't forget to check the log files in the “writable” folder.
Reply
#6

Quote:I prefer not to use the .env file. Without the leading period the env file settings are inactive. 

Also as a temporary override I use the following:
File: index.php

I’m curious why you think this is better than using the .env file.
The .env file is there exactly for that. Why complicate things?

The other ways to change the environnement variable are describe here: https://codeigniter4.github.io/userguide...ments.html
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#7

(This post was last modified: 04-13-2020, 09:04 PM by John_Betong.)

@includebeer,
> I’m curious why you think this is better than using the .env file. The .env file is there exactly for that. Why complicate things?

> If somebody know nothing about CodeIgniter and install it in production for the first time, then what can we do? It is just stupid. It’s not hard to test on a local server.

I am endeavoring to make it easy to render "Hello world" straight out of the box and not to have an uninformative "Whoops message" appear.

I did suggest amendments to the installation in this thread:

https://forum.codeigniter.com/thread-75857.html

I appreciate that the suggested JavaScript message is bit over the top, At least a non PHP standard environment should NOT be necessary to amend in order for the splash screen to appear. PHP has a perfectly good error reporting system which has been thoroughly tested and caters for every eventuaility. Why not accept the defaults which should be familiar with Noobies who want to try CodeIgniter4 and not introduce hurdles. I also assume that Noobies would be familiar with the error reporting system and know where to look to find why the screen does not apper BUT in 'production' error reporting is overridden and set to zero?

I have just "git cloned" the latest version and it is still the same!

1. "Whoops..." appears and the uninformative message is still the same!

2. Making the writable folder writable shows the "Hello world" message and is not necessary?

My concerns are that even though the CI_DEVELOPMENT has not been set then it defaults to 'production' and the writable folder is just not required because there is nothing written?

I think that Noobies expect after downloading "Hello world" would appear and it is off-putting if an unhelpful message appears. As a Noobie I would most probably not bother in problem investigating and solution finding if the designers make installation complicated.

I do get the distinct impression that CodeIgniter4 is just for previous users who wish to upgrade?

Once the initials screen is rendered then the user can investigate how to activate 'development' mode.

Reminds me of the KISS Principle and also to quote Colin Chapman, the founder of Lotus Cars who urged his designers to "Simplify, then add lightness".

"It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away".
Reply
#8

I think all this confusion can be ridden of by simply putting the environnement to development by default instead of production. It’s perfectly normal that in production the amount of error on the screen is limited to a minimum. But I agree it would be easier for everybody, not just the newbies, if the default would be to display all error messages. Maybe @kilishan can give his input on this matter.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply
#9

(04-11-2020, 10:05 AM)Cecilio Wrote: ...
When I run: http: // localhost: 8080 / ci4 / public
...

Hi,
Just 0.02 from a noobie...
Maybe I'm missing something, but...
After renamed the env file to .env and set the environment to development...
When using "php spark serve" you'd must run ONLY http: // localhost: 8080
But using XAMPP (or something like that; I use XAMPP on Windows) I think you'd must run http: // localhost / ci4 / public
Additionally, I had to change $baseURL on app\Config\App.php from http: // localhost: 8080 to something like http: // localhost / ci4 / public

Hope this helps! Sorry if that's not the case...
Best regards!
Reply
#10

(04-14-2020, 06:50 AM)FlavioSuar Wrote:
(04-11-2020, 10:05 AM)Cecilio Wrote: ...
When I run: http: // localhost: 8080 / ci4 / public
...

But using XAMPP (or something like that; I use XAMPP on Windows) I think you'd must run http: // localhost / ci4 / public
Additionally, I had to change $baseURL on app\Config\App.php from http: // localhost: 8080 to something like http: // localhost / ci4 / public

The base url can also be changed in the .env file, and it’s not necessarily localhost/ci4/public. It depends on how your configured your web server. It can be anything you decide, like http://my-awesome-website.test
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply




Theme © iAndrew 2016 - Forum software by © MyBB