What I try to accomplish: Upload images from a web page via POST Request to my server and manipulate them.
I have been experiencing the following issue for a few days now: I cannot access the uploads located in the "/tmp" folder using PHP.
Error message (XXXXX = domain name):
Warning: getimagesize(): open_basedir restriction in effect. File(/tmp/phpQ3Y7XN/image.png) is not within the allowed path(s): (/var/www/vhosts/XXXXX/: /tmp/:/tmp/*) Warning: getimagesize(/tmp/phpQ3Y7XN/image.png): Failed to open stream: Operation not permitted
As the dir /tmp exists within the configured open_basedir parameter, I do not understand what's going on here.
I am completely stuck here. Either not having permission
- Debian 11.7
- Plesk Obsidian 18.0.58 Update #2 with ModSecurity
- PHP 8.3.3 (Dedicated FPM-Application) Does anyone have an advice on this?
Any help is appreciated :)
I tried to change upload_tmp_dir within my domains php.ini file to a path within the document root. For some reason this has no effect either. Uploads are still being moved to /tmp automatically.
I also tried tepmporarely disabling ModSecurity as this has a SecUpload Policy. This had not effect whatsoever.
I restarted the system.