• Hi guys,

    I’m having some trouble uploading large video (m4v) files.

    I’ve changed the php.ini file, the .htaccess file, and the .user.ini file to allow for larger uploads. I also changed the phprc file at the advice of my web host. When I run a phpinfo file, it states upload_max_filesize as 5000M.

    My file will upload to 100% but once it gets there I get the error, “Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.” When I check the media library it is not there. Smaller photo files have uploaded successfully.

    When I check debug.log I can see the error “[29-Jul-2020 10:53:58 UTC] PHP Notice: Constant WP_MEMORY_LIMIT already defined in /home/dh_p3n9e3/hungteensissy.com/wp-config.php on line 115”.

    I have changed the wp-config.php file to have a high memory limit of 5500M. I have also tried deactivating all plugins and reverting to the standard theme and I’m still getting the error.

    I’m not sure what else to do and I’ve been trying to sort this problem out all day for several days now. Does anyone have any ideas?

    Thanks!

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    If WP_MEMORY_LIMIT is already defined, it’s likely defined farther up in the same file. If that is indeed the only definition in wp-config.php, it can only be defined in earlier core files, which would be quite unusual. You’d have a non-standard or corrupted installation if that were the case.

    The memory limit isn’t related to upload file size. You don’t want it to be too high or other scripts could start throwing out of memory errors. The limit must not exceed available memory, and it also cannot exceed the limit set in php.ini. The default is 128 MB and is normally adequate. 512 MB would normally be more than adequate.

    This probably wouldn’t solve the upload size issue, though memory issues could cause strange behavior so it’s best to get that part sorted anyway.

    I’ve run up against some sort of file transfer size limit that must have been set by the host, external to anything in my account. File transfers via HTTP/TCP that are more than around 4 GB are interrupted when the limit is reached. If you’ve covered all the bases within your realm, you should ask your host for guidance.

Viewing 1 replies (of 1 total)

The topic ‘Trouble Uploading Large Files’ is closed to new replies.