Can't upload a PDF to galley stage

Hi there – I am preparing to publish my 2nd issue and am having the same trouble now, as, as before with the first. There must be a file size limit, as (last time and now) a PDF with figures cannot be uploaded as a proof. On this occasion, I am trying to upload a file of 49MB. Is there a file size limit?

This is very common problem when we upload large size files in server and in your case you are trying to upload 49MB file (Which is still big sized file in common scenario).
What you can do is to set memory limit set to () and max_execution to () seconds. and upload_max_filesize=()MB
in your php.ini file
In place of () please use your maximum values and save it. Now you are ready to upload the big files.
Ask your tech. support to do so in your web server for you, if you are unable to do it by yourself.

Also, don’t forget post_max_size in php.ini.

1 Like

Thanks I’ll try that.

What will be the memory limit for 100MB file size?

Hi @mdmk,

The file size and memory_limit are not related – your maximum file size won’t define what you should use for memory_limit.

Regards,
Alec Smecher
Public Knowledge Project Team

In OCS 2.3.6, php.ini file consists of
memory_limit = 99M
upload_max_filesize = 98M
post_max_size = 99M
max_execution_time = 1000

But when I try to upload 30MB MS Word file, it gives ‘404 Not Found’ error. Could you please inform how I can solve it.

Mashud

Hi @mdmk,

A 404 error is a very unusual thing to see on a file upload. Can you check your web server’s error and access logs to see if there are any error messages, and to check the URL that’s generating the 404 response?

Regards,
Alec Smecher
Public Knowledge Project Team

Following lines are from error_log file:

[10-Oct-2016 07:00:53 Asia/Dhaka] ocs2: 404 Not Found
[10-Oct-2016 07:02:09 Asia/Dhaka] ocs2: 404 Not Found
[10-Oct-2016 07:23:01 Asia/Dhaka] ocs2: 404 Not Found
[10-Oct-2016 07:33:10 Asia/Dhaka] NOTICE: Use of undefined constant HANDLER_CLASS - assumed ‘HANDLER_CLASS’ (/home/icmartec/public_html/ocs/lib/pkp/classes/core/PKPPageRouter.inc.php:163)
[10-Oct-2016 07:33:10 Asia/Dhaka] ocs2 has produced an error
Message: WARNING: array_map(): Argument #2 should be an array
In file: /home/icmartec/public_html/ocs/lib/pkp/classes/core/PKPPageRouter.inc.php
At line: 163
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.6.26
Apache Version: N/A
DB Driver: mysql
DB server version: 5.6.33-log
[10-Oct-2016 07:33:10 Asia/Dhaka] ocs2 has produced an error
Message: WARNING: in_array() expects parameter 2 to be array, null given
In file: /home/icmartec/public_html/ocs/lib/pkp/classes/core/PKPPageRouter.inc.php
At line: 164
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.6.26
Apache Version: N/A
DB Driver: mysql
DB server version: 5.6.33-log
[10-Oct-2016 07:33:10 Asia/Dhaka] ocs2: 404 Not Found
[10-Oct-2016 07:35:50 Asia/Dhaka] ocs2: 404 Not Found
[10-Oct-2016 07:36:36 Asia/Dhaka] NOTICE: Use of undefined constant HANDLER_CLASS - assumed ‘HANDLER_CLASS’ (/home/icmartec/public_html/ocs/lib/pkp/classes/core/PKPPageRouter.inc.php:163)
[10-Oct-2016 07:36:36 Asia/Dhaka] ocs2 has produced an error
Message: WARNING: array_map(): Argument #2 should be an array
In file: /home/icmartec/public_html/ocs/lib/pkp/classes/core/PKPPageRouter.inc.php
At line: 163
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.6.26
Apache Version: N/A
DB Driver: mysql
DB server version: 5.6.33-log
[10-Oct-2016 07:36:36 Asia/Dhaka] ocs2 has produced an error
Message: WARNING: in_array() expects parameter 2 to be array, null given
In file: /home/icmartec/public_html/ocs/lib/pkp/classes/core/PKPPageRouter.inc.php
At line: 164
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.6.26
Apache Version: N/A
DB Driver: mysql
DB server version: 5.6.33-log
[10-Oct-2016 07:36:36 Asia/Dhaka] ocs2: 404 Not Found
[10-Oct-2016 07:37:13 Asia/Dhaka] ocs2: 404 Not Found

Please tell me what to do.

Hi @mdmk,

Can you check the access_log and see what kinds of URLs are resulting in a 404 response?

Regards,
Alec Smecher
Public Knowledge Project Team

From Raw Access Log:

http://www.icmartec.com/ocs/index.php/2016/2016/director/submissionReview/168/2” “Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36”
203.112.221.196 - - [06/Oct/2016:21:15:03 +0600] “GET /ocs/styles/sidebar.css HTTP/1.1” 304 -

Regards,

mdmk

Hi @mdmk,

That looks like a 304 response, not a 404, and I don’t think it’s related to the problem you describe. Can you see if there’s a 404 in there?

Regards,
Alec Smecher
Public Knowledge Project Team