Troubleshooting
Error installing modules in PrestaShop, The file is missing
When manually uploading a module's ZIP from the back office, this may appear:
Installation of module failed. The file is missing.
PrestaShop shows this message when it does not receive a usable file after checking the request size. Start with the PHP upload code and the log from the same minute. If the developer temporarily instruments the controller, it should capture only the $_FILES['file_uploaded']['error'] code when that entry exists, without logging the file content or the whole request. UPLOAD_ERR_NO_FILE is usually converted to null when the Symfony request is built.
Then check, without changing several variables at once:
- that the ZIP does not exceed
upload_max_filesize,post_max_sizeor a server or proxy limit; - that
upload_tmp_direxists, has space and is writable by the PHP process; - that no upload, antivirus or ModSecurity error appears in the logs;
- that the problem reproduces with the same file and the same PHP version.
max_input_vars limits GET, POST and COOKIE variables; a high value is not documented as a cause of $_FILES being lost. In one specific Hostsuar case, lowering it coincided with the symptom disappearing, but neither the mechanism nor a race condition was proven. Treat it only as a reversible test if the data above shows no other error: note the value, change only that directive, restart the same runtime if applicable and repeat once.
If the result changes, keep the versions, the before and after values and the upload code; if it does not change, restore the configuration. Do not present that correlation as a general Symfony bug.
See the official PHP upload errors and the official PrestaShop module installation guide.
If PHP receives no file
When the request exceeds post_max_size, PHP may leave both $_POST and $_FILES empty; in that case there is no upload code in that entry. Check the total request size, not just the ZIP, and correlate it with the server or proxy log. A 413 can occur before PrestaShop processes the form.
Do not lower max_input_vars blindly: it can truncate other back office forms. If that test is agreed because of the case described, also check a representative form and restore the value if it does not bring a reproducible improvement. Install only an official, compatible package and avoid repeating the upload if a previous installation is still in progress.
You may also find useful
- "An error occurred while sending the message" in the PrestaShop contact form Diagnose the contact form rejection and fix an old override only when it does not send contactform's...
- Recover a module that no longer appears in the PrestaShop theme Check the active position, the theme hook and the exceptions of a PrestaShop module before transplan...
- Update Assistant shows "Please fix the following error(s)" Find the requirement or non-writable path blocking PrestaShop's Update Assistant and fix only its ow...
- 404 errors on static files slow down browsing Detect missing static resources that trigger PHP and use CPU, serve them as lightweight 404s and gui...
Something wrong or out of date? Tell us and we will review it.