# PHP Task Manager

A lightweight PHP 8.3 task manager for local development and future Apache deployment. It uses SQLite through PDO and has no framework or package dependencies.

## Requirements

- PHP 8.3+
- `pdo_sqlite` enabled

## Run locally

From the project root:

```bash
php -S localhost:8080 -t public
```

Open <http://localhost:8080>. The application creates `var/tasks.sqlite` automatically. The `var/` directory is deliberately outside the public document root and is ignored by Git.

For a custom database location, set `TASK_MANAGER_DB` to an absolute filesystem path before starting PHP.

## Tests

```bash
php tests/run.php
```

## Apache deployment notes

Point Apache's `DocumentRoot` at the `public/` directory, not the project root. Ensure the web-server user can write to the non-public `var/` directory (or use `TASK_MANAGER_DB` with a writable path outside the document root). Keep PHP errors out of browser output in UAT/production.

## Security

- PDO prepared statements are used for all database values.
- Form requests require a session-backed CSRF token.
- Task input is server-side validated and all rendered task content is HTML-escaped.
- SQLite database files stay outside `public/` and are not tracked.
