• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

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