Problems to upload files

There is some kind of tutorial? Maybe I can change the config.

I had a similar problem that upload files is limited to only 2MB. It happened in my OCS installation also in drupal. The PHP version was 5.2.

After changing the PHP version to 5.3 in the installation folder, now I don’t have any problems. I can upload paper to OCS 10MB, 20MB (never try beyond that). In drupal indicates maximum size 512 MB.

In my case I changed the PHP version in the particular folder in the server using cpanel > ntPHPselector. I did not change any config files, only the PHP version.

Regards, waluyo

Thanks for the comment, Waluyo. Anderson, if you google for “changing maximum file size for uploads in PHP” you will find lots of information on the subject.

We have OJS users who have successfully uploaded files that are hundreds of Mb in size. Keep in mind that how well this works depends on your network connection. If it is slow, you might be waiting a long time.

regards,
Jason

Thanks Jason.
waluyo, I was uploading from a webpage (using Firefox). I don’t have a specific software. How can I update?
Could you be more specific how do you proceeded?

I tested with a 80KB file. Same problem.

Anderson, can I get a login to test?

Hello @Anderson_Rocha and @jnugent

Were you able to resolve your problem with the file upload?
We are encountering similar problems: During the submission process, a
submission file is selected using the browser but upon clicking the
upload button, nothing happens without an error message.
Any help would be appreciated since no user can currently submit any articles to our journal.

Thank you.
Maurice

Hi @mamo,

Have you checked the file permissions on the directory specified in the files_dir directive in your config.inc.php configuration file? There’s information in the README file on what file permissions should be. If that’s not the issue, then try uploading a small file. If you can get small files to upload but not large ones, then the most likely cause is file size limits in your PHP configuration (see php.ini).

Regards,
Alec Smecher
Public Knowledge Project Team

HI I’m having similar problem. Sometimes, there is a problem uploading pdf files. The upload directory has proper permissions, and file’s size is always below the limit. Still some files are not uploaded and cause the 500 error.
Any help would appreciated.

Thanks,

Hi @crkvens,

A 500 error should always provide more details in your server’s log, probably the web server and/or PHP error logs. Check there for more information.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
Thanks for reply. I checked log files and it was not 500 error it was 404? Page in question is: /author/saveSubmit/2 (paper submission). The strange thing is that some pdfs are uploaded.

Thanks,

Hi @asmecher,
The problem in my case was mod_fcgid ( FcgidMaxRequestLen was to short) . Hope this helps someone in future.

Thanks,

1 Like

I created php.ini file using notepad and paste following text inside the file:

upload_max_filesize = 32M
post_max_size = 32M

Finally, I uploaded php.ini file into OCS folder. The problem of uploading has been solved. Thanks for your advice.

Hello, we are currently on the same issue as Anderson, everything is been working well for years, but now it is no possible to upload submissions. We have checked both, permission setings to access the files_dir (755) and php max size and post to 32M in the php.ini… There is no way, even with a few Kb document, same result as Anderson.

Recent changes:

  • Upgrade to OJS 248
  • Added SSL certificate to login

May one of this recent changes be the reason for this issue?

Regards,
Daniel

Hi @celuloide,

Numerical permissions (e.g. 755) may not be enough, depending on how your web server is configured. You’ll need to know what SAPI your server is running PHP scripts with (e.g. mod_php, CGI, FastCGI, etc). This will determine what file ownership will be required. See this FAQ entry for details.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec, thank you for your answer.
I checked it, it is FastCGI but before it was the same, it has no changed. However, I open permissions to 775, but still not working.

Is it possible any other explanation?

Regards,

Daniel Becerra
Icono 14

Hi @celuloide,

And did you look into the issue of file ownership? FastCGI can be configured a number of ways; it’s probably best to look at the ownership of files OJS is creating in the cache subdirectory to determine details.

Regards,
Alec Smecher
Public Knowledge Project Team

Yes, the owner and group are the same all around the instance including cache and “files_dir” directories.

However it has been an inconsistence, an author has submitted an issue correctly, but we (administrators) still can’t. We are testing with several usernames, also with the username of this author… Do this give you any clue?

Thanks for the help.

Daniel Becerra
Icono 14

Alec, I found the problem. We have reached limit of files on hour hosting, so OJS is not able to write…

I’m sorry, and thank you very much for your suggestions.

The best,
Daniel Becerra
Icono 14

1 Like

Hi @celuloide,

Thanks for following up, and glad you got it going. These kinds of things can be hard to debug.

Regards,
Alec Smecher
Public Knowledge Project Team