• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.
  • Chevereto Support CLST

    Support response

    Support checklist

PHP-FPM and Chevereto (missing temp folder error)

ronaldst

Chevereto Member
This is not a script bug, but it's a technical issue/server problem I can't seem to figure out. Hoping someone tech savy might be able to point me in the right direction here!

I am having problems uploading files when PHP-FPM (PHP 7.2) is active on my domain. Switching to PHP handler CGI works (PHP 7.2) fine, so I am assuming it has something to do with access to the default temp dir in the PHP-FPM configs.


EDIT/SOLUTION
After a few hours of sleep I managed to figure this one out. I'll post the solution in case any of you are running PHP-FPM. The error was due to not properly setting up open_basedir and upload_tmp_dir.

On my server I try to limit session and temp files within a user home directory, rather than using /tmp (which is a common security weaknesses in server setups). PHP-FPM is using .yaml files and is a bit different to configure than what I was used to.

This server setup is running Centos 7.x + WHM/cPanel w. Apache HTTP/2

Global settings (system_pool_defaults.yaml)
Code:
php_value_session_save_path: { name: 'php_value[session.save_path]', value: "/var/cpanel/php/sessions/[% ea_php_version %]" }
php_value_upload_tmp_dir: { name: 'php_value[upload_tmp_dir]', value: "[% homedir %]/tmp" }
php_value_open_basedir: { name: 'php_value[open_basedir]', value: "[% homedir %]" }

Remember to run rebuild PHP-FPM configs after doing changes
Code:
/scripts/php_fpm_config --rebuild

Doublecheck that Apache is restarted properly, and that changes are generated into the PHP-FPM user domain.tld.conf.
 
Last edited:
I also thank you for the great contribution that will probably be helpful to some users who have or had the same problem.

I was not affected by it myself, but I still took something with me here. There is now no server-wide TMP directory for me, now I have an extra tmp for each domain.

👍
 
Last edited:
Back
Top