Uncaught Exception: The file "/tmp/file_name" does not exist

Hi There,

Just in the process of developing a file upload page in concrete V9.4.5 (PHP 8.3). Have created the necessary HTML and PHP scripts under application/single_pages and linked them to the page. The PHP script uses the standard move_uploaded_file() process which moves the uploaded file from $file[‘tmp_name’] to the desired directory.

When the html & php code is executed, the file upload works but straight away I get a concrete cms error “An error has occurred processing this request” and in the logs I see: “Uncaught Exception: The file “/tmp/phpLpLCvX” does not exist”

Has anyone encountered this situation ?

Thanks & regards,

Jeff.

PS No errors occur when I run this simple file upload outside of concrete as a stand alone html/php process.

I eventually re-wrote this File Upload process using Concrete Core processes called via Controller scripts - which takes care of limiting what sort of file types are uploaded and better security all round.

I would be interested in knowing how to mask this Uncaught Exception error in the Concrete logs - given that it is probably triggered by PHP automatically deleting this $file[‘tmp_name’] instance as soon as the user uploads the file and executes the standard move_uploaded_file() process.

Jeff.