# Common errors

The problems we see most often, and how to fix them.

Most problems come from a step skipped during installation. Open the one that matches what you see. When none does, [find the error in the log](https://justdocs.qdev.tech/docs/help/fixing-problems/reading-logs).

<AccordionGroup>
<Accordion title="The address contains /public">
The domain points at the product's folder instead of its `public/` folder. Change the document root in your hosting panel or web server settings. Don't move `.env` or the code into `public/`.
</Accordion>
<Accordion title="A 500 error after uploading the files">
The last error in `storage/logs/laravel.log` says which of these it is:

- a hidden file didn't upload, usually `.env` or `.htaccess`;
- the PHP version is too old, or an extension is missing;
- `storage/` or `bootstrap/cache/` isn't writable by the web server;
- the upload stopped halfway;
- the database details in `.env` are wrong.
</Accordion>
<Accordion title="Every page except the home page says Not Found">
On Apache, `mod_rewrite` is off or `.htaccess` is missing. On Nginx, the site needs Laravel's usual rule:

```
location / {
    try_files $uri $uri/ /index.php?$query_string;
}
```
</Accordion>
<Accordion title="Uploaded images don't show">
With files stored on the server, first check that the site address in the admin's settings is right. Then create the storage link again:

```bash
rm -rf public/storage
php artisan storage:link
```
</Accordion>
<Accordion title="Large uploads fail">
Uploads are limited in three places: the product's media settings, PHP's `upload_max_filesize` and `post_max_size`, and sometimes the web server or a firewall in front of it. Raise the lowest one. Where the product offers uploading in parts, turn it on.
</Accordion>
<Accordion title="Emails don't arrive">
Set up a mail provider in the admin's email settings and send the test email. If the test arrives but your users' emails don't, check the sender domain's SPF and DKIM records.
</Accordion>
<Accordion title="Scheduled tasks never run, or the log says Failed to open stream">
Alerts, renewals, expiring items and other background work run from the scheduler. Check that the cron line runs every minute, with the right PHP and the right folder.

If the log shows `Failed to open stream: No such file or directory` under `storage/framework/cache`, the scheduler ran as root and created folders the site can't write to. Give the folders back to the web server's user, then move the cron line to that user's crontab:

```bash
sudo chown -R www-data:www-data storage bootstrap/cache
```
</Accordion>
</AccordionGroup>
