Add galley http error

how to troubleshoot…i tried to upload pdf and html files in the galley…but its giving http error…please help me troubleshoot it.

Hi @Pema_Lhendup

What software and version are you using? What is http error code?
Have you check your php error log, it may contains related error message with your issue.

Regards,
Israel Cefrin
Public Knowledge Project Team

Hey Guys:

We have the same problem with OJS version 3.0.2.
The permissions were checked to the PUBLIC directory and everything seems normal.

08

I’m having the same issue as well. What can I do?

26%20PM

Hi all,

Check your PHP error log, and if your Apache/web server log is something different, check that too.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello. This is from the error log for the server for mfarrales’ request:

[Mon Mar 26 14:43:49.352088 2018] [:error] [pid 55213] [client :55311] PHP Warning: move_uploaded_file(/home/ojs-uploads/journals/11//articles/1258/submission/proof/1258-1-6094-1-10-20180326.pdf): failed to open stream: Permission denied in /var/www/html/acme/lib/pkp/classes/file/FileManager.inc.php on line 119, referer: http://www.acme-journal.org/index.php/acme/workflow/index/1258/4
[Mon Mar 26 14:43:49.352136 2018] [:error] [pid 55213] [client :55311] PHP Warning: move_uploaded_file(): Unable to move ‘/tmp/phph06pr5’ to ‘/home/ojs-uploads/journals/11//articles/1258/submission/proof/1258-1-6094-1-10-20180326.pdf’ in /var/www/html/acme/lib/pkp/classes/file/FileManager.inc.php on line 119, referer: http://www.acme-journal.org/index.php/acme/workflow/index/1258/4
[Mon Mar 26 14:43:49.356451 2018] [:error] [pid 55213] [client :55311] PHP Fatal error: Call to a member function getFileId() on null in /var/www/html/acme/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 1032, referer: http://www.acme-journal.org/index.php/acme/workflow/index/1258/4

We just updated to OJSv3 last week.

Hi @unbc_sysadmin,

This is a file permission problem in your files_dir.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher. Do you have any tips about what exactly might be wrong? Is there a permissions change necessary for OJSv3?

Our files_dir is /home/ojs-uploads/. This location was not touched during the upgrade to OJSv3, all the action happened in /var/www/html/acme/

Hi @unbc_sysadmin,

OJS 2.x and 3.x have the same requirements for file permissions in the files directory, but depending on how your server is set up to run PHP scripts (e.g. with mod_php), using the command-line upgrade tool might reset file permissions such that the web-based PHP no longer has permission to administer files there.

I’d suggest running a chown/chmod using the -R (recursive) option to reset file permissions. (The details will depend on your server.)

Regards,
Alec Smecher
Public Knowledge Project Team

Permissions on /home/ojs-uploads/ are 755 for apache:apache. I checked, apache appears to be the user account on the server running the httpd service.

Hi @unbc_sysadmin,

You could take OJS out of the equation by trying a test script…

<?php
ini_set('display_errors', E_ALL);
file_put_contents('/home/ojs-uploads/journals/11//articles/1258/submission/proof/1258-1-6094-1-10-20180326.pdf', 'test');

If you hit that script through the web browser, I bet you’ll get the same permissions warning. If your server uses SELinux, perhaps some more work is needed there.

Regards,
Alec Smecher
Public Knowledge Project Team

You were right. That little test script also failed. I checked, and some of the sub-sub folders (in particular for this case, ‘proof’) had an owner of root:root instead of apache:apache. One chown later, and things are looking good. Thanks!

Hi @asmecher,

We seem to have stumbled upon the same issue today (OJS 3.1.0.1). In one of our journals galleys cannot be uploaded for some submissions. We’ve checked all the permissions. Everything seems to be OK. Here is what we have in the PHP log:

Summary

Warning: file_put_contents(/var/www/ojs-3.1.0-1/cache/fc-pluginSettings-0-defaultthemeplugin.php): failed to open stream: Permission denied in /var/www/ojs-3.1.0-1/lib/pkp/classes/cache/FileCache.inc.php on line 90, referer: http://.../
[Mon Apr 02 10:17:32.359719 2018] [:error] [pid 19545] [client 10.0.3.1:37098] PHP Warning: file_put_contents(/var/www/ojs-3.1.0-1/cache/fc-locale-92b2c3a3c5d717848b711e9fd9ea503b.php): failed to open stream: Permission denied in /var/www/ojs-3.1.0-1/lib/pkp/classes/cache/FileCache.inc.php on line 90, referer: http://
.../
[Mon Apr 02 10:17:56.878828 2018] [:error] [pid 19543] [client 10.0.3.1:37124] PHP Warning: assert(): Assertion failed in /var/www/ojs-3.1.0-1/lib/pkp/controllers/grid/notifications/NotificationsGridCellProvider.inc.php on line 154, referer: http://
.../index.php/jle/submissions
[Mon Apr 02 10:17:56.878909 2018] [:error] [pid 19543] [client 10.0.3.1:37124] PHP Fatal error: Call to a member function getLocalizedTitle() on null in /var/www/ojs-3.1.0-1/lib/pkp/controllers/grid/notifications/NotificationsGridCellProvider.inc.php on line 156, referer: http://
.
../index.php/jle/submissions
[Mon Apr 02 10:18:01.770001 2018] [:error] [pid 20162] [client 10.0.3.1:37132] PHP Warning: assert(): Assertion failed in /var/www/ojs-3.1.0-1/lib/pkp/controllers/grid/notifications/NotificationsGridCellProvider.inc.php on line 154, referer: http://
.../index.php/jle/submissions
[Mon Apr 02 10:18:01.770063 2018] [:error] [pid 20162] [client 10.0.3.1:37132] PHP Fatal error: Call to a member function getLocalizedTitle() on null in /var/www/ojs-3.1.0-1/lib/pkp/controllers/grid/notifications/NotificationsGridCellProvider.inc.php on line 156, referer: http://
.
../index.php/jle/submissions
[Mon Apr 02 10:18:20.875184 2018] [:error] [pid 19547] [client ..
.] PHP Warning: assert(): Assertion failed in /var/www/ojs-3.1.0-1/lib/pkp/controllers/grid/notifications/NotificationsGridCellProvider.inc.php on line 154, referer: http://.../index.php/jle/workflow/index/7118/3
[Mon Apr 02 10:18:20.875223 2018] [:error] [pid 19547] [client ..
.] PHP Fatal error: Call to a member function getLocalizedTitle() on null in /var/www/ojs-3.1.0-1/lib/pkp/controllers/grid/notifications/NotificationsGridCellProvider.inc.php on line 156, referer: http://.../index.php/jle/workflow/index/7118/3
[Mon Apr 02 10:19:42.966404 2018] [:error] [pid 20160] [client 10.0.3.1:37164] PHP Warning: move_uploaded_file(/var/www/files/journals/3//articles/7118/submission/proof/7118-25-9191-1-10-20180402.pdf): failed to open stream: Permission denied in /var/www/ojs-3.1.0-1/lib/pkp/classes/file/FileManager.inc.php on line 119, referer: http://
.../index.php/jle/workflow/index/7118/3
[Mon Apr 02 10:19:42.966542 2018] [:error] [pid 20160] [client 10.0.3.1:37164] PHP Warning: move_uploaded_file(): Unable to move ‘/tmp/phpJItuoG’ to ‘/var/www/files/journals/3//articles/7118/submission/proof/7118-25-9191-1-10-20180402.pdf’ in /var/www/ojs-3.1.0-1/lib/pkp/classes/file/FileManager.inc.php on line 119, referer: http://
.
../index.php/jle/workflow/index/7118/3
[Mon Apr 02 10:19:42.996647 2018] [:error] [pid 20160] [client 10.0.3.1:37164] PHP Fatal error: Call to a member function getFileId() on null in /var/www/ojs-3.1.0-1/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 1032, referer: http://
.../index.php/jle/workflow/index/7118/3
[Mon Apr 02 10:20:34.562310 2018] [:error] [pid 20158] [client 10.0.3.1:37168] PHP Warning: move_uploaded_file(/var/www/files/journals/3//articles/7118/submission/proof/7118-25-9192-1-10-20180402.pdf): failed to open stream: Permission denied in /var/www/ojs-3.1.0-1/lib/pkp/classes/file/FileManager.inc.php on line 119, referer: http://
.
../index.php/jle/workflow/index/7118/3
[Mon Apr 02 10:20:34.562362 2018] [:error] [pid 20158] [client 10.0.3.1:37168] PHP Warning: move_uploaded_file(): Unable to move ‘/tmp/phpQ9L7rK’ to ‘/var/www/files/journals/3//articles/7118/submission/proof/7118-25-9192-1-10-20180402.pdf’ in /var/www/ojs-3.1.0-1/lib/pkp/classes/file/FileManager.inc.php on line 119, referer: http://
.../index.php/jle/workflow/index/7118/3
[Mon Apr 02 10:20:34.625064 2018] [:error] [pid 20158] [client 10.0.3.1:37168] PHP Fatal error: Call to a member function getFileId() on null in /var/www/ojs-3.1.0-1/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 1032, referer: http://
.
../index.php/jle/workflow/index/7118/3
[Mon Apr 02 10:21:09.901260 2018] [:error] [pid 19599] [client 10.0.3.1:37170] PHP Warning: move_uploaded_file(/var/www/files/journals/3//articles/7118/submission/proof/7118-25-9193-1-10-20180402.pdf): failed to open stream: Permission denied in /var/www/ojs-3.1.0-1/lib/pkp/classes/file/FileManager.inc.php on line 119, referer: http://
.../index.php/jle/workflow/index/7118/3
[Mon Apr 02 10:21:09.901408 2018] [:error] [pid 19599] [client 10.0.3.1:37170] PHP Warning: move_uploaded_file(): Unable to move ‘/tmp/phpqlmlr0’ to ‘/var/www/files/journals/3//articles/7118/submission/proof/7118-25-9193-1-10-20180402.pdf’ in /var/www/ojs-3.1.0-1/lib/pkp/classes/file/FileManager.inc.php on line 119, referer: http://
.
../index.php/jle/workflow/index/7118/3
[Mon Apr 02 10:21:09.931844 2018] [:error] [pid 19599] [client 10.0.3.1:37170] PHP Fatal error: Call to a member function getFileId() on null in /var/www/ojs-3.1.0-1/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 1032, referer: http://
.../index.php/jle/workflow/index/7118/3
[Mon Apr 02 10:21:35.518470 2018] [:error] [pid 20161] [client 10.0.3.1:37174] PHP Warning: move_uploaded_file(/var/www/files/journals/3//articles/7118/submission/proof/7118-25-9194-1-10-20180402.pdf): failed to open stream: Permission denied in /var/www/ojs-3.1.0-1/lib/pkp/classes/file/FileManager.inc.php on line 119, referer: http://
.
../index.php/jle/workflow/index/7118/3
[Mon Apr 02 10:21:35.518602 2018] [:error] [pid 20161] [client 10.0.3.1:37174] PHP Warning: move_uploaded_file(): Unable to move ‘/tmp/phpqcmv8a’ to ‘/var/www/files/journals/3//articles/7118/submission/proof/7118-25-9194-1-10-20180402.pdf’ in /var/www/ojs-3.1.0-1/lib/pkp/classes/file/FileManager.inc.php on line 119, referer: http://
.../index.php/jle/workflow/index/7118/3
[Mon Apr 02 10:21:35.542618 2018] [:error] [pid 20161] [client 10.0.3.1:37174] PHP Fatal error: Call to a member function getFileId() on null in /var/www/ojs-3.1.0-1/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 1032, referer: http://
.
..**/index.php/jle/workflow/index/7118/3
[Mon Apr 02 10:23:30.377029 2018] [:error] [pid 20159] [client 10.0.3.1:37180] PHP Warning: file_put_contents(/var/www/ojs-3.1.0-1/cache/fc-pluginSettings-0-defaultthemeplugin.php): failed to open stream: Permission denied in /var/www/ojs-3.1.0-1/lib/pkp/classes/cache/FileCache.inc.php on line 90
[Mon Apr 02 10:23:30.397632 2018] [:error] [pid 20159] [client 10.0.3.1:37180] PHP Warning: file_put_contents(/var/www/ojs-3.1.0-1/cache/fc-locale-92b2c3a3c5d717848b711e9fd9ea503b.php): failed to open stream: Permission denied in /var/www/ojs-3.1.0-1/lib/pkp/classes/cache/FileCache.inc.php on line 90
[Mon Apr 02 10:26:41.276488 2018] [:error] [pid 19544] [client 10.0.3.1:37182] PHP Warning: file_put_contents(/var/www/ojs-3.1.0-1/cache/fc-pluginSettings-0-defaultthemeplugin.php): failed to open stream: Permission denied in /var/www/ojs-3.1.0-1/lib/pkp/classes/cache/FileCache.inc.php on line 90
[Mon Apr 02 10:26:41.292546 2018] [:error] [pid 19544] [client 10.0.3.1:37182] PHP Warning: file_put_contents(/var/www/ojs-3.1.0-1/cache/fc-locale-92b2c3a3c5d717848b711e9fd9ea503b.php): failed to open stream: Permission denied in /var/www/ojs-3.1.0-1/lib/pkp/classes/cache/FileCache.inc.php on line 90

UPD: The problem was solved. The reason was permission for some directories might have been changed during the upgrade. Which was done under root :frowning:

Hi @Ph_We,

Glad it’s resolved!

Regards,
Alec Smecher
Public Knowledge Project Team

Hi, Alec,
I had a similar problem in uploading a file. The log is as follows. Could you please help me?
Thank you very much!


[Mon Oct 29 17:51:56.378809 2018] [:error] [pid 17242] [client 64.62.252.174:34426] NOTICE: Undefined variable: timingCorrect (/var/www/html/sci-en-tech.com/public_html/ICCM/classes/manager/form/TimelineForm.inc.php:222)
[Mon Oct 29 17:52:16.206813 2018] [:error] [pid 10561] [client 129.137.24.3:34994] ocs2 has produced an error\n Message: WARNING: mkdir(): Permission denied\n In file: /var/www/html/sci-en-tech.com/public_html/ICCM/lib/pkp/classes/file/FileManager.inc.php\n At line: 283\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.5.9-1ubuntu4.26\n Apache Version: Apache/2.4.7 (Ubuntu)\n DB Driver: mysql\n DB server version: 5.5.62-0ubuntu0.14.04.1, referer: http://www.sci-en-tech.com/ICCM/index.php/ICCM2019/ICCM2019/author/submit/2?paperId=3596
[Mon Oct 29 17:52:16.206979 2018] [:error] [pid 10561] [client 129.137.24.3:34994] ocs2 has produced an error\n Message: WARNING: move_uploaded_file(/home/liugr/Conferences/conferences/7/schedConfs/7/papers/3596/submission/original/3596-11622-1-SM.docx): failed to open stream: No such file or directory\n In file: /var/www/html/sci-en-tech.com/public_html/ICCM/lib/pkp/classes/file/FileManager.inc.php\n At line: 104\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.5.9-1ubuntu4.26\n Apache Version: Apache/2.4.7 (Ubuntu)\n DB Driver: mysql\n DB server version: 5.5.62-0ubuntu0.14.04.1, referer: http://www.sci-en-tech.com/ICCM/index.php/ICCM2019/ICCM2019/author/submit/2?paperId=3596
[Mon Oct 29 17:52:16.207040 2018] [:error] [pid 10561] [client 129.137.24.3:34994] ocs2 has produced an error\n Message: WARNING: move_uploaded_file(): Unable to move ‘/tmp/php4x6d1J’ to ‘/home/liugr/Conferences/conferences/7/schedConfs/7/papers/3596/submission/original/3596-11622-1-SM.docx’\n In file: /var/www/html/sci-en-tech.com/public_html/ICCM/lib/pkp/classes/file/FileManager.inc.php\n At line: 104\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.5.9-1ubuntu4.26\n Apache Version: Apache/2.4.7 (Ubuntu)\n DB Driver: mysql\n DB server version: 5.5.62-0ubuntu0.14.04.1, referer: http://www.sci-en-tech.com/ICCM/index.php/ICCM2019/ICCM2019/author/submit/2?paperId=3596

Hi @liugr,

There’s a “permission denied” message in your log. See How should file permissions be set? - #15 by marc

Regards,
Alec Smecher
Public Knowledge Project Team

Dear Colleagues, @asmecher, please, need your help!
We have the same problem. HTTP error when PDF Galley is uploading

error

OJS 3.1.1.4. Clean installation (not upgraded from previous versions).
The directory for issues upload /journals/1/issues has 755 CHMOD recursively

Our log file

“POST /index.php/journal/$$$call$$$/grid/issue-galleys/issue-galley-grid/upload?issueId=1 HTTP/1.1” 500 682" http://our.journal.site/index.php/journal/manageIssues"

mod_fcgid: HTTP request length 5243071 (so far) exceeds MaxRequestLen (5242880), referer: http://our.journal.site/index.php/journal/manageIssues

Please help! What shold we do to solve the problem?

Hi @OSU,

This is the relevant error message:

mod_fcgid: HTTP request length 5243071 (so far) exceeds MaxRequestLen (5242880), referer: http://our.journal.site/index.php/journal/manageIssues

This message is coming from your web server (Apache / mod_fcgid) and it indicates that you have a size limit on requests that’s set to 5MB. You’ll have to edit your web server configuration to make MaxRequestLen bigger than that; this is part of your web server configuration, and it’s outside of OJS, so you’ll have to ask your server admin to change it.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

@asmecher, Thank you very much !
We will work on it and ask admins…

Hi @Ph_We
I got the same issue, would you mind to explain how did you set the permission to get it to work normally?

also @unbc_sysadmin
How did you resolve the issue?