Troubleshooting & Performance

Fixing Storage Permissions, tempnam() Errors, Missing Images, and Upload Failures

Published 2026-12-04 03:20:21

Fixing "tempnam(): file created in the system's temporary directory"

This PHP notice appears on Linux servers when Laravel's cache or compiled view directories are missing or not writable by the web server user (www-data, nginx, or apache). Create the directories and fix ownership/permissions:

mkdir -p storage/framework/{sessions,views,cache/data} storage/logs bootstrap/cache
sudo chown -R www-data:www-data storage bootstrap/cache
sudo chmod -R 775 storage bootstrap/cache
php artisan view:clear && php artisan cache:clear

Fixing Missing Local Product, Category, or Brand Images

  1. Verify the public storage symlink: Run php artisan storage:link so public/storage points to storage/app/public.
  2. Verify APP_URL and ASSET_URL: Both values in .env must match your live protocol and domain (e.g., https://yourdomain.com) with no trailing slash mismatch.
  3. Check directory permissions: While Site Store Pro automatically creates missing folders under storage/app/public/ on upload, the parent storage/app/public directory itself must be writable by PHP-FPM.

Large CSV, Video, or Digital File Uploads Failing

If uploading digital products (up to 50 MB), CMS downloads (up to 100 MB), or large inventory CSVs (up to 200 MB) fails with a 413 or Livewire upload error, raise both PHP and web server limits:

  • In php.ini: set upload_max_filesize = 256M, post_max_size = 256M, and memory_limit = 512M.
  • In Nginx: set client_max_body_size 256M; and reload Nginx.
  • Ensure Livewire's temporary upload directory storage/app/livewire-tmp is writable.

Was this article helpful?

Let us know how we can improve our documentation.