Does anyone know why we are getting a “Missing or invalid component!” error message when uploading a PDF file. The file is about 12MB (and our maximum upload limit is 20MB). we have recently upgraded to OJS3. We have
• PHP 5.6.35
• MySQL 5.6.39
Many thanks in advance.
Did you check your site’s error log for details?
Public Knowledge Project Team
Thanks for getting back to me. I don’t know much about error logs. I found the following php error logs that are different from other error messages.
PHP Warning: finfo_open(F:\etc\magic.mime): failed to open stream: No such file or directory in F:\journals.lincoln.ac.nz\wwwroot\lib\pkp\classes\core\PKPString.inc.php on line 420
PHP Warning: finfo_open(): Failed to load magic database at ‘F:\etc\magic.mime’. in F:\journals.lincoln.ac.nz\wwwroot\lib\pkp\classes\core\PKPString.inc.php on line 420
PHP Warning: file_put_contents(F:\journals.lincoln.ac.nz\wwwroot\cache\fc-pluginSettings-1-defaultthemeplugin.php): failed to open stream: Permission denied in F:\journals.lincoln.ac.nz\wwwroot\lib\pkp\classes\cache\FileCache.inc.php on line 90
Are you able to advise what’s the above errors mean?
You could try checking that all of your folder permissions are set correctly. Please let me know if this works.
Public Knowledge project Team
As far as I can see, folder permissions look ok. I doubt it was due to folder permissions though as we were able to upload some PDF files but not others.
The file size of the two PDF files that caused the “missing or invalid component error” are about 12MB and 13MB. I have checked our php.ini config, upload_max_filesize = 100M - do you know if there is any other places I need to change in terms of max upload filesize?
Further to my reply, I found the following error in php-error.log file
PHP Warning: POST Content-Length of 14374424 bytes exceeds the limit of 8388608 bytes in Unknown on line 0
Does that mean I also need to update the following in php.ini file to allow more than file more than 8MB to be uploaded?
; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
post_max_size = 100M
@Yanan_Zhao, yes that could be it. People usually hit the
upload_max_filesize limit before the
post_max_size limit. If you still have problems after adjusting this, you may also need to check your server’s memory_limit.
I have uploaded the setting and it seems to have fixed the issue.
Thanks again for your help.
@Yanan_Zhao Please let me know which settings you upload. Please send me i am facing same issue.
This is quite an old thread - can you post your issue in your new forum post, please? If it is similar to this issue, you can link to it in the new post.