Cannot upload PDF to galley

Hello,

Today my installation of OJS started having a problem. Until today we have been able to upload PDFs as galley files through the normal submission pages and by going to the Editing tab on the article after it has been submitted. Now when we try to do this the label for the file says “Untitled” and the file size says “B”.

I have gone through the solutions posted [here],(https://pkp.sfu.ca/wiki/index.php/PKP_Frequently_Asked_Questions#HTML_Galleys_don.27t_display_properly_.2F_files_I_upload_aren.27t_being_identified_properly.), and they did not help.

We are using OJS 2.4.8 and PHP 5.4.11. As far as I know nothing has changed with our installation or the server between now and when it was working properly. Any help you can provide would be greatly appreciated.

EDIT: Some additional information, I just attempted to create a new article on a different server and on Step 2 “Uploading the Submission” when I attempt to upload a PDF file as the submission the page just reloads. Pressing Save and Continue prompts me that there was no file submitted. Same version of OJS and PHP as the other server.

Regards,
Jake

1 Like

Hi @jstrojny,

The most likely causes are Apache or PHP upload limits on file size, or file permissions in the files_dir (as configured in config.inc.php). There’s a FAQ entry on file permissions with more details.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hi,

Thank you for the response pointing me in the right direction. I am actually a student worker and while I was at class IT restarted one of the servers and that seemed to solve its problem.

The problem still existed on the other server but it looks like that was caused by the uploads folder not existing at all. I followed the faq and applied the appropriate permissions just to be sure and everything appears to be working again.

Again, thank you for your help with this problem.

Regards,
Jake

It actually appears that fixing the permissions only partially solved the problem. Our user can now upload files that are under 800kB but anything over that fails. I’ve checked our php.ini settings and it should not be timing out and the files are way below what we set as a limit.

Any thoughts?

Regards,
Jake

Hello @jstrojny,

Recheck:

  • Folder ownership (must match Apache user/group!);
  • Folder permissions (must match OJS settings)
  • PHP AND Apache VirtualHost settings (Apache may be overriding something, you may have more than one PHP running or more than one php.ini, among others…)
  • PHP settings such as upload_max_filesize, max_input_vars, post_max_size, memory_limit, default charset may affect uploads.

You can also check some PHP settings as Admin.

Hi Ramon,

Thanks for the help. The folder owner and permissions match my apache user/group, I did notice that there are multiple php.ini files but they are all set to the same values, and I checked the values for the those settings and they are well above the default.

The problem isn’t that we can not upload anything at all, but only files that are under ~850kB, anything larger fails even though our max upload size is set to 100M. This discrepancy is why we’re at such a loss.

Regards,
Jake

@jstrojny,

Enabling debug on ojs/config.inc.php shows anything?
What about Apache error logs?

There is nothing in the apache logs and turning on debugging in OJS has not shown anything. When we press upload the screen flashes like it is loading the next page and then just doesn’t. No debug information comes up and I checked the logs again and there are no errors.

Regards,
Jake

@jstrojny,

Is it a clean install, or has there been code customizations anywhere?
if nothing is being logged, there’s something wrong with the server settings.

If anything, I would create a clean, fresh install and test it. If no problems occur, I would run a DIFF on both folders to compare. Otherwise, server admin must be notified to check. There may be other things at play, such as Firewall, Proxy…

Has it worked before?? If it did, someone changed server settings.

Hi @jstrojny,

There are several settings related to maximum upload limits that might be at play. Check out this FAQ entry.

Regards,
Alec Smecher
Public Knowledge Project Team

I’ve set the upload limits in PHP and Apache to well above the files we are trying to upload and it is still not allowing files over 850kB. And as for code changes, I made a few parts of the submission process optional (emails and one or two others) because we either do not have that or it was a back issue.

Sorry, there are things being logged, but nothing from the times we tried uploading the files. I do have a clean install on another server and it appears to be working correctly there, so I will try running a DIFF. Other than that, none of the server settings should have changed but it did work perfectly before, up until Monday.

EDIT: After running diff on a clean install and the one that is not working it looks like the only differences are in the files I changed, which have worked for months with no problem, and the uploads that are already there.

Regards,
Jake

Hi @jstrojny,

Just checking – did you restart your Apache service after changing the configuration files?

Regards,
Alec Smecher
Public Knowledge Project Team

I have got the problem with uploading PDF to galley, OJS 3.0.2. Received HTTP Error and in error log file found>

27-Jun-2018 10:09:55 UTC] PHP Strict Standards: Declaration of CustomBlockPlugin::getContents() should be compatible with BlockPlugin::getContents($templateMgr, $request = NULL) in /home/fj0i1nulvabk/public_html/plugins/generic/customBlockManager/CustomBlockPlugin.inc.php on line 130

Where is the problem?
Regards,
Lazar

Hi @Lazar_Stosic,

See e.g. HTTP error during upload of submission file OJS 3.0.2.0. That thread recommends disabling the “Recommend by author” plugin; I’d also suggest upgrading, as OJS 3.0.2 is now quite old.

Regards,
Alec Smecher
Public Knowledge Project Team