Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Temporary files directory is not writable #184

Open
Padi-dev-hoangdv opened this issue Oct 29, 2020 · 2 comments
Open

Temporary files directory is not writable #184

Padi-dev-hoangdv opened this issue Oct 29, 2020 · 2 comments

Comments

@Padi-dev-hoangdv
Copy link

I have this error on sever.
My local working fine.
Temporary files directory "../temp/" is not writable in file vendor/mpdf/mpdf/src/Cache.php on line 17.
I had publish vendor
Please help!

@ssarljames
Copy link

I solved my issue by specifying tempDir to a usable temp directory, in my case Im using it on Heroku

In config/pdf.php

<?php

return [
	'mode'                  => 'utf-8',
	'format'                => 'A4',
	'author'                => '',
	'subject'               => '',
	'keywords'              => '',
	'creator'               => 'Laravel Pdf',
	'display_mode'          => 'fullpage',
	'tempDir'               => base_path('storage/app/mpdf')
];

@mohammad-reza-najafi
Copy link

I have same error Temporary files directory "../temp/" is not writable in file vendor/mpdf/mpdf/src/Cache.php on line 17.
and set base_path('storage/app/mpdf')
not work

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants