Hello I have a reseller account with one wp 3.5 multisite on a shared hosting.
Suddenly I can't upload photos after some random dimensions(It uploads the small sized ones just fine, but it has problems with the bigger ones).Specific any photo over than 511(width) i got http error , and any image less than 511(width) upload without any http error
Operating System : Linux (64 Bit)
Server: LiteSpeed
Apache version: 2.2.23
Entry Processes: 20
Virtual Memory Usage & Physical Memory Usage: 1048576 KB (each)
I/O Usage: 1024 KB/s
My PHP specs:
- PHP Version: 5.3.18
- mysql Client API version: 5.1.65-cll
- post_max_size 60m (Local Value) - 60m (Master Value)
- upload_max_filesize 100m (Local Value) - 200m (Master Value)
- memory_limit 1024m (Local Value) - 1024m (Master Value)
- max_input_time 60 (Local Value) - 60 (Master Value)
- max_execution_time 3600 (Local Value) - 600 (Master Value)
functions.php of my theme: http://pastebin.com/ddEQqVJy
My multisite .htaccess is
# BASIC SECURITY
<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>
#<IfModule mod_security.c>
#SecFilterEngine Off
#SecFilterScanPOST Off
#</IfModule>
php_value memory_limit 1024M
php_value max_execution_time 3600
php_value post_max_size 60M
php_value upload_max_filesize 100M
</IfModule>
#php_value memory_limit 128M
#php_admin_flag safe_mode off
# Prevent folder browsing
Options All -Indexes
<Files wp-config.php>
order allow,deny
deny from all
</Files>
# BEGIN feedburner and uploaded files adjustments.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator) [NC]
RewriteRule ^feed/?.*$ http://feeds.feedburner.com/mysite [L,NC,R=302]
RewriteRule ^home?.*$ http://feeds.feedburner.com/mysite [L,NC,R=301]
RewriteRule ^wp-content/uploads/(.*)$ http://mysite.com/files/$1 [L,R=301]
RewriteRule ^wp-content/gallery/(.*)$ http://mysite.com/files/$1 [L,R=301]
RewriteRule ^wp-content/uploads/jw-player-plugin-for-wordpress/player/player.swf$ http://mysite.com/files/jw-player-plugin-for-wordpress/player/player.swf$1 [L,R=301]
</IfModule>
# BEGIN ANTISPAMBLOG REGISTRATION
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-signup.php*
RewriteCond %{HTTP_REFERER} !.mysite.com. [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) http://die-spammers.com/ [R=301,L]
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post.php*
RewriteCond %{HTTP_REFERER} !.*mysite.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
</IfModule>
# BEGIN Watermark Hotlinked Images
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?mysite.com [NC]
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?google.\ [NC]
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?facebook.com [NC]
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?twitter.com [NC]
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?yahoo.\ [NC]
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?bing.\ [NC]
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?ixquick.com [NC]
RewriteCond %{HTTP_REFERER} !^https?://([^.]+\.)?feeds.feedburner.com/mysite [NC]
RewriteRule ^(.*\.(png|gif|jpe?g))$ http://mysite.com/wp-content/plugins/watermark-hotlinked-images/watermark.php?img=$1 [L]
</IfModule>
# END Watermark Hotlinked Images
#Begin gzip and deflate
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/css application/x-javascript text/plain text/xml image/x-icon
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/html M3600
ExpiresByType text/css M3600
ExpiresByType application/x-javascript M3600
ExpiresByType image/bmp M3600
ExpiresByType image/gif M3600
ExpiresByType image/x-icon M3600
ExpiresByType image/jpeg M3600
</IfModule>
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]
#END WordPress
Update: This is my functions.php of my theme http://pastebin.com/ddEQqVJy
We find the problem , the problem is on
line 131
add_image_size('theme-thumb', 520, 497, true);
lines 267-275
if (function_exists('add_theme_support')) {
add_theme_support('post-thumbnails');
set_post_thumbnail_size(150, 250); // default Post Thumbnail dimensions
}
if (function_exists('add_image_size')) {
add_image_size('post-thumb', 310, 9999); //300 pixels wide (and unlimited height)
add_image_size('widget-thumb', 220, 180, true); //(cropped)
}
When we took them off it didn't show any "HTTP error" when we uploaded a photo on media.
on function.php of Twenty Twelve use
// This theme uses a custom image size for featured images, displayed on "standard" posts.
add_theme_support( 'post-thumbnails' );
set_post_thumbnail_size( 624, 9999 ); // Unlimited height, soft crop
without giving any "HTTP error" is strange, do you know why is this happening? And how can I fix it?