You are viewing the PKP Support Forum | PKP Home Wiki

Max Upload Limit Work-Arounds

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

Max Upload Limit Work-Arounds

Postby soj » Tue Nov 28, 2006 11:30 am

I've got an pdf article of a size exceeding shared server php upload limits. At this point we cannot afford a dedicated server, so I'm looking for a work-around. I can of course FTP the file.

I'm thinking I could upload a smaller dummy file via the system and then replace the file via FTP in the FILES directory. More work, but would this work okay? It looks like I will need to temprorarily change the permissions for the FILES directory in config.php in order to apply this workaround.

Also, has anyone used PERL as a workaround? Please See:


Posts: 151
Joined: Fri Oct 28, 2005 1:53 pm
Location: Norman OK USA

Postby asmecher » Tue Nov 28, 2006 12:53 pm

Hi all,

There are several places to check if you're having problems uploading large files:
  • Web server configuration (i.e. Apache or IIS)
  • PHP configuration (php.ini)
  • Occasionally, another system like a firewall will step in and cause trouble.
Apache 2.x, for example, has a LimitRequestBody directive that will prevent large file uploads. Note that file uploads are encoded, and are only part of the request that the web server receives, so a LimitRequestBody of 8 megs won't necessarily allow a file upload of 8 megs. You may be able to override these settings on a shared environment with an appropriate .htaccess directive.

There are several file upload limits in your PHP configuration file, php.ini:
  • max_post_size: This is analagous to the LimitRequestBody directive described above, but checked in PHP rather than in the web server code.
  • file_uploads: This is where file uploads are enabled or disabled.
  • upload_max_filesize: This is where you can define the maximum upload file size.
Likewise, it may be possible to override these settings with a .htaccess file; for example:
Code: Select all
php_value upload_max_filesize 10M
This will depend on your web server's security settings for .htaccess files; you can verify whether or not these work by generating a phpinfo output.

Alec Smecher
Open Journal Systems Team
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Return to OJS Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests