0

I am using Laravel 8 with livewire and trying to upload image in hosting Linux server giving me error. But in Localhost happening properly no error occur.

enter image description here

2 Answers 2

1

As the error message says, tmpfile() is disable on the linux server for security reasons. You don't see this error on your local server because tmpfile() is not disabled there.

You can check which functions are disabled by using:

var_dump(ini_get('disable_functions'));

or open the php.ini file and look for:

# list of function to disable globally #
disable_functions=tmpfile
Sign up to request clarification or add additional context in comments.

Comments

0

To someone who using Cloudways(Digital Ocean) and don't know where to fix it on, please have a look on PHP FPM Settings and search for tmpfile.

Remove tmpfile on the php_admin_value[disable_functions] list.

Full docs here: https://support.cloudways.com/en/articles/7891624-how-to-enable-php-functions

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.