PHP 7.4-FPM - tmp file query

SYSTEM INFORMATION
OS type and version Debian 11
Webmin version 2.021
Virtualmin version 7.7
Related packages SUGGESTED

Hi there,

Hope all is well.

I have a module that has an access error when uploading a file to the /tmp folder if my server is using PHP7.4FPM (which it is on a live store)

If I switch to FCG-id it works as expected and the tmp folder is available to the module.

The tmp settings are all correct in /etc/php/7.4/pool.d/mydomain.conf

php_value[upload_tmp_dir] = /home/mydomain/tmp
php_value[session.save_path] = /home/mydomain/tmp

I presume as everything works with FCGid - that this is something to do with FPM

This matter is causing me a serious issue and any advice would be gratefully accepted

Thanks
Brad

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 …

Any advice would be appreciated

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.