On further investigation the only way I can get this to work is to edit the main php.ini file that is in
/etc/php/7.4/fpm/ ( in server root)
And add this line
upload_tmp_dir = /home/mydomain/tmp
Fortunately this server only has one domain and I can comment this out when I do not need to manually use it .
This is what I have tried so far…
adding a php.ini file to:
the home directory /home/mydomain
the etc folder /home/mydomain/etc
the php folder /home/mydomain/etc/php
7.4 folder /home/mydomain/etc/php/7.4
fpm folder /home/mydomain/etc/php/7.4/fpm
I have also removed all other php folders from the /etc folder
And of course restarted apache2 and php7.4-fpm after every change
To confirm the only thing that works is this
/etc/php/7.4/fpm/
This is in the server main /etc directory … on the same level as the /home & /var …