Server issue File uploading & open_basedir

rour

Member
Appearance
Languages

Error
Please enter a valid file name. The requested file could not be read.

Please use is_uploaded_file, move_uploaded_file functions for correctly working with open_basedir restrictions
 
We do use those functions, but we still need to read the file in various cases. We could look to move the file to a temporary location, but that's likely a waste of time in 99.9% of cases (especially if the temp folder is on a different partition and the data has to be copied over) and creates greater possibility for orphaned temporary data.

If your upload temp directory is outside your open_basedir, it's usually a best practice in general to move it (or to expand open_basedir to allow access to the temp dir).
 
Back
Top Bottom