Codeigniter 4 Tutorials
- Codeigniter 4
- Application Run
- Application Structure
- Configuration files
- Errors
- Controller
- View
- Model
- How to remove index.php from URL
- Route
- CodeIgniter URLs
- Helper
- Session
- Global Functions and Constants
- Logging Information in CI4
- Error Handling
- Signin / SignUp
- Login / Register
- CRUD
- Crud 1
- Form Validation
- Data Table
- Pagination
- File Upload
- Show Data Using Ajax
- Select2 AJAX Autocomplete Search
- Curl Post
- Rest API
- Weblink
Home » Codeigniter 4 »
Errors of Codeigniter 4?
Enable Codeigniter Errors
Open app/Config/Boot/development.php file and set the display_errors to 1 instead of 0. Repeat the same process in app/Config/Boot/production.php file.
File name : index.php
ini_set('display_errors', '1');
If you get the Codeigniter – cannot connect to MySQL database error
File name : index.php
# XAMPP
public $default = [
...
'hostname' => '/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock',
...
]
We seem to have hit a snag. Please try again later
File name : index.php
this error about not showing error line number and why error occures.
this errors occurs when you don't set the development enviornment in .env file.
set the CI_ENVIRONMENT = development in .env file.
Go to config/boot/development.php page. and set ini_set('display_errors', '1');
Go to config/boot/production.php page. and set ini_set('display_errors', '1');
it display the error occurs on the page.