# CodeIgniter 4 Framework

## Site development configuration

The root `.gitignore` excludes local environment files, dependencies, runtime
data, and test reports. Keep environment examples, Composer lock files, and
writable-directory scaffolding in version control.

For a new development checkout, run these commands from this `html` directory:

```sh
(umask 077; cp -i env .env)
chmod 640 .env
```

The tracked `env` template contains development defaults. Review an existing
`.env` before replacing it, adjust the host, and replace `path_to_repo` in the
base URL with your checkout's URL path. Grant the web-server account read access through the file's
group or a named-user ACL; do not make `.env` world-readable. For production,
use a separate `.env` with `CI_ENVIRONMENT = production` and the production
HTTPS base URL instead of copying the development defaults unchanged.

Set `app.baseURL` in `.env` to the site's development `html/public/` URL,
including its folder path and a trailing slash. Keep `app.indexPage` empty:
the `baseURL()` helper adds `?/` for development routes. Production routes
remain query-free. The debug toolbar and its request listeners are disabled
in the application filter and event configuration.

Forms use native email validation. Failed AJAX requests display an error and
restore the submit button so the user can retry.

## What is CodeIgniter?

CodeIgniter is a PHP full-stack web framework that is light, fast, flexible and secure.
More information can be found at the [official site](https://codeigniter.com).

This repository holds the distributable version of the framework.
It has been built from the
[development repository](https://github.com/codeigniter4/CodeIgniter4).

More information about the plans for version 4 can be found in [CodeIgniter 4](https://forum.codeigniter.com/forumdisplay.php?fid=28) on the forums.

You can read the [user guide](https://codeigniter.com/user_guide/)
corresponding to the latest version of the framework.

## Important Change with index.php

`index.php` is no longer in the root of the project! It has been moved inside the *public* folder,
for better security and separation of components.

This means that you should configure your web server to "point" to your project's *public* folder, and
not to the project root. A better practice would be to configure a virtual host to point there. A poor practice would be to point your web server to the project root and expect to enter *public/...*, as the rest of your logic and the
framework are exposed.

**Please** read the user guide for a better explanation of how CI4 works!

## Repository Management

We use GitHub issues, in our main repository, to track **BUGS** and to track approved **DEVELOPMENT** work packages.
We use our [forum](http://forum.codeigniter.com) to provide SUPPORT and to discuss
FEATURE REQUESTS.

This repository is a "distribution" one, built by our release preparation script.
Problems with it can be raised on our forum, or as issues in the main repository.

## Contributing

We welcome contributions from the community.

Please read the [*Contributing to CodeIgniter*](https://github.com/codeigniter4/CodeIgniter4/blob/develop/CONTRIBUTING.md) section in the development repository.

## Server Requirements

PHP version 8.2 or higher is required, with the following extensions installed:

- [intl](http://php.net/manual/en/intl.requirements.php)
- [mbstring](http://php.net/manual/en/mbstring.installation.php)

> [!WARNING]
> - The end of life date for PHP 7.4 was November 28, 2022.
> - The end of life date for PHP 8.0 was November 26, 2023.
> - The end of life date for PHP 8.1 was December 31, 2025.
> - If you are still using below PHP 8.2, you should upgrade immediately.
> - The end of life date for PHP 8.2 will be December 31, 2026.

Additionally, make sure that the following extensions are enabled in your PHP:

- json (enabled by default - don't turn it off)
- [mysqlnd](http://php.net/manual/en/mysqlnd.install.php) if you plan to use MySQL
- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library
