![]() |
File upload work on php 7.2, but not on 7.4.14 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: File upload work on php 7.2, but not on 7.4.14 (/showthread.php?tid=78441) |
File upload work on php 7.2, but not on 7.4.14 - t_5810 - 01-20-2021 I have an Codeigniter app, which works like a charm on PHP 7.2 After moving on PHP 7.4.14, I get an error "No input file specified." Search on Google suggested that I should add a question mark in my .htaccess file
Code: RewriteRule ^([\s\S]*)$ index.php?/$1 [L,NC,QSA] to resolve the issue. And that was the only change that I did. However, I notice that since the upgrade, my code for uploading images does not work (application wide).
I have options to upload images on many pages, and they all works if I switch back to PHP 7.2, but does not work on PHP 7.4.14
The error that I get is:
finfo_file(): Empty filename or path
My validation code is the following:Code: // Thumbnail image is not required, so validation is optional Questions is: Why this code works on PHP 7.2 and does not work on PHP 7.4.14? RE: File upload work on php 7.2, but not on 7.4.14 - InsiteFX - 01-20-2021 Well it can be anything, also you did not specify what version of CodeIgniter you are running. Read the change logs. PHP 7 ChangeLog RE: File upload work on php 7.2, but not on 7.4.14 - t_5810 - 01-20-2021 Thanks for your reply, and for spending your time to help me. (01-20-2021, 04:10 AM)InsiteFX Wrote: Well it can be anything, also you did not specify what version of CodeIgniter you are running. My bad. Thanks for pointing that to me. CodeIgniter version is: 4.04 CI As far for the log error, here it is: Code: CRITICAL - 2021-01-20 11:46:12 --> finfo_file(): Empty filename or path RE: File upload work on php 7.2, but not on 7.4.14 - InsiteFX - 01-20-2021 If you look at the 7.4.14 change log I believe they fixed a bug for the finfo_file(). This maybe a new bug in CI not sure but you can report it to the developmen5t team on GitHub |