Whoops! We seem to have hit a snag. Please try again later

前端 未结 11 3040
死守一世寂寞
死守一世寂寞 2021-02-20 06:50

Whoops! We seem to have hit a snag. Please try again later.

Codeigniter 4 shows an error when I run the CI4 application, Ho

相关标签:
11条回答
  • 2021-02-20 07:31

    You're running in the production environment and need to change it to a Development or Testing environment to see the error messages within the browser.

    There are a few ways to do this, but adding:

    SetEnv CI_ENVIRONMENT development
    

    To the Apache httpd.config file is what worked for me.

    _t

    0 讨论(0)
  • 2021-02-20 07:34

    I had the same problem, I have a simple solution for Mac. - in the project folder, go to 'writable' - select all the folders contained and click on 'get information' - go share and permissions - in 'everyone' select 'read and write' That's it! refresh the page

    0 讨论(0)
  • 2021-02-20 07:36

    Not sure what the desired answer is, but:

    1. If you are asking to see what is the actual error is - either change your environment to testing/development (as suggested so far) or you can check your logs - writable/logs/log-.php
    2. If you wish to solve the error, we will need more information, like have you setup virtual hosts, have you change .htaccess file in public folder, etc. Otherwise we will be most likely betting (I bet it's virtual hosts).

    In any case, a copy of the displayed error (after changing evnironment) or log file will be useful.

    0 讨论(0)
  • 2021-02-20 07:37
    1. In Root folder change: env to .env

    2. Change # CI_ENVIRONMENT = production to CI_ENVIRONMENT = development (ensure it is uncommented)

    3. Your error may be related to the knit.php file.
      Go to System/Third Party and change: knit.php to Knit.php (Capital)

    4. Reload.

    0 讨论(0)
  • 2021-02-20 07:38

    You can check logs file on writable/logs find error information, If your logs information like :

    CRITICAL - 2020-04-19 17:44:55 --> Invalid file: template/header.php
    #0 F:\xampp\htdocs\ppdb\vendor\codeigniter4\framework\system\View\View.php(224): CodeIgniter\Exceptions\FrameworkException::forInvalidFile('template/header...')
    

    And go fix your error, in my case i am wrong typed name on controller file

    0 讨论(0)
提交回复
热议问题