admin管理员组

文章数量:1124534

I am trying to make available a mp4 video of ~500Mb but my connection is too slow to do this at home.

To achieve this, I uploaded the video via ssh from school then i used the wordpress media manager to upload a mp4 file of 1 byte.

Once this file is uploaded, I went through ssh to its directory then I moved the 500Mb file to replace it.

The problem is after that I get an HTTP 500 error, even if : - both of the original file (1B) and the replacing file (500Mb) are given 644 perms and the same owner/group - I checked that the filename is the same, it can not be an error like this.

Here is my htaccess :

AddType video/mp4 .mp4 .m4v

SetEnv REGISTER_GLOBALS 0
SetEnv ZEND_OPTIMIZER 1
SetEnv MAGIC_QUOTES 0
SetEnv PHP_VER 5

SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html text/xml application/xhtml+xml text/plain application/javascript text/css
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]

I can not figure out the problem. Does anyone know ?

I forgot to specify that it is a multisite wordpress.

Thanks a lot !

I am trying to make available a mp4 video of ~500Mb but my connection is too slow to do this at home.

To achieve this, I uploaded the video via ssh from school then i used the wordpress media manager to upload a mp4 file of 1 byte.

Once this file is uploaded, I went through ssh to its directory then I moved the 500Mb file to replace it.

The problem is after that I get an HTTP 500 error, even if : - both of the original file (1B) and the replacing file (500Mb) are given 644 perms and the same owner/group - I checked that the filename is the same, it can not be an error like this.

Here is my htaccess :

AddType video/mp4 .mp4 .m4v

SetEnv REGISTER_GLOBALS 0
SetEnv ZEND_OPTIMIZER 1
SetEnv MAGIC_QUOTES 0
SetEnv PHP_VER 5

SetOutputFilter DEFLATE
AddOutputFilterByType DEFLATE text/html text/xml application/xhtml+xml text/plain application/javascript text/css
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]

I can not figure out the problem. Does anyone know ?

I forgot to specify that it is a multisite wordpress.

Thanks a lot !

Share Improve this question asked Feb 14, 2013 at 0:27 CharafCharaf 1031 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

The multisite is using

ms-files.php?file=$2

to open uploaded files and at the end of ms-files.php you have

// If we made it this far, just serve the file
readfile( $file );

So opening a 500mb file could be too much for your php process.

You could try to increase the available memory footprint of your php processes.

Or host the file externally or try uploading it to Vimeo/Youtube.

ps: another way is to use the map feature of Nginx to bypass php, but that will not help you since you use Apache. There might be similar methods for Apache, but I'm not sure.

Edit: it looks like there is now a way to turn off ms-files.php according to this ticket:

http://core.trac.wordpress.org/ticket/19235

I found this post describing the steps:

Turn off ms-files.php after network setup

本文标签: MP4 upload okbut HTTP500 if I update the file (multisite)